I had done this in 2020 May on my old mac mini with Catalina ;-). With 20 GiB disk and 6GiB RAM assigned to one Vagrant spawned (virtualbox), the OpenStack Cluster is running pretty well, comparing to my previous setups ( multi-VMs based manually deployment and VM based Mirantis Fuel 9.0 deployment), it’s obviously more reponsive with the help of the single node setup.
Here I leave the notes as a reference for you to have a playground easier.
Preparation
Install vagrant and plugins needed
Below is an example to do this on a macOS machine, to do that from other OS, refer to here
# if we need to resize disks after vagrant up vagrant plugin install vagrant-disksize # if we need to make vagrant VM behind a proxy vagrant plugin install vagrant-proxyconf
I found the configuration file out-of-box is no longer working/ out of repair for some time, below changes on Vagrantfile, Vagrantfile.custom, and bootstrap.sh are needed.
For Vagrantfile.custom, we need to use Ubuntu 18.04 instead of 16.04, which comes with python3.6+ in apt repo.
diff --git a/contrib/dev/vagrant/Vagrantfile b/contrib/dev/vagrant/Vagrantfile index 26b6294da..d248b302d 100644 --- a/contrib/dev/vagrant/Vagrantfile +++ b/contrib/dev/vagrant/Vagrantfile @@ -234,6 +234,10 @@ Vagrant.configure(2) do |config| end end
+ # Resize the spec of operator and config proxy + + config.disksize.size = '50GB' + config.apt_proxy.http = "" + config.apt_proxy.https = "" + # The operator controls the deployment config.vm.define "operator", primary: true do |admin| admin.vm.hostname = "operator.local" @@ -251,6 +255,7 @@ Vagrant.configure(2) do |config| vm.graphics_ip = GRAPHICSIP end configure_wifi_if_enabled(vm) + vm.customize ["modifyvm", :id, "--memory", 6144] end admin.hostmanager.aliases = "operator" end
bootstrap.sh was modified for adaptations on ubuntu 18.04 with docker and python3 configured.
defconfigure_wifi_vbox_networking(vm) # Even if adapters 1 & 2 don't need to be modified, if the order is to be # maintained, some modification has to be done to them. This will maintain # the association inside the guest OS: NIC1 -> eth0, NIC2 -> eth1, NIC3 -> # eht2. The modifications for adapters 1 & 2 only change optional properties. # Adapter 3 is enabled and connected to the NAT-Network named "OSNetwork", # while also changing its optional properties. Since adapter 3 is used by # Neutron for the external network, promiscuous mode is set to "allow-all". # Also, use virtio as the adapter type, for better performance. vm.customize ["modifyvm", :id, "--nictype1", "virtio"] vm.customize ["modifyvm", :id, "--cableconnected1", "on"] vm.customize ["modifyvm", :id, "--nicpromisc2", "deny"] vm.customize ["modifyvm", :id, "--nictype2", "virtio"] vm.customize ["modifyvm", :id, "--cableconnected2", "on"] vm.customize ["modifyvm", :id, "--nic3", "natnetwork"] vm.customize ["modifyvm", :id, "--nat-network3", "OSNetwork"] # <------ this one vm.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] vm.customize ["modifyvm", :id, "--nictype3", "virtio"] vm.customize ["modifyvm", :id, "--cableconnected3", "on"] end
Thus a NAT network named OSNetwork should be created, we can create it manually before next steps.
1 2 3 4 5 6 7 8 9 10
VBoxManage natnetwork list NAT Networks:
Name: OSNetwork Network: 100.0.0.0/24 Gateway: 100.0.0.1 IPv6: No Enabled: Yes
1 network found
Vagrant Up and access to Operator node
A VM named operator will be spawned by vagrant up under kolla-ansible/contrib/dev/vagrant:
1 2
vagrant up vagrant ssh operator # to access "operator" VM
Build Kolla Docker Images
In this VM, if the bootstrap.sh went well, we should have kolla-build usable out of box.
We could refer to this doc on kolla-build, and to enable minimal usable OpenStack cluster, you could use the profile default or even define your own profiles.
Also, here we are using ubuntu as linux distro type and openstack release in Train cycle a.k.a. 9.1.0.
root@operator: # docker images REPOSITORY TAG IMAGE ID CREATED SIZE operator.local:4000/lokolla/ubuntu-binary-nova-compute 9.1.0 9977333ea15b 9 days ago 921MB operator.local:4000/lokolla/ubuntu-binary-horizon 9.1.0 0941e5ae7d17 9 days ago 619MB operator.local:4000/lokolla/ubuntu-binary-neutron-server-opendaylight 9.1.0 c8e56fa7cd1f 9 days ago 669MB operator.local:4000/lokolla/ubuntu-binary-nova-compute-ironic 9.1.0 3a8e3df9a0f0 9 days ago 764MB operator.local:4000/lokolla/ubuntu-binary-nova-api 9.1.0 ac54264a362a 9 days ago 634MB operator.local:4000/lokolla/ubuntu-binary-nova-novncproxy 9.1.0 5aa3c338d32e 9 days ago 645MB operator.local:4000/lokolla/ubuntu-binary-nova-serialproxy 9.1.0 7215c20ad3f3 9 days ago 621MB operator.local:4000/lokolla/ubuntu-binary-neutron-server-ovn 9.1.0 37e94257a188 9 days ago 561MB operator.local:4000/lokolla/ubuntu-binary-nova-ssh 9.1.0 cf17afc42b35 9 days ago 623MB operator.local:4000/lokolla/ubuntu-binary-neutron-infoblox-ipam-agent 9.1.0 ecb358c6737e 9 days ago 561MB operator.local:4000/lokolla/ubuntu-binary-nova-spicehtml5proxy 9.1.0 d31423b9ba82 9 days ago 621MB operator.local:4000/lokolla/ubuntu-binary-nova-conductor 9.1.0 2c94a0f01bb5 9 days ago 621MB operator.local:4000/lokolla/ubuntu-binary-nova-scheduler 9.1.0 5c02b566ab17 9 days ago 621MB operator.local:4000/lokolla/ubuntu-binary-neutron-openvswitch-agent 9.1.0 b33f0acd2837 9 days ago 555MB operator.local:4000/lokolla/ubuntu-binary-neutron-metering-agent 9.1.0 f454ed7952f5 9 days ago 555MB operator.local:4000/lokolla/ubuntu-binary-neutron-metadata-agent 9.1.0 2725dd9625f7 9 days ago 557MB operator.local:4000/lokolla/ubuntu-binary-neutron-server 9.1.0 d6cf6dd854b8 9 days ago 561MB operator.local:4000/lokolla/ubuntu-binary-neutron-linuxbridge-agent 9.1.0 98b7d2516b36 9 days ago 555MB operator.local:4000/lokolla/ubuntu-binary-nova-base 9.1.0 a6927b74ce5f 9 days ago 618MB operator.local:4000/lokolla/ubuntu-binary-heat-engine 9.1.0 dd468972a5db 9 days ago 513MB operator.local:4000/lokolla/ubuntu-binary-neutron-sriov-agent 9.1.0 f060e2b828c3 9 days ago 555MB operator.local:4000/lokolla/ubuntu-binary-heat-api 9.1.0 62e36e9c42a5 9 days ago 513MB operator.local:4000/lokolla/ubuntu-binary-neutron-l3-agent 9.1.0 fc4e3f30a385 9 days ago 561MB operator.local:4000/lokolla/ubuntu-binary-neutron-dhcp-agent 9.1.0 0ba2190cf331 9 days ago 558MB operator.local:4000/lokolla/ubuntu-binary-neutron-bgp-dragent 9.1.0 bcd7e971ed94 9 days ago 556MB operator.local:4000/lokolla/ubuntu-binary-glance-api 9.1.0 c3e7869f6699 9 days ago 519MB operator.local:4000/lokolla/ubuntu-binary-keystone-fernet 9.1.0 1b1f533bb04f 9 days ago 494MB operator.local:4000/lokolla/ubuntu-binary-neutron-metadata-agent-ovn 9.1.0 24ce264a051c 9 days ago 552MB operator.local:4000/lokolla/ubuntu-binary-glance-registry 9.1.0 af21156994b5 9 days ago 503MB operator.local:4000/lokolla/ubuntu-binary-placement-api 9.1.0 98f72efcee88 9 days ago 532MB operator.local:4000/lokolla/ubuntu-binary-keystone 9.1.0 a9e16ba897c7 9 days ago 490MB operator.local:4000/lokolla/ubuntu-binary-keystone-ssh 9.1.0 3d21db1b5ec5 9 days ago 496MB operator.local:4000/lokolla/ubuntu-binary-neutron-base 9.1.0 660e301b004a 9 days ago 552MB operator.local:4000/lokolla/ubuntu-binary-heat-api-cfn 9.1.0 104f841db4fa 9 days ago 513MB operator.local:4000/lokolla/ubuntu-binary-kolla-toolbox 9.1.0 4c3902489674 9 days ago 933MB operator.local:4000/lokolla/ubuntu-binary-glance-base 9.1.0 4023044bafab 9 days ago 503MB operator.local:4000/lokolla/ubuntu-binary-keystone-base 9.1.0 ff5441d42802 9 days ago 487MB operator.local:4000/lokolla/ubuntu-binary-barbican-keystone-listener 9.1.0 b1528a8d4e5b 9 days ago 459MB operator.local:4000/lokolla/ubuntu-binary-placement-base 9.1.0 00df0fe7ff13 9 days ago 494MB operator.local:4000/lokolla/ubuntu-binary-heat-base 9.1.0 743f6a651c8f 9 days ago 435MB operator.local:4000/lokolla/ubuntu-binary-barbican-base 9.1.0 8435e7bb5a8c 9 days ago 424MB operator.local:4000/lokolla/ubuntu-binary-openstack-base 9.1.0 9a7befd0cc64 9 days ago 422MB operator.local:4000/lokolla/ubuntu-binary-nova-libvirt 9.1.0 a414aa4d1512 9 days ago 883MB operator.local:4000/lokolla/ubuntu-binary-mariadb-server 9.1.0 c8f1254995ea 9 days ago 536MB operator.local:4000/lokolla/ubuntu-binary-fluentd 9.1.0 a3e62fa48f3e 10 days ago 537MB operator.local:4000/lokolla/ubuntu-binary-openvswitch-db-server 9.1.0 d5280ad49720 10 days ago 224MB operator.local:4000/lokolla/ubuntu-binary-openvswitch-vswitchd 9.1.0 026b50773723 10 days ago 224MB operator.local:4000/lokolla/ubuntu-binary-prometheus-haproxy-exporter 9.1.0 7920e8c72603 10 days ago 219MB operator.local:4000/lokolla/ubuntu-binary-prometheus-memcached-exporter 9.1.0 076e0eded872 10 days ago 220MB operator.local:4000/lokolla/ubuntu-binary-mariadb-clustercheck 9.1.0 317d9e7365be 10 days ago 241MB operator.local:4000/lokolla/ubuntu-binary-openvswitch-base 9.1.0 ea128655d138 10 days ago 224MB operator.local:4000/lokolla/ubuntu-binary-memcached 9.1.0 b6af2f329240 10 days ago 208MB operator.local:4000/lokolla/ubuntu-binary-mariadb 9.1.0 2c2fe1fbf961 10 days ago 535MB operator.local:4000/lokolla/ubuntu-binary-rabbitmq 9.1.0 d1b1aaacc73a 10 days ago 249MB operator.local:4000/lokolla/ubuntu-binary-cron 9.1.0 d084f268e0dc 10 days ago 208MB operator.local:4000/lokolla/ubuntu-binary-chrony 9.1.0 43fc123294e3 10 days ago 213MB operator.local:4000/lokolla/ubuntu-binary-prometheus-base 9.1.0 a36c132b3c48 10 days ago 206MB operator.local:4000/lokolla/ubuntu-binary-haproxy 9.1.0 507836be5c42 10 days ago 214MB operator.local:4000/lokolla/ubuntu-binary-mariadb-base 9.1.0 3b2ea2e71fae 10 days ago 240MB operator.local:4000/lokolla/ubuntu-binary-keepalived 9.1.0 5970aa989513 10 days ago 216MB operator.local:4000/lokolla/ubuntu-binary-base 9.1.0 d4bed93756bc 10 days ago 206MB ubuntu 18.04 c3c304cb4f22 4 weeks ago 64.2MB registry 2 708bc6af7e5e 4 months ago 25.8MB
Deploy Kolla Openstack Cluster
Generate password
1
kolla-genpwd
Configuration
1 2 3
sudo su cp /etc/kolla/globals.yml /etc/kolla/globals.yml.original vim /etc/kolla/globals.yml
root@operator:/etc/kolla# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e8f160fbd3fd operator.local:4000/lokolla/ubuntu-binary-rabbitmq:9.1.0 "dumb-init --single-…" About a minute ago Restarting (1) 28 seconds ago
root@operator:/etc/kolla# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7cfde211e496 operator.local:4000/lokolla/ubuntu-binary-horizon:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days horizon 2e3ada5b2cdc operator.local:4000/lokolla/ubuntu-binary-heat-engine:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days heat_engine eadd81997eef operator.local:4000/lokolla/ubuntu-binary-heat-api-cfn:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days heat_api_cfn f672776e5016 operator.local:4000/lokolla/ubuntu-binary-heat-api:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days heat_api 306e2ea602ca operator.local:4000/lokolla/ubuntu-binary-neutron-metadata-agent:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days neutron_metadata_agent fec8dd1a453e operator.local:4000/lokolla/ubuntu-binary-neutron-l3-agent:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days neutron_l3_agent 61ea63284f97 operator.local:4000/lokolla/ubuntu-binary-neutron-dhcp-agent:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days neutron_dhcp_agent 8fa34d62a754 operator.local:4000/lokolla/ubuntu-binary-neutron-linuxbridge-agent:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days neutron_linuxbridge_agent de7ed9268b49 operator.local:4000/lokolla/ubuntu-binary-neutron-server:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days neutron_server e49be1d477cb operator.local:4000/lokolla/ubuntu-binary-nova-compute:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_compute cbc188c0a8a1 operator.local:4000/lokolla/ubuntu-binary-nova-libvirt:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_libvirt af34d5d17a15 operator.local:4000/lokolla/ubuntu-binary-nova-ssh:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_ssh 9125b5301adc operator.local:4000/lokolla/ubuntu-binary-nova-novncproxy:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_novncproxy aa7f19fc8079 operator.local:4000/lokolla/ubuntu-binary-nova-conductor:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_conductor 43269b434d5c operator.local:4000/lokolla/ubuntu-binary-nova-api:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_api 650dbf084fa7 operator.local:4000/lokolla/ubuntu-binary-nova-scheduler:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days nova_scheduler f84e5f5443ec operator.local:4000/lokolla/ubuntu-binary-placement-api:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days placement_api 34af2bc9124e operator.local:4000/lokolla/ubuntu-binary-glance-api:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days glance_api 1ed48ba03c97 operator.local:4000/lokolla/ubuntu-binary-keystone-fernet:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days keystone_fernet a7a3b569ae2f operator.local:4000/lokolla/ubuntu-binary-keystone-ssh:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days keystone_ssh e5d4b0e94e2e operator.local:4000/lokolla/ubuntu-binary-keystone:9.1.0 "dumb-init --single-…" 4 days ago Up 4 days keystone 820e8bf1c713 operator.local:4000/lokolla/ubuntu-binary-rabbitmq:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days rabbitmq 87d818f7aee9 operator.local:4000/lokolla/ubuntu-binary-memcached:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days memcached 36c9d3b5ec48 operator.local:4000/lokolla/ubuntu-binary-mariadb:9.1.0 "dumb-init -- kolla_…" 9 days ago Up 4 days mariadb f34118e04e65 operator.local:4000/lokolla/ubuntu-binary-keepalived:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days keepalived 4a835502bbc6 operator.local:4000/lokolla/ubuntu-binary-haproxy:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days haproxy 6048403886a0 operator.local:4000/lokolla/ubuntu-binary-chrony:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days chrony 20c995a51ddd operator.local:4000/lokolla/ubuntu-binary-cron:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days cron 77670d8cafe8 operator.local:4000/lokolla/ubuntu-binary-kolla-toolbox:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days kolla_toolbox 93426ea2dae4 operator.local:4000/lokolla/ubuntu-binary-fluentd:9.1.0 "dumb-init --single-…" 9 days ago Up 4 days fluentd f9208a01d0ec registry:2 "/entrypoint.sh /etc…" 10 days ago Up 4 days 0.0.0.0:4000->5000/tcp registry