tacker/vagrant/devstack
Yasufumi Ogawa 9c9a31e4f5 Introduce vagrant for devstack
This update is for providing a dedicated devstack installer for Tacker.
It is configurable for supporting several usecases, such as multiple
nodes configuration. It's also supports both of default distros in
OpenStack, Ubuntu 20.04 (focal) and CentOS Stream 8 currently.
You can find usages in the contributor guide `Devstack Installation
with Vagrant`.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Implements: bp intro-tacker-installer
Change-Id: I2f9fcf0811c41d9278df79b5a7e60d608d23cd76
2022-03-10 19:30:49 +09:00
..
group_vars Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
helper Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
lib Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
roles Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
samples Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
.gitignore Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
README.md Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
Vagrantfile Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
ansible.cfg Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
hosts Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00
site.yaml Introduce vagrant for devstack 2022-03-10 19:30:49 +09:00

README.md

vagrant-devstack

What is this

Deployment tool for devstack for testing multi-VM OpenStack environment, consists of vagrant and ansible.

It only supports Ubuntu on VirtualBox currently.

How to use

Requirements

You need to install required software before running this tool. Please follow instructions on official sites for installation.

Before launching your VMs, you should should install plugin vagrant-disksize for expanding size of volume of VM. It is because the default size of box provided from Ubuntu, 10GB or so, is not enough for deploying devstack environment. It's required for expanding the volume size.

$ vagrant plugin install vagrant-disksize

Configure and Fire Up VMs

Before launching VMs with vagrant, configure machines.yml, which defines parameters of each VM you deploy. It should be placed at project root, or failed to run vagrant up. You can use template files in samples directory.

$ cp samples/machines.yml .
$ YOUR_FAVORITE_EDITOR machines.yml

You should take care about private_ips which is used in hosts for ansible-playbook as explained later.

You should confirm you have a SSH public key before you run vagrant. If your key is different from ~/.ssh/id_rsa.pub, update ssh_pub_key in machines.yml.

Run vagrant up after configurations are done. It launches VMs and create a user stack on them.

$ vagrant up

If vagrant up is completed successfully, you are ready to login to VMs as stack user with your SSH public key.

Setup Devstack

This tool provides ansible playbooks for setting up devstack. You should update entries of IP addresses in hosts as you defined private_ips in machines.yml.

There are some parameters in group_vars/all.yml such as password on devstack or optional configurations. You don't need to update it usually.

$ ansible-playbook -i hosts site.yml

After finished ansible's tasks, you can login to launched VMs. So, login to controller node and run stack.sh for installing OpenStack. You will find that local.conf is prepared for your environment by using its example. See instruction how to configure local.conf described in DevStack Quick Start if you customize it by yourself.

$ ssh stack@192.168.33.11
$ cd devstack
$ YOUR_FAVORITE_EDITOR local.conf
$ ./stack.sh