Ansible is a configuration management tool with built in OpenStack support. Using Ansible, you can deploy and manage instances on DreamCompute. This tutorial explains how to install Ansible and use it to launch an instance on DreamCompute.

This tutorial uses Ubuntu 16.04 (Xenial Xerus) as the host to run Ansible playbooks. First, install a few packages using the following command.

[user@localhost]$ sudo apt-get install -y ansible python2.7 python-virtualenv python-pip

If you are not using Ubuntu 16.04, you can read http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-pip to figure out how to install ansible on your system

Ansible depends on 'shade' which is a Python client library for interacting with OpenStack. Create a virtual environment and use pip to install 'shade'.

[user@localhost]$ virtualenv venv -p /usr/bin/python [user@localhost]$ source venv/bin/activate (venv)user@localhost]$ pip install shade

Now you have 'shade' installed and are ready to start writing Ansible playbooks.