5.4 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:
- CPU with hardware-assisted virtualization support
- At least 80GB disk space
- 8GB RAM
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.
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
Download openstack-salt
Look at configuration files for each node deployed.
scripts/minions/config.conf configuration:
/_static/scripts/minions/config.conf
scripts/minions/control.conf configuration:
/_static/scripts/minions/control.conf
scripts/minions/compute.conf configuration:
/_static/scripts/minions/compute.conf
Vagrant configuration file
The main vagrant configuration for OpenStack-Salt deployment is
located at scripts/Vagrantfile.
/_static/scripts/Vagrantfile
Salt master bootstrap from package
The salt-master bootstrap is located at
scripts/bootstrap/salt- master-pkg.sh and is accessible
from the virtual machine at
/vagrant /bootstrap/salt-master-pkg.sh.
/_static/scripts/bootstrap/salt-master-pkg.sh
Salt master pip based bootstrap
The salt-master bootstrap is located at
scripts/bootstrap/salt- master- pip.sh and is accessible
from the virtual machine at
/vagrant/bootstrap /salt-master-pip.sh.
/_static/scripts/bootstrap/salt-master-pip.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_configBootstrap Salt master
Bootstrap the salt master service on the config node, it can be configured with following parameters:
$ export RECLASS_ADDRESS=https://github.com/tcpcloud/openstack-salt-model.git
$ export CONFIG_HOST=config.openstack.localTo deploy salt-master from packages, run on config node:
$ /vagrant/bootstrap/salt-master-pkg.shTo deploy salt-master from pip, run on config node:
$ /vagrant/bootstrap/salt-master-pip.shNow setup the OpenStack-Salt control node. Launch it using following command:
$ vagrant up openstack_controlNow setup the OpenStack-Salt compute node. Launch it using following command:
$ vagrant up openstack_computeTo orchestrate the services accross all nodes, run following command on config node:
$ salt-run state.orchestrate orchestrateThe installation is now over, you should be able to access the user interface of cloud deployment at your control node.