lost and found ( for me ? )

Ubuntu MAAS and Juju : set up Openstack Mitaka

Here are logs when setting up OpenStack Mitaka by using OpenStack Mitaka bundle

Reference
http://lost-and-found-narihiro.blogspot.jp/2017/01/ubuntu-1604-deploy-openstack-with-juju.html

  • Use VXLAN for tenant network
  • Use Neutron L3 agent on controller node
  • Provider network : flat network

MAAS Version 2.1.2+bzr5555-0ubuntu1 (16.04.1)
Juju 2.0.0-xenial-amd64

Assume you have already set up Juju and MAAS.
Prepare four nodes.

Neutron gateway
eth0 : DHCP via PXE ( default gateway , 192.168.40.0/24)
eth1 : unnumbered ( 192.168.100.0/24 )

eth1 is used for external network (provider network, flat network )
Do not configure a default gateway on an interface for provider network. ( i.e. eth1 )


Other nodes
eth0 : DHCP for PXE. ( default gateway , 192.168.40.0/24)


All nodes have two disks, vda and vdb.

bundle.yaml
root@maas01:~/Mitaka_xenial# cat bundle.yaml.xenial.mitaka.04
machines:
 '0':
   constraints: arch=amd64
   series: xenial
   tags: neutron-gateway
 '1':
   constraints: arch=amd64
   series: xenial
   tags: compute
 '2':
   constraints: arch=amd64
   series: xenial
   tags: compute
 '3':
   constraints: arch=amd64
   series: xenial
   tags: compute
relations:
- - nova-compute:amqp
 - rabbitmq-server:amqp
- - neutron-gateway:amqp
 - rabbitmq-server:amqp
- - keystone:shared-db
 - mysql:shared-db
- - nova-cloud-controller:identity-service
 - keystone:identity-service
- - glance:identity-service
 - keystone:identity-service
- - neutron-api:identity-service
 - keystone:identity-service
- - neutron-openvswitch:neutron-plugin-api
 - neutron-api:neutron-plugin-api
- - neutron-api:shared-db
 - mysql:shared-db
- - neutron-api:amqp
 - rabbitmq-server:amqp
- - neutron-gateway:neutron-plugin-api
 - neutron-api:neutron-plugin-api
- - glance:shared-db
 - mysql:shared-db
- - glance:amqp
 - rabbitmq-server:amqp
- - nova-cloud-controller:image-service
 - glance:image-service
- - nova-compute:image-service
 - glance:image-service
- - nova-cloud-controller:cloud-compute
 - nova-compute:cloud-compute
- - nova-cloud-controller:amqp
 - rabbitmq-server:amqp
- - nova-cloud-controller:quantum-network-service
 - neutron-gateway:quantum-network-service
- - nova-compute:neutron-plugin
 - neutron-openvswitch:neutron-plugin
- - neutron-openvswitch:amqp
 - rabbitmq-server:amqp
- - openstack-dashboard:identity-service
 - keystone:identity-service
- - nova-cloud-controller:shared-db
 - mysql:shared-db
- - nova-cloud-controller:neutron-api
 - neutron-api:neutron-api
- - cinder:image-service
 - glance:image-service
- - cinder:amqp
 - rabbitmq-server:amqp
- - cinder:identity-service
 - keystone:identity-service
- - cinder:cinder-volume-service
 - nova-cloud-controller:cinder-volume-service
- - cinder-ceph:storage-backend
 - cinder:storage-backend
- - ceph-mon:client
 - nova-compute:ceph
- - cinder:shared-db
 - mysql:shared-db
- - ceph-mon:client
 - cinder-ceph:ceph
- - ceph-mon:client
 - glance:ceph
- - ceph-osd:mon
 - ceph-mon:osd
- - ntp:juju-info
 - nova-compute:juju-info
- - ntp:juju-info
 - neutron-gateway:juju-info
- - ceph-radosgw:mon
 - ceph-mon:radosgw
- - ceph-radosgw:identity-service
 - keystone:identity-service
series: xenial
services:
 ceph-mon:
   annotations:
     gui-x: '750'
     gui-y: '500'
   charm: cs:~openstack-charmers-next/xenial/ceph-mon
   num_units: 3
   to:
   - 'lxc:1'
   - 'lxc:2'
   - 'lxc:3'
 ceph-osd:
   annotations:
     gui-x: '1000'
     gui-y: '500'
   charm: cs:~openstack-charmers-next/xenial/ceph-osd
   num_units: 3
   options:
     osd-devices: /dev/vdb
     osd-reformat: 'yes'
     ceph-public-network: 192.168.40.0/24
   to:
   - '1'
   - '2'
   - '3'
 ceph-radosgw:
   annotations:
     gui-x: '1000'
     gui-y: '250'
   charm: cs:~openstack-charmers-next/xenial/ceph-radosgw
   num_units: 1
   options:
   to:
   - lxc:0
 cinder:
   annotations:
     gui-x: '750'
     gui-y: '0'
   charm: cs:~openstack-charmers-next/xenial/cinder
   num_units: 1
   options:
     block-device: None
     glance-api-version: 2
   to:
   - lxc:1
 cinder-ceph:
   annotations:
     gui-x: '750'
     gui-y: '250'
   charm: cs:~openstack-charmers-next/xenial/cinder-ceph
   num_units: 0
 glance:
   annotations:
     gui-x: '250'
     gui-y: '0'
   charm: cs:~openstack-charmers-next/xenial/glance
   num_units: 1
   to:
   - lxc:2
 keystone:
   annotations:
     gui-x: '500'
     gui-y: '0'
   charm: cs:~openstack-charmers-next/xenial/keystone
   num_units: 1
   options:
     admin-password: openstack
   to:
   - lxc:3
 mysql:
   annotations:
     gui-x: '0'
     gui-y: '250'
   charm: cs:~openstack-charmers-next/xenial/percona-cluster
   num_units: 1
   options:
     max-connections: 20000
   to:
   - lxc:0
 neutron-api:
   annotations:
     gui-x: '500'
     gui-y: '500'
   charm: cs:~openstack-charmers-next/xenial/neutron-api
   num_units: 1
   options:
     neutron-security-groups: false
     l2-population: true
     overlay-network-type: vxlan
     default-tenant-network-type: vxlan
     flat-network-providers:  physnet1
   to:
   - lxc:1
 neutron-gateway:
   annotations:
     gui-x: '0'
     gui-y: '0'
   charm: cs:~openstack-charmers-next/xenial/neutron-gateway
   num_units: 1
   options:
     bridge-mappings: physnet1:br-ex
     data-port: br-ex:eth1
     os-data-network: 192.168.40.0/24
   to:
   - '0'
 neutron-openvswitch:
   annotations:
     gui-x: '250'
     gui-y: '500'
   charm: cs:~openstack-charmers-next/xenial/neutron-openvswitch
   num_units: 0
   options:
     os-data-network: 192.168.40.0/24
 nova-cloud-controller:
   annotations:
     gui-x: '0'
     gui-y: '500'
   charm: cs:~openstack-charmers-next/xenial/nova-cloud-controller
   num_units: 1
   options:
     network-manager: Neutron
     os-public-network: 192.168.40.0/24
     os-admin-network: 192.168.40.0/24
     use-internal-endpoints: true
   to:
   - lxc:2
 nova-compute:
   annotations:
     gui-x: '250'
     gui-y: '250'
   charm: cs:~openstack-charmers-next/xenial/nova-compute
   num_units: 3
   options:
     enable-live-migration: true
     enable-resize: true
     migration-auth-type: ssh
   to:
   - '1'
   - '2'
   - '3'
 ntp:
   annotations:
     gui-x: '1000'
     gui-y: '0'
   charm: cs:~openstack-charmers-next/xenial/ntp
   num_units: 0
 openstack-dashboard:
   annotations:
     gui-x: '500'
     gui-y: '-250'
   charm: cs:~openstack-charmers-next/xenial/openstack-dashboard
   num_units: 1
   options:
     neutron-network-lb: true
   to:
   - lxc:3
 rabbitmq-server:
   annotations:
     gui-x: '500'
     gui-y: '250'
   charm: cs:~openstack-charmers-next/xenial/rabbitmq-server
   num_units: 1
   options:
     access-network: 192.168.40.0/24
   to:
   - lxc:0

root@maas01:~/Mitaka_xenial# juju deploy ./bundle.yaml.xenial.mitaka.04

Register images ( glance image-create .. )
root@maas01:~# openstack image create cirros --disk-format qcow2 --public --container-format bare --file ./cirros-0.3.4-i386-disk.img

Tenant Network
(neutron) net-create internal
(neutron) subnet-create internal 192.168.130.0/24
(neutron) router-create my-router
(neutron) router-interface-add my-router 47598e3e-d87d-4e7b-86c3-cfa08e248cce

External network
(neutron) net-create --provider:network_type flat --provider:physical_network physnet1 --router:external=true external
Created a new network:

(neutron) subnet-create --tenant-id services external 192.168.100.0/24 --disable-dhcp --allocation-pool start=192.168.100.150,end=192.168.100.200 –gateway 192.168.100.1

(neutron) router-gateway-set my-router external
Set gateway for router my-router
(neutron)

Boot an instance
# nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey

# nova boot --image cirros --flavor m1.tiny --key-name mykey --nic net-id=f4e5bea0-d609-451c-ac60-5d7687f1602e
cirros01

  • Floating ip

(neutron) floatingip-create external

(neutron) floatingip-associate df47ebb1-e285-47f2-af66-d082641ca71d 15988e19-d6ae-4d70-8b38-d344d430a254
Associated floating IP df47ebb1-e285-47f2-af66-d082641ca71d

root@maas01:~/Mitaka_xenial# openstack server list
+--------------------------------------+----------+--------+--------------------------------------+
| ID                                   | Name     | Status | Networks                             |
+--------------------------------------+----------+--------+--------------------------------------+
| dc3d8f30-b42c-4377-a15b-0b3691bc74aa | cirros02 | ACTIVE | internal=192.168.130.4, 192.168.100.151 |
| e2d6640b-89ac-4811-a74b-b2c08da46d85 | cirros01 | ACTIVE | internal=192.168.130.3, 192.168.100.152 |
+--------------------------------------+----------+--------+--------------------------------------+

root@maas01:~/Mitaka_xenial# juju status
Model    Controller          Cloud/Region  Version
default  my-maas-controller  my-maas       2.0.0

App                    Version      Status   Scale  Charm                  Store       Rev  OS      Notes
ceph-mon               10.2.3       active       3  ceph-mon               jujucharms  251  ubuntu
ceph-osd               10.2.3       active       3  ceph-osd               jujucharms  264  ubuntu
ceph-radosgw           10.2.3       active       1  ceph-radosgw           jujucharms  246  ubuntu
cinder                 8.1.1        active       1  cinder                 jujucharms  262  ubuntu
cinder-ceph            8.1.1        active       1  cinder-ceph            jujucharms  228  ubuntu
glance                 12.0.0       active       1  glance                 jujucharms  262  ubuntu
keystone               9.2.0        active       1  keystone               jujucharms  278  ubuntu
mysql                  5.6.21-25.8  active       1  percona-cluster        jujucharms  239  ubuntu
neutron-api            8.3.0        active       1  neutron-api            jujucharms  275  ubuntu
neutron-gateway        8.3.0        active       1  neutron-gateway        jujucharms  268  ubuntu
neutron-openvswitch    8.3.0        active       3  neutron-openvswitch    jujucharms  252  ubuntu
nova-cloud-controller  13.1.2       active       1  nova-cloud-controller  jujucharms  277  ubuntu
nova-compute           13.1.2       active       3  nova-compute           jujucharms  293  ubuntu
ntp                                 unknown      4  ntp                    jujucharms    1  ubuntu
openstack-dashboard    9.1.0        active       1  openstack-dashboard    jujucharms  256  ubuntu
rabbitmq-server        3.5.7        active       1  rabbitmq-server        jujucharms  249  ubuntu

Unit                      Workload  Agent      Machine  Public address  Ports           Message
ceph-mon/0                active    executing  1/lxd/0  192.168.40.57                   (update-status) Unit is ready and clustered
ceph-mon/1*               active    executing  2/lxd/0  192.168.40.64                   (update-status) Unit is ready and clustered
ceph-mon/2                active    executing  3/lxd/0  192.168.40.67                   (update-status) Unit is ready and clustered
ceph-osd/0                active    idle       1        192.168.40.192                  Unit is ready (1 OSD)
ceph-osd/1                active    idle       2        192.168.40.193                  Unit is ready (1 OSD)
ceph-osd/2*               active    idle       3        192.168.40.191                  Unit is ready (1 OSD)
ceph-radosgw/0*           active    idle       0/lxd/0  192.168.40.72   80/tcp          Unit is ready
cinder/0*                 active    idle       1/lxd/1  192.168.40.65   8776/tcp        Unit is ready
 cinder-ceph/0*          active    idle                192.168.40.65                   Unit is ready
glance/0*                 active    idle       2/lxd/1  192.168.40.30   9292/tcp        Unit is ready
keystone/0*               active    executing  3/lxd/1  192.168.40.69   5000/tcp        (update-status) Unit is ready
mysql/0*                  active    idle       0/lxd/1  192.168.40.54                   Unit is ready
neutron-api/0*            active    idle       1/lxd/2  192.168.40.74   9696/tcp        Unit is ready
neutron-gateway/0*        active    idle       0        192.168.40.50                   Unit is ready
 ntp/3                   unknown   idle                192.168.40.50
nova-cloud-controller/0*  active    idle       2/lxd/2  192.168.40.73   8774/tcp        Unit is ready
nova-compute/0            active    idle       1        192.168.40.192                  Unit is ready
 neutron-openvswitch/1   active    idle                192.168.40.192                  Unit is ready
 ntp/1                   unknown   idle                192.168.40.192
nova-compute/1            active    idle       2        192.168.40.193                  Unit is ready
 neutron-openvswitch/0*  active    idle                192.168.40.193                  Unit is ready
 ntp/0*                  unknown   idle                192.168.40.193
nova-compute/2*           active    idle       3        192.168.40.191                  Unit is ready
 neutron-openvswitch/2   active    idle                192.168.40.191                  Unit is ready
 ntp/2                   unknown   idle                192.168.40.191
openstack-dashboard/0*    active    idle       3/lxd/2  192.168.40.66   80/tcp,443/tcp  Unit is ready
rabbitmq-server/0*        active    idle       0/lxd/2  192.168.40.51   5672/tcp        Unit is ready

Machine  State    DNS             Inst id              Series  AZ
0        started  192.168.40.50   wc7bkb               xenial  default
0/lxd/0  started  192.168.40.72   juju-7fc53c-0-lxd-0  xenial
0/lxd/1  started  192.168.40.54   juju-7fc53c-0-lxd-1  xenial
0/lxd/2  started  192.168.40.51   juju-7fc53c-0-lxd-2  xenial
1        started  192.168.40.192  tmr3wc               xenial  default
1/lxd/0  started  192.168.40.57   juju-7fc53c-1-lxd-0  xenial
1/lxd/1  started  192.168.40.65   juju-7fc53c-1-lxd-1  xenial
1/lxd/2  started  192.168.40.74   juju-7fc53c-1-lxd-2  xenial
2        started  192.168.40.193  hmwskg               xenial  default
2/lxd/0  started  192.168.40.64   juju-7fc53c-2-lxd-0  xenial
2/lxd/1  started  192.168.40.30   juju-7fc53c-2-lxd-1  xenial
2/lxd/2  started  192.168.40.73   juju-7fc53c-2-lxd-2  xenial
3        started  192.168.40.191  tddyak               xenial  default
3/lxd/0  started  192.168.40.67   juju-7fc53c-3-lxd-0  xenial
3/lxd/1  started  192.168.40.69   juju-7fc53c-3-lxd-1  xenial
3/lxd/2  started  192.168.40.66   juju-7fc53c-3-lxd-2  xenial
4        pending                  weabrn               xenial  default

Relation                 Provides               Consumes               Type
mon                      ceph-mon               ceph-mon               peer
mon                      ceph-mon               ceph-osd               regular
mon                      ceph-mon               ceph-radosgw           regular
ceph                     ceph-mon               cinder-ceph            regular
ceph                     ceph-mon               glance                 regular
ceph                     ceph-mon               nova-compute           regular
cluster                  ceph-radosgw           ceph-radosgw           peer
identity-service         ceph-radosgw           keystone               regular
cluster                  cinder                 cinder                 peer
storage-backend          cinder                 cinder-ceph            subordinate
image-service            cinder                 glance                 regular
identity-service         cinder                 keystone               regular
shared-db                cinder                 mysql                  regular
cinder-volume-service    cinder                 nova-cloud-controller  regular
amqp                     cinder                 rabbitmq-server        regular
cluster                  glance                 glance                 peer
identity-service         glance                 keystone               regular
shared-db                glance                 mysql                  regular
image-service            glance                 nova-cloud-controller  regular
image-service            glance                 nova-compute           regular
amqp                     glance                 rabbitmq-server        regular
cluster                  keystone               keystone               peer
shared-db                keystone               mysql                  regular
identity-service         keystone               neutron-api            regular
identity-service         keystone               nova-cloud-controller  regular
identity-service         keystone               openstack-dashboard    regular
cluster                  mysql                  mysql                  peer
shared-db                mysql                  neutron-api            regular
shared-db                mysql                  nova-cloud-controller  regular
cluster                  neutron-api            neutron-api            peer
neutron-plugin-api       neutron-api            neutron-gateway        regular
neutron-plugin-api       neutron-api            neutron-openvswitch    regular
neutron-api              neutron-api            nova-cloud-controller  regular
amqp                     neutron-api            rabbitmq-server        regular
cluster                  neutron-gateway        neutron-gateway        peer
quantum-network-service  neutron-gateway        nova-cloud-controller  regular
juju-info                neutron-gateway        ntp                    subordinate
amqp                     neutron-gateway        rabbitmq-server        regular
neutron-plugin           neutron-openvswitch    nova-compute           regular
amqp                     neutron-openvswitch    rabbitmq-server        regular
cluster                  nova-cloud-controller  nova-cloud-controller  peer
cloud-compute            nova-cloud-controller  nova-compute           regular
amqp                     nova-cloud-controller  rabbitmq-server        regular
neutron-plugin           nova-compute           neutron-openvswitch    subordinate
compute-peer             nova-compute           nova-compute           peer
juju-info                nova-compute           ntp                    subordinate
amqp                     nova-compute           rabbitmq-server        regular
ntp-peers                ntp                    ntp                    peer
cluster                  openstack-dashboard    openstack-dashboard    peer
cluster                  rabbitmq-server        rabbitmq-server        peer

root@maas01:~/Mitaka_xenial#  - ntp/3: 192.168.40.50 (agent:idle, workload:unknown)
- nova-cloud-controller/0: 192.168.40.73 (agent:idle, workload:active) 8774/tcp
- nova-compute/0: 192.168.40.192 (agent:idle, workload:active)
 - neutron-openvswitch/1: 192.168.40.192 (agent:idle, workload:active)
 - ntp/1: 192.168.40.192 (agent:idle, workload:unknown)
- nova-compute/1: 192.168.40.193 (agent:idle, workload:active)
 - neutron-openvswitch/0: 192.168.40.193 (agent:idle, workload:active)
 - ntp/0: 192.168.40.193 (agent:idle, workload:unknown)
- nova-compute/2: 192.168.40.191 (agent:idle, workload:active)
 - neutron-openvswitch/2: 192.168.40.191 (agent:idle, workload:active)
 - ntp/2: 192.168.40.191 (agent:idle, workload:unknown)
- openstack-dashboard/0: 192.168.40.66 (agent:idle, workload:active) 80/tcp, 443/tcp
- rabbitmq-server/0: 192.168.40.51 (agent:idle, workload:active) 5672/tcp
root@maas01:~/Mitaka_xenial#

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.