Sa Pham

Interested in Cloud Computing, Programming and Security.

Install Openstack for Laborator using Ansible

31 Jul 2016 »

#####Install Openstack for LabInstall Openstack for Laborator using Ansibleorator using Ansible

Recently I am studying with ansible and I am working with Openstack. When a new version of Openstack was released, I often install it manual. So I decided to learn ansible to deploy it at automation.

I have writen a ansible-playbook to perform that. I have minimized complex of the playbook.

The scenario is self service network with openvswitch. I deploy that with one controller node and more compute nodes.

You can click here to know the traffic flow of package

The architecture..Source: Openstack Network Guide

####How to play?

You have to install all requirements.

Ansible ( version)

Note: The ansible have an error with openvswitch modules

Let’s clone my repo at github and switch branch
cd openstack-ansible-install
git checkout virtualbox/mitaka

Use your favorite editor to edit Vagrantfile and group_vars/all

  • Edit your bridge card

You have to change bridge card associate with bridge card abovename in your computer. In here I use wlp3s0 which you have to change.

  • Edit IP and gateway for controller node

Open file group_vars/all and change external_address_controller is your controller IP (corresponding with bridge card above). At rest is subnet mask and gateway


Let’s save these files. Open terminal, go to the repo and use vagrant to create your infrastructure.

vagrant up

After some minutes you can check status your infrastructure

Then copy your public key to these servers. If you don’t have it, you can generate by ssh-keygen command.

Use user/password: vagrant

ssh-copy-id [email protected]
ssh-copy-id [email protected]

Finally, Use ansible-playbook to deploy

ansible-playbook -i hosts -s site.yml

Have a coffee during install process.

Wait for install process finish and go to dashboard to create an network and boot an instance

Use user/password: admin/saphi Horizon Address is external address which you setted above.

My address is:

After login


if you want to scale more compute nodes, You can edit Vagrantfile and hosts file. And rerun playbook.