This repository contains a set of Ansible playbooks that will spawn and configure VMs (currently supporting libvirt only) to deploy Kolla.
- Libvirt
- Including
libvirt-dev
sudo apt install qemu qemu-kvm libvirt-dev
- Including
- Virt-manager (optional)
sudo apt install virt-manager
- Kolla image
- 3 NAT networks - Guide
- nat1:
192.168.122.0/24
for SSH and Ansible - nat2:
192.168.123.0/24
for OpenStack management network - nat3:
192.168.100.0/24
for Neutron networking
virsh net-define libvirt/nat1.xml && virsh net-start nat1 virsh net-define libvirt/nat2.xml && virsh net-start nat2 virsh net-define libvirt/nat3.xml && virsh net-start nat3
- You can use libvirt
default
instead of one of the NATs
- nat1:
- Ansible
pip install ansible
- Kolla Ansible source code
git clone https://opendev.org/openstack/kolla-ansible.git
- Copy SSH key from
ssh/id_kolla
to your~/.ssh
directorycp ssh/id_kolla ~/.ssh
- Python libraries:
pip install libvirt-python
pip install lxml
-
Edit the example user config and options are documented in config examples.
-
- This is the configuration file of Kolla - Read the Docs
- One of the most important options is
kolla_internal_vip_address
, which should be any NOT USED address in the nat2 range, e.g.,
kolla_internal_vip_address: 192.168.123.200 # The default
The builder
script is used to manage nodes with ansible-playbook
.
To spawn a node or nodes, run:
./builder spawn user/local-aio.yml
If you want to spawn the nodes on a remote server, use the -r
option:
./builder -r spawn user/remote-multinode.yml
Note: Only run the
spawn
action once to create the nodes. You need to delete them before running again.
Once the nodes are booted, prepare them by running:
./builder prepare user/local-aio.yml
If you need to update something on the nodes, run the prepare action again:
./builder prepare user/local-aio.yml
- For aio deployment
ssh -F ssh_config openstack-aio
# or whatever you named your node
- For multinode deployment
ssh -F ssh_config openstack-deployment
# or whatever you named your deploy node
If you are using the remote option and need to configure a reverse proxy, run:
./builder -r nginx user/remote-aio.yml
- You can try the deploy script which is already on the node
./deploy
-
If that fails, investigate the issue. Sometimes you just have to run the script again. If it doesn't help, see the next section.
-
Otherwise reffer to Quick start for development
- You can use kolla-builder to spawn Kolla on a remote server/cloud instance
- Edit remote inventory and add your server
PUBLIC.IP.OF.REMOTE ansible_ssh_user=ubuntu ansible_become=True ansible_private_key_file=/path/to/your/ssh_key
- If you use a remote Openstack instance, you need:
- Network setup that allows outside connection
- SSH keypair
- Floating IP
- Security group rules allow:
- Egress for all connections
- Ingress for SSH(22)
- Ingress for HTTP(80)/HTTPS(443) to access Horizon from local browser
- Ingress for any additional port you reverse proxy to
- All the prerequisites must be installed on the instance
To delete all nodes, use the delete action:
./builder delete user/local-multinode.yml
or for remote libvirt host
./builder -r delete user/local-multinode.yml