Add all-in-one vagrant config
Add the ability to launch an all-in-one dragonflow vm via vagrant The syntax of the launch is: vagrant up devstack_aio Change-Id: Ia086a374fc3e9e21ead04cc9e8da51eb6a03281c
This commit is contained in:
parent
64ce5f452d
commit
91676a9aed
|
@ -17,25 +17,30 @@ Copy one of the following as your local.conf to your devstack folder
|
|||
ready to move packets. You can see `Testing and Debugging
|
||||
<testing_and_debugging.rst>`_ to test and troubleshoot the deployment.
|
||||
|
||||
==========================================
|
||||
Automated setup using Vagrant + Virtualbox
|
||||
==========================================
|
||||
=============================
|
||||
Automated setup using Vagrant
|
||||
=============================
|
||||
|
||||
This will create a 3 node devstack (controller + two computes), where Dragonflow is used as
|
||||
the Open vSwitch backend.
|
||||
|
||||
Vagrant allows to configure the provider on which the virtual machines are
|
||||
created. Virtualbox is the default provider used to launch the VM's on a
|
||||
developer computer, but other providers can be used: VMWare, AWS, OpenStack,
|
||||
developer computer, but other providers can be used: libvirt, VMWare, AWS, OpenStack,
|
||||
containers stuff, ...
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
||||
1. Install Virtualbox (https://www.virtualbox.org/wiki/Downloads) and Vagrant
|
||||
(https://www.vagrantup.com/downloads.html).
|
||||
1. Install a Hypervisor if not already installed
|
||||
|
||||
2. Configure
|
||||
1.1. For Virtualbox - https://www.virtualbox.org/wiki/Downloads
|
||||
|
||||
1.2. For libvirt - use you Linux distribution manuals
|
||||
|
||||
2. Install Vagrant - https://www.vagrantup.com/downloads.html
|
||||
|
||||
3. Configure
|
||||
|
||||
::
|
||||
|
||||
|
@ -44,17 +49,45 @@ Quick Start
|
|||
vagrant plugin install vagrant-cachier
|
||||
vagrant plugin install vagrant-vbguest
|
||||
|
||||
3. Adjust the settings in `vagrant/provisioning/dragonflow.conf.yml` if needed (5GB RAM is the
|
||||
minimum to get 1 VM running on the controller node)
|
||||
4. | For full install with a controller node and 2 compute nodes follow step 4.1;
|
||||
| For a minimal install with All-In-One setup, follow step 4.2
|
||||
|
||||
4. Launch the VM's: `vagrant up`
|
||||
4.1. Adjust the settings in `vagrant/provisioning/dragonflow.conf.yml` if
|
||||
needed (5GB RAM is the minimum to get 1 VM running on the controller
|
||||
node)
|
||||
|
||||
... This may take a while, once it is finished:
|
||||
* Launch the VM's: `vagrant up`
|
||||
|
||||
* you can ssh into the virtual machines: `vagrant ssh devstack_controller`,
|
||||
`vagrant ssh devstack_compute1` or `vagrant ssh devstack_compute2`
|
||||
* This may take a while, once it is finished:
|
||||
|
||||
* you can access the horizon dashboard at http://controller.devstack.dev
|
||||
* You can ssh into the virtual machines:
|
||||
`vagrant ssh devstack_controller`, `vagrant ssh devstack_compute1`
|
||||
or `vagrant ssh devstack_compute2`
|
||||
|
||||
* You can access the horizon dashboard at
|
||||
http://controller.devstack.dev
|
||||
|
||||
* The dragonflow folder is shared between the host and the two nodes
|
||||
(at /home/vagrant/dragonflow)
|
||||
|
||||
* When you are done with the setup, you can remove the VMs:
|
||||
`vagrant destroy`
|
||||
|
||||
4.2. Adjust the settings in `vagrant/provisioning/dragonflow.conf.yml` if
|
||||
needed
|
||||
|
||||
* Launch the VM: `vagrant up devstack_aio`
|
||||
|
||||
* This may take a while, once it is finished:
|
||||
|
||||
* You can ssh into the virtual machine: `vagrant ssh devstack_aio`
|
||||
|
||||
* You can access the horizon dashboard at
|
||||
http://allinone.devstack.dev
|
||||
|
||||
* The dragonflow folder is shared between the host and the VM (at
|
||||
/home/vagrant/dragonflow)
|
||||
|
||||
* When you are done with the setup, you can remove the VM:
|
||||
`vagrant destroy devstack_aio`
|
||||
|
||||
* the dragonflow folder is shared between the host and the two nodes (at
|
||||
/home/vagrant/dragonflow)
|
||||
|
|
|
@ -78,4 +78,25 @@ Vagrant.configure(2) do |config|
|
|||
end
|
||||
end
|
||||
|
||||
# Define the Devstack All-In-One node on Hypervisor
|
||||
config.vm.define "devstack_aio", autostart: false do |devstack_aio|
|
||||
devstack_aio.vm.host_name = vagrant_config['devstack_aio']['host_name']
|
||||
devstack_aio.vm.network "private_network", ip:vagrant_config['devstack_aio']['ip']
|
||||
devstack_aio.vm.provision "shell", path: "provisioning/setup-base.sh", privileged: false
|
||||
devstack_aio.vm.provision "shell", path: "provisioning/setup-aio.sh", privileged: false
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = vagrant_config['devstack_aio']['memory']
|
||||
vb.cpus = vagrant_config['devstack_aio']['cpus']
|
||||
end
|
||||
config.vm.provider 'parallels' do |vb|
|
||||
vb.memory = vagrant_config['devstack_aio']['memory']
|
||||
vb.cpus = vagrant_config['devstack_aio']['cpus']
|
||||
end
|
||||
config.vm.provider 'libvirt' do |vb|
|
||||
vb.memory = vagrant_config['devstack_aio']['memory']
|
||||
vb.cpus = vagrant_config['devstack_aio']['cpus']
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -15,3 +15,8 @@ devstack_compute2:
|
|||
ip: "192.168.33.103"
|
||||
memory: 1024
|
||||
cpus: 1
|
||||
devstack_aio:
|
||||
host_name: allinone.devstack.dev
|
||||
ip: "192.168.33.201"
|
||||
memory: 8192
|
||||
cpus: 2
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
cp /dragonflow/doc/source/single-node-conf/etcd_local_controller.conf ~/devstack/local.conf
|
||||
|
||||
# Get the IP address
|
||||
ipaddress=$(ifconfig eth1 2>/dev/null|awk '/inet addr:/ {split($2,a,":"); print a[2]}')
|
||||
|
||||
SED_SCRIPT="s/df-zmq-publisher-service/df-etcd-pubsub-service/g"
|
||||
|
||||
sed -i -e "$SED_SCRIPT" devstack/local.conf
|
||||
|
||||
# Adjust some things in local.conf
|
||||
cat << DEVSTACKEOF >> devstack/local.conf
|
||||
|
||||
# Adjust this in case we're running on a cloud which may use 10.0.0.x
|
||||
# for VM IP addresses
|
||||
NETWORK_GATEWAY=10.100.100.100
|
||||
FIXED_RANGE=10.100.100.0/24
|
||||
|
||||
HOST_IP=$ipaddress
|
||||
|
||||
# Good to set these
|
||||
HOSTNAME=$(hostname)
|
||||
SERVICE_HOST_NAME=\${HOSTNAME}
|
||||
SERVICE_HOST=$ipaddress
|
||||
DEVSTACKEOF
|
||||
|
||||
# Patch to enable IPv6
|
||||
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
||||
sudo echo "net.ipv6.conf.all.disable_ipv6 = 0" >> /etc/sysctl.conf
|
||||
|
||||
~/devstack/stack.sh
|
Loading…
Reference in New Issue