Miguel Angel Ajo b47fcb2834 Allow deploying secondary worker and API nodes
This commit introduces a new parameter "OCTAVIA_NODE", which
is standalone by default. Only the main (for ha) or standalone
nodes create resources like accounts, the management network,
images, etc.

We also introduce a multinode vagrant configuration.

A follow up patch will introduce an haproxy in front of the octavia
API endpoints.

Change-Id: I835ee7e0e925232b55f3c14eeed98aeb0f0ce463
2016-07-09 11:33:08 +00:00

51 lines
1.3 KiB
Ruby
Executable File

# -*- mode: ruby -*-
# vi: set ft=ruby :
require '../providers.rb'
Vagrant.configure(2) do |config|
config.vm.define 'main' do |main|
configure_providers(main.vm)
main.vm.network "private_network", ip:"192.168.42.10"
main.vm.hostname = "main"
main.vm.provision "shell", privileged: false, inline: <<-SHELL
#!/usr/bin/env bash
set -e
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install git
git clone https://git.openstack.org/openstack-dev/devstack
cp /vagrant/local.conf ~/devstack
cp /vagrant/local.sh ~/devstack/local-manual.sh
cp /vagrant/webserver.sh ~/devstack
cd ~/devstack
./stack.sh
SHELL
end
config.vm.define 'second' do |second|
configure_providers(second.vm)
second.vm.network "private_network", ip:"192.168.42.11"
second.vm.hostname = "second"
second.vm.provision "shell", privileged: false, inline: <<-SHELL
#!/usr/bin/env bash
set -e
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install git
git clone https://git.openstack.org/openstack-dev/devstack
cp /vagrant/local-2.conf ~/devstack/local.conf
cd ~/devstack
./stack.sh
SHELL
end
end