devstack with Vagrant and libvirt
What's This About?
The purpose of this project is to easily fire up a VM with a running OpenStack inside, ready to accept deployments of Kubernetes clusters. OpenStack is provisioned inside the VM via devstack. The VM itself is created with Vagrant and libvirt.
Minimum Requirements
- Ram: 8GB
- Disc: 50GB
- CPUs: 4 Cores
Preparation of Ubuntu 14.04.3 Host
libvirt
sudo apt-get install libvirt-bin qemu qemu-system-x86Vagrant 1.8.1+
Download from website, then:
sudo dpkg -i vagrant_1.8.1_x86_64.deb
sudo apt-get install libvirt-dev
vagrant plugin install vagrant-libvirt
vagrant plugin install vagrant-host-shell
vagrant plugin install vagrant-reloadAnsible 1.9+
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
For older versions of Ubuntu
sudo apt-get remove pip
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install pip
sudo pip install ansible
Reboot system.
Preparation of CentOS 7 Host
Add epel repository:
sudo yum install epel-release
libvirt
sudo yum install libvirt qemu qemu-system-x86Install Vagrant 1.8.1+
Download from website, then:
sudo yum install vagrant_1.8.1_x86_64.rpm
sudo yum install gcc libvirt-devel
vagrant plugin install vagrant-libvirt
vagrant plugin install vagrant-host-shell
vagrant plugin install vagrant-reload
Ansible 1.9+
sudo yum install ansible
Reboot the system
Gotchas
Vagrant usually stores machine images underneath /var, so please make sure that you have at least 30GB of free space on the file system that is hosting /var.
Ready... Set... Go...
Start the provisioning of devstack in the VM with:
vagrant up --provider libvirtEnvironment Variables
DEVSTACK_MEMhow much RAM to give to the VM, in MB, defaults to6144MBDEVSTACK_CPUShow many CPUs to give to the VM, defaults to4
So for custom memory and CPUs, you could do:
DEVSTACK_MEM=8192 DEVSTACK_CPUS=6 vagrant up --provider libvirtBasic Usage
Horizon is running on port 80, user demo or admin, password secretsecret. To check on the VM's IP address, you can do:
vagrant ssh
ifconfig eth0After restarting the physical host, the VM unfortunately must be provisioned again:
vagrant destroy
vagrant up##License Apache