openstack-salt/doc/source/develop/quickstart-vagrant.rst

5.1 KiB

Home OpenStack-Salt Development Documentation

OpenStack-Salt Vagrant deployment

All-in-one (AIO) deployments are a great way to setup an OpenStack-Salt cloud for:

  • a service development environment
  • an overview of how all of the OpenStack services and roles play together
  • a simple lab deployment for testing

Although AIO builds aren't suitable for large production deployments, they're great for small proof-of-concept deployments.

It's strongly recommended to have hardware that meets the following requirements before starting an AIO deployment:

Vagrant setup

Installing Vagrant is extremely easy for many operating systems. Go to the Vagrant downloads page and get the appropriate installer or package for your platform. Install the package using standard procedures for your operating system.

The installer will automatically add vagrant to your system path so that it is available in shell. Try logging out and logging back in to your system (this is particularly necessary sometimes for Windows) to get the updated system path up and running.

First we will install vagrant-salt plugin for minion configuration.

$ vagrant plugin install vagrant-salt

Add the generic ubuntu1404 image for virtualbox virtualization.

$ vagrant box add ubuntu/trusty64

==> box: Loading metadata for box 'ubuntu/trusty64'
    box: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> box: Adding box 'ubuntu/trusty64' (v20160122.0.0) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20160122.0.0/providers/virtualbox.box
==> box: Successfully added box 'ubuntu/trusty64' (v20160122.0.0) for 'virtualbox'!

Environment setup

The environment consists of three nodes.

FQDN Role IP
config.openstack.local Salt master node 10.10.10.200
control.openstack.local OpenStack control node 10.10.10.201
compute.openstack.local OpenStack compute node 10.10.10.202

Minion configuration files

Prepare basic configuration files for each node deployed.

Set /srv/vagrant-openstack/minions/config.conf to following:

/_static/scripts/minions/config.conf

Set /srv/vagrant-openstack/minions/control.conf to following:

/_static/scripts/minions/control.conf

Set /srv/vagrant-openstack/minions/compute.conf to following content:

/_static/scripts/minions/compute.conf

Vagrant configuration file

The main vagrant configuration for OpenStack-Salt deployment is located at /srv/vagrant-openstack/Vagrantfile.

/_static/scripts/Vagrantfile

Salt master bootstrap file

The salt-master bootstrap is located at /srv/vagrant-openstack/bootstrap-salt-master.sh and it needs to be placed at the vagrant-openstack folder to be accessible from the virtual machine.

/_static/scripts/bootstrap/salt-master-pkg.sh

Launching the Vagrant nodes

Check the status of the deployment environment.

$ cd /srv/vagrant-openstack
$ vagrant status

Current machine states:

openstack_config          not created (virtualbox)
openstack_control         not created (virtualbox)
openstack_compute         not created (virtualbox)

Setup OpenStack-Salt config node, launch it and connect to it using following commands, it cannot be provisioned by vagrant salt, as the salt master is not configured yet.

$ vagrant up openstack_config
$ vagrant ssh openstack_config

Bootstrap the salt master service on the config node, it can be configured with following parameters:

$ cd /vagrant

$ export RECLASS_ADDRESS=https://github.com/tcpcloud/workshop-salt-model.git
$ export CONFIG_HOST=config.openstack.local

# to deploy salt-master from packages, run:

$ ./bootstrap-salt-master-pkg.sh

# to deploy salt-master from git, run:

$ ./bootstrap-salt-master-git.sh

Now setup the OpenStack-Salt control node. Launch it and provision using following command:

$ vagrant up openstack_control
$ vagrant provision openstack_control

Now setup the OpenStack-Salt compute node. Launch it and provision using following command:

$ vagrant up openstack_compute
$ vagrant provision openstack_compute

The installation is now over, you should be able to access the user interface of cloud deployment at