Kolla AnsibleでOpenStack + TungstenFabric (Contrail) deploy
Kolla Ansibleを使用してTungstenFabric (Contrail) + OpenStackをdeployする手順はGitHub やJuniperが公開している手順に記載されていますが、所々情報が古く少し苦戦したので、設定例をメモ。
構成
下記図の通り。
MultiNode & Multi interfaceで試したかったので各Controllerは3台構成で2nic持たせている。
各インスタンスのcpu/memory/disk設定は下記。
推奨スペックよりも低いが自宅環境のマシンだと下記が限界だった。
スペックに余裕がある場合は多めに割り当てたほうが無難。
deployer: 1CPU/2GB/10GB OpenStack Controller: 4CPU/12GB/100GB TungstenFabric Controller: 4CPU/16GB/100GB ComputeNode: 4CPU/8GB/100GB
設定
インスタンスの初期設定を実施した後deployerにて下記編集。
provider_config: bms: ssh_user: admin ssh_private_key: /root/.ssh/id_rsa ssh_public_key: /root/.ssh/id_rsa.pub domainsuffix: local instances: ctr01: provider: bms ip: 192.168.0.11 roles: openstack: ctr02: provider: bms ip: 192.168.0.12 roles: openstack: ctr03: provider: bms ip: 192.168.0.13 roles: openstack: tf01: provider: bms ip: 192.168.0.14 roles: config_database: config: control: analytics_database: analytics: analytics_alarm: analytics_snmp: webui: tf02: provider: bms ip: 192.168.0.15 roles: config_database: config: control: analytics_database: analytics: analytics_alarm: analytics_snmp: webui: tf03: provider: bms ip: 192.168.0.16 roles: config_database: config: control: analytics_database: analytics: analytics_alarm: analytics_snmp: webui: cmp01: provider: bms ip: 192.168.0.17 roles: vrouter: openstack_compute: cmp02: provider: bms ip: 192.168.0.18 roles: vrouter: openstack_compute: global_configuration: CONTAINER_REGISTRY: tungstenfabric contrail_configuration: UPGRADE_KERNEL: False CONTRAIL_VERSION: "2020-08-21-stable" CONTRAIL_CONTAINER_TAG: "2020-08-21-stable" CONTROLLER_NODES: 192.168.0.14,192.168.0.15,192.168.0.16 CONTROL_NODES: 172.16.0.14,172.16.0.15,172.16.0.16 CLOUD_ORCHESTRATOR: openstack VROUTER_GATEWAY: 172.16.0.254 KEYSTONE_AUTH_HOST: 192.168.0.10 KEYSTONE_AUTH_URL_VERSION: /v3 KEYSTONE_AUTH_URL: http://192.168.0.10:35357/v3 OPENSTACK_VERSION: queens AUTH_MODE: keystone RABBITMQ_NODE_PORT: 5673 CONFIG_DATABASE_NODEMGR__DEFAULTS__minimum_diskGB: 20 DATABASE_NODEMGR__DEFAULTS__minimum_diskGB: 20 PHYSICAL_INTERFACE: vlan10 JVM_EXTRA_OPTS: "-Xms1g -Xmx2g" BGP_ASN: 64512 kolla_config: customize: nova.conf: | [libvirt] virt_type=qemu cpu_mode=none kolla_globals: enable_haproxy: yes enable_ironic: no enable_swift: no contrail_api_interface_address: 192.168.0.14,192.168.0.15,192.168.0.16 kolla_internal_vip_address: 192.168.0.10 kolla_external_vip_address: 172.16.0.10 kolla_passwords: keystone_admin_password: contrail123
deploy
上記設定後、deployerにて下記実行。
ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/configure_instances.yml -vv ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/install_openstack.yml -vv ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/install_contrail.yml -vv
正常に完了すれば、下記のようにOpenstackのUI (Horizon)とTungstenFabric (Contrail) のUIにアクセスできる。