使用 MAAS 2.4 和 juju 2.4.1 部署 OpenStack

使用 MAAS 2.4 和 juju 2.4.1 部署 OpenStack

我想在我的 MAAS 2.4 和 juju 2.4.1 环境中安装 OpenStack。MAAS 现在运行良好,我可以用它来管理硬件。我安装了 juju 和 juju-controller(专用硬件由 MAAS 提供),到目前为止一切都很顺利!

现在我已经采用了 juju charm“openstack-base”并将其适配到我的硬件(3x 存储节点、2x 控制器节点、2x Nova 节点),这是我的“bundle.yaml”:

machines:
  '0':
    series: bionic
    constraints: "tags=virtual-machine"
  '1':
    series: bionic
    constraints: "tags=virtual-machine"
  '2':
    series: bionic
    constraints: "tags=controller"
  '3':
    series: bionic
    constraints: "tags=controller"
  '4':
    series: bionic
    constraints: "tags=storage"
  '5':
    series: bionic
    constraints: "tags=storage"
  '6':
    series: bionic
    constraints: "tags=storage"
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
- - nova-compute:ceph-access
  - cinder-ceph:ceph-access
- - 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: bionic
services:
  ceph-mon:
    annotations:
      gui-x: '750'
      gui-y: '500'
    charm: cs:ceph-mon-25
    num_units: 3
    options:
      expected-osd-count: 3
    bindings:
      public: admin-space
      cluster: admin-space
      admin: admin-space
      bootstrap-source: admin-space
      mon: admin-space
      osd: admin-space
      radosgw: admin-space
    to:
    - lxd:4
    - lxd:5
    - lxd:6
  ceph-osd:
    annotations:
      gui-x: '1000'
      gui-y: '500'
    charm: cs:ceph-osd-268
    num_units: 3
    options:
      osd-devices: '/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj'
    bindings:
      public: admin-space
      cluster: admin-space
      mon: admin-space
    to:
    - '4'
    - '5'
    - '6'
  ceph-radosgw:
    annotations:
      gui-x: '1000'
      gui-y: '250'
    charm: cs:ceph-radosgw-258
    num_units: 1
    bindings:
      public: admin-space
      admin: admin-space
      internal: admin-space
    to:
    - lxd:3
  cinder:
    annotations:
      gui-x: '750'
      gui-y: '0'
    charm: cs:cinder-272
    num_units: 1
    options:
      block-device: None
      glance-api-version: 2
      worker-multiplier: 0.25
    bindings:
      public: admin-space
      admin: admin-space
      internal: admin-space
    to:
    - lxd:2
  cinder-ceph:
    annotations:
      gui-x: '750'
      gui-y: '250'
    charm: cs:cinder-ceph-233
    num_units: 0
    bindings:
      ceph: admin-space
  glance:
    annotations:
      gui-x: '250'
      gui-y: '0'
    charm: cs:glance-267
    num_units: 1
    options:
      worker-multiplier: 0.25
    bindings:
      public: admin-space
      admin: admin-space
      internal: admin-space
    to:
    - lxd:3
  keystone:
    annotations:
      gui-x: '500'
      gui-y: '0'
    charm: cs:keystone-282
    num_units: 1
    options:
      worker-multiplier: 0.25
    bindings:
      public: admin-space
      admin: admin-space
      internal: admin-space
      shared-db: admin-space
    to:
    - lxd:2
  mysql:
    annotations:
      gui-x: '0'
      gui-y: '250'
    charm: cs:percona-cluster-268
    num_units: 1
    options:
      innodb-buffer-pool-size: 256M
      max-connections: 1000
    bindings:
      db-admin: admin-space
      access: admin-space
    to:
    - lxd:3
  neutron-api:
    annotations:
      gui-x: '500'
      gui-y: '500'
    charm: cs:neutron-api-261
    num_units: 1
    options:
      flat-network-providers: physnet1
      neutron-security-groups: true
      worker-multiplier: 0.25
      overlay-network-type: vxlan
      default-tenant-network-type: vxlan
    bindings:
      public: admin-space
      admin: admin-space
      internal: admin-space
      neutron-api: admin-space
      neutron-plugin-api: admin-space
      shared-db: admin-space
      amqp: admin-space
      identity-service: admin-space
      vsd-rest-api: admin-space
      neutron-plugin-api-subordinate: admin-space
      etcd-proxy: admin-space
      midonet: admin-space
      external-dns: admin-space
    to:
    - lxd:2
  neutron-gateway:
    annotations:
      gui-x: '0'
      gui-y: '0'
    charm: cs:neutron-gateway-252
    num_units: 1
    options:
      bridge-mappings: physnet1:br-ex
      data-port: br-ex:eno1
      worker-multiplier: 0.25
    bindings:
      amqp: admin-space
      amqp-nova: admin-space
      neutron-plugin-api: admin-space
      data: admin-space
      quantum-network-service: admin-space
    to:
    - '2'
  neutron-openvswitch:
    annotations:
      gui-x: '250'
      gui-y: '500'
    charm: cs:neutron-openvswitch-250
    num_units: 0
    bindings:
      amqp: admin-space
      data: admin-space
      neutron-control: admin-space
      neutron-plugin: admin-space
      neutron-plugin-api: admin-space
  nova-cloud-controller:
    annotations:
      gui-x: '0'
      gui-y: '500'
    charm: cs:nova-cloud-controller-310
    num_units: 1
    options:
      network-manager: Neutron
      worker-multiplier: 0.25
      console-access-protocol: spice
    bindings:
      public: admin-space
      admin: admin-space
      internal: admin-space
      shared-db: admin-space

      amqp: admin-space
      image-service: admin-space
      identity-service: admin-space
      cloud-compute: admin-space
      cinder-volume-service: admin-space
      neutron-api: admin-space

    to:
    - lxd:3
  nova-compute:
    annotations:
      gui-x: '250'
      gui-y: '250'
    charm: cs:nova-compute-284
    num_units: 2
    options:
      config-flags: default_ephemeral_format=ext4
      enable-live-migration: true
      enable-resize: true
      migration-auth-type: ssh
      virt-type: kvm
      libvirt-image-backend: rbd
    bindings:
      internal: admin-space
      amqp: admin-space
      ceph: admin-space
      ceph-access: admin-space
      cloud-compute: admin-space
      compute-peer: admin-space
      ephemeral-backend: admin-space
      image-service: admin-space
      neutron-plugin: admin-space
    to:
    - '0'
    - '1'
  ntp:
    annotations:
      gui-x: '1000'
      gui-y: '0'
    charm: cs:ntp-27
    num_units: 0
  openstack-dashboard:
    annotations:
      gui-x: '500'
      gui-y: '-250'
    charm: cs:openstack-dashboard-261
    num_units: 1
    bindings:
      public: admin-space
      website: admin-space
      dashboard-plugin: admin-space
      identity-service: admin-space
      cluster: admin-space
    to:
    - lxd:3
  rabbitmq-server:
    annotations:
      gui-x: '500'
      gui-y: '250'
    charm: cs:rabbitmq-server-77
    num_units: 1
    bindings:
      "": admin-space
      amqp: admin-space
      ceph: admin-space
      cluster: admin-space
    to:
    - lxd:2

我知道大量的“绑定”设置是经过多次尝试才得以实现的。通过此设置,我可以成功部署完整的 juju-charm,并且所有服务都可以正常工作(显然如此)。现在,我已经在“horizo​​n 仪表板”中配置了所有内容并启动了我的实例(cirrOS 0.3.4),但不幸的是,我无法访问外部网络,因此虚拟机上没有互联网。此外,无法从外部访问实例(ext-net -> VM 通过浮动 IP)。

我认为我的问题是“桥接映射”和“数据端口”设置的各种分配。除了存储节点,我只在所有服务器上使用第一个网卡(eno1)。稍后我想添加另一张卡,但首先我尝试让它完全工作。

答案1

好的,在我将“ext-br”指向“eno2”之后,我现在可以访问我的外部网关 ergo 互联网!重要的是,您应该通过 MAAS 保留未配置的接口,“ovs”无论如何都会忽略这些设置或只会激怒它们。如果没有可用的接口,也可以使用 VLAN。

相关内容