Vagrant, Heat deployments
This commit is contained in:
parent
24cebe542c
commit
7c183fe693
|
@ -1,7 +1,7 @@
|
|||
`Home <index.html>`_ OpenStack-Salt Development Documentation
|
||||
|
||||
Heat Stack deployment
|
||||
=====================
|
||||
OpenStack-Salt Heat deployment
|
||||
==============================
|
||||
|
||||
All-in-one (AIO) deployments are a great way to setup an OpenStack-Salt cloud for:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
`Home <index.html>`_ OpenStack-Salt Development Documentation
|
||||
|
||||
Vagrant deployment
|
||||
==================
|
||||
OpenStack-Salt AIO Vagrant deployment
|
||||
=====================================
|
||||
|
||||
All-in-one (AIO) deployments are a great way to setup an OpenStack-Salt cloud for:
|
||||
|
||||
|
@ -9,15 +9,84 @@ All-in-one (AIO) deployments are a great way to setup an OpenStack-Salt cloud fo
|
|||
* an overview of how all of the OpenStack services and roles play together
|
||||
* a simple lab deployment for testing
|
||||
|
||||
Although AIO builds aren't recommended for large production deployments,
|
||||
they're great for smal proof-of-concept deployments.
|
||||
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 build:
|
||||
It's strongly recommended to have hardware that meets the following requirements before starting an AIO deployment:
|
||||
|
||||
* CPU that supports `hardware-assisted virtualization`_
|
||||
* CPU with `hardware-assisted virtualization`_ support
|
||||
* At least 80GB disk space
|
||||
* 16GB RAM
|
||||
* 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.
|
||||
|
||||
First we will install vagrant-salt plugin for minion configuration.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ vagrant plugin install vagrant-salt
|
||||
|
||||
|
||||
Environment setup
|
||||
-----------------
|
||||
|
||||
The environment consists of 3 nodes:
|
||||
|
||||
* config: Salt master node, IP: 10.10.10.200
|
||||
* control: OpenStack control node, IP: 10.10.10.201
|
||||
* compute: OpenStack compute node, IP: 10.10.10.202
|
||||
|
||||
Minion configuration files
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Prepare basic configuration files for each node deployed.
|
||||
|
||||
Set ``/srv/vagrant-openstack/minion/config.conf`` to following:
|
||||
|
||||
.. literalinclude:: ../../../scripts/vagrant-openstack/config.conf
|
||||
:language: yaml
|
||||
:linenos:
|
||||
|
||||
Set ``/srv/vagrant-openstack/minion/control.conf`` to following:
|
||||
|
||||
.. literalinclude:: ../../../scripts/vagrant-openstack/control.conf
|
||||
:language: yaml
|
||||
:linenos:
|
||||
|
||||
Set ``/srv/vagrant-openstack/minion/compute.conf`` to following content:
|
||||
|
||||
.. literalinclude:: ../../../scripts/vagrant-openstack/compute.conf
|
||||
:language: yaml
|
||||
:linenos:
|
||||
|
||||
Vagrant configuration file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This configuration is positioned at ``/srv/vagrant-openstack/Vagrantfile``.
|
||||
|
||||
.. literalinclude:: ../../../scripts/vagrant-openstack/Vagrantfile
|
||||
:language: ruby
|
||||
:linenos:
|
||||
|
||||
Launching the Vagrant nodes
|
||||
---------------------------
|
||||
|
||||
First we setup openstack config node. Launch the node using vagrant command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd /srv/vagrant-openstack
|
||||
$ vagrant up openstack_config
|
||||
$ vagrant ssh openstack_config
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd /srv/vagrant-openstack
|
||||
$ vagrant show
|
||||
|
||||
.. _hardware-assisted virtualization: https://en.wikipedia.org/wiki/Hardware-assisted_virtualization
|
||||
|
||||
.. _Vagrant downloads page: https://www.vagrantup.com/downloads.html
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
boxes = {
|
||||
'virtualbox-ubuntu1404-salt' => {
|
||||
'name' => 'virtualbox-ubuntu1404-salt',
|
||||
'url' => 'file:///srv/packer/build/virtualbox/ubuntu1404-salt-current.box'
|
||||
},
|
||||
}
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
config.vm.define :config_vm do |config_vm|
|
||||
|
||||
config_vm.vm.hostname = 'config.openstack.local'
|
||||
config_vm.vm.box = 'virtualbox-ubuntu1404-salt'
|
||||
config_vm.vm.box_url = boxes['virtualbox-ubuntu1404-salt']['url']
|
||||
config_vm.vm.network :private_network, ip: "10.10.10.200"
|
||||
|
||||
config_vm.vm.provider :virtualbox do |vb|
|
||||
vb.customize ["modifyvm", :id, "--memory", 512]
|
||||
vb.customize ["modifyvm", :id, "--cpus", 1]
|
||||
vb.name = 'openstack-config'
|
||||
vb.gui = false
|
||||
end
|
||||
|
||||
config_vm.vm.provision :salt do |salt|
|
||||
salt.minion_config = "/srv/vagrant-openstack/minion/compute.conf"
|
||||
salt.colorize = true
|
||||
salt.bootstrap_options = "-F -c /tmp -P"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
config.vm.define :control_vm do |control_vm|
|
||||
|
||||
control_vm.vm.hostname = 'control.openstack.local'
|
||||
control_vm.vm.box = 'virtualbox-ubuntu1404-salt'
|
||||
control_vm.vm.box_url = boxes['virtualbox-ubuntu1404-salt']['url']
|
||||
control_vm.vm.network :private_network, ip: "10.10.10.201"
|
||||
|
||||
control_vm.vm.provider :virtualbox do |vb|
|
||||
vb.customize ["modifyvm", :id, "--memory", 4096]
|
||||
vb.customize ["modifyvm", :id, "--cpus", 1]
|
||||
vb.name = 'openstack-control'
|
||||
vb.gui = false
|
||||
end
|
||||
|
||||
control_vm.vm.provision :salt do |salt|
|
||||
salt.minion_config = "/srv/vagrant-openstack/minion/control.conf"
|
||||
salt.colorize = true
|
||||
salt.bootstrap_options = "-F -c /tmp -P"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
config.vm.define :compute_vm do |compute_vm|
|
||||
|
||||
compute_vm.vm.hostname = 'compute.openstack.local'
|
||||
compute_vm.vm.box = 'virtualbox-ubuntu1404-salt'
|
||||
compute_vm.vm.box_url = boxes['virtualbox-ubuntu1404-salt']['url']
|
||||
compute_vm.vm.network :private_network, ip: "10.10.10.202"
|
||||
|
||||
compute_vm.vm.provider :virtualbox do |vb|
|
||||
vb.customize ["modifyvm", :id, "--memory", 1024]
|
||||
vb.customize ["modifyvm", :id, "--cpus", 1]
|
||||
vb.name = 'openstack-compute'
|
||||
vb.gui = false
|
||||
end
|
||||
|
||||
compute_vm.vm.provision :salt do |salt|
|
||||
salt.minion_config = "/srv/vagrant-openstack/minion/compute.conf"
|
||||
salt.colorize = true
|
||||
salt.bootstrap_options = "-F -c /tmp -P"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
id: compute.openstack.local
|
||||
|
||||
master: 10.10.10.200
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
id: config.openstack.local
|
||||
|
||||
master: 10.10.10.200
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
id: control.openstack.local
|
||||
|
||||
master: 10.10.10.200
|
Loading…
Reference in New Issue