Auto deploy 2 nginx uwsgi and 1 HA proxy virtual machines with Vagrant and ansible

Article shows us how to deploy Nginx UWSGI backend servers with HA proxy front load balance server. In this article I have used Vagrant with Virtualbox provider and Ansible for provisioning.
Vagrantfile will create 3 virtual machines and do provisioning to all of them. I separated playbook files and roles(with handlers, tasks and templates) for all of them.

Please change SSH path in Vagrantfile to yours with your own image or read the following instructions.

Download image with certificate which, are placed in in ssh-keys folder from link.
Add new box file with “ub14x64” name to your box list.
$ vagrant box add ub14x64

Clone this repository to your user home folder:
$ cd ~/
$ git clone ; cd vagrant-nginx-uwsgi

Put this certificates from the “ssh-keys” folder into your “~/.ssh” folder.
$ cp ssh-keys/* ~/.ssh/

Then start deploy and provisioning virtual machines.
$ vagrant up

At the end send request to the load balancer IP address.
$ curl

Hello ADA University!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s