This repository contains a Vagrantfile and an Ansible playbook that sets up a VirtualBox virtual machine that installs DevStack.
You can configure devstack services by editing the playbook.yml file.
Install the following applications on your local machine first:
Example for ubuntu 14.04 enviroment:
- Linux Ubuntu 14.04
- VirutalBox >= 5.0
- Vagrant >= 1.5.0
- ansible >= 1.8.0
Install VirtualBox
$ sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib' > /etc/apt/sources.list.d/virtualbox.list"
$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install -y virtualbox-5.1
Install Vagrant
$ wget https://releases.hashicorp.com/vagrant/1.8.7/vagrant_1.8.7_x86_64.deb
$ sudo dpkg -i vagrant_1.8.7_x86_64.deb
Install dependencies
$ sudo apt-get install -y python-dev python-virtualenv
$ sudo apt-get install -y libssl-dev libffi-dev
Grab this repo and do a vagrant up
, like so:
git clone https://github.com/wow73611/vagrant-devstack
cd vagrant-devstack
vagrant up
vagrant status
vagrant ssh
vagrant halt
vagrant destroy
The Vagrantfile use config.yml file as default configuration. You can define another configuration file by the following:
export USER_CONF=my.yml && vagrant up
or
USER_CONF=my.yml vagrant up
- URL: http://192.168.10.101
- Username: admin or demo
- Password: password
By default, VMs started by OpenStack will not be able to connect to the internet. If you want your VMs to connect out, and you are running Linux as your host operating system, you must configure your host machine to do network address translation (NAT).
To enable NAT, issue the following commands in your host, as root:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
DevStack configures an internal network ("private") and an external network ("public"), with a router ("router1") connecting the two together. The router is configured to use its interface on the "public" network as the gateway.
vagrant destroy --force && vagrant up