Vagrant: Use the IP address from eth1

Make sure to use the IP address from eth1 for all OpenStack services.
This is the private IP address which is accessible from the host running
Vagrant.

Fixup the names of the two compute nodes to be independent.

Change-Id: I8a62e8ba09bfd4321d36ea1f7013ea2188e11d19
Signed-off-by: Kyle Mestery <mestery@mestery.com>
This commit is contained in:
Kyle Mestery 2016-01-03 07:01:13 -06:00
parent 5e5b49fe44
commit ffd28c7a76
3 changed files with 35 additions and 2 deletions

View File

@ -3,4 +3,18 @@ cp /dragonflow/doc/source/multi-node-conf/compute_node_local_controller.conf ~/d
if [ "$1" != "" ]; then
sed -i -e 's/<IP address of host running everything else>/'$1'/g' ~/devstack/local.conf
fi
# Get the IP address
ipaddress=$(/sbin/ifconfig eth1 | grep 'inet addr' | awk -F' ' '{print $2}' | awk -F':' '{print $2}')
# Adjust some things in local.conf
cat << DEVSTACKEOF >> devstack/local.conf
# Set this to the address of the main DevStack host running the rest of the
# OpenStack services.
Q_HOST=$1
HOST_IP=$ipaddress
HOSTNAME=$(hostname)
DEVSTACKEOF
~/devstack/stack.sh

View File

@ -1,3 +1,22 @@
#!/usr/bin/env bash
cp /dragonflow/doc/source/multi-node-conf/controller_node_local_controller.conf ~/devstack/local.conf
# Get the IP address
ipaddress=$(/sbin/ifconfig eth1 | grep 'inet addr' | awk -F' ' '{print $2}' | awk -F':' '{print $2}')
# 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
# Good to set these
HOST_IP=$ipaddress
HOSTNAME=$(hostname)
SERVICE_HOST_NAME=${HOSTNAME}
SERVICE_HOST=$ipaddress
DEVSTACKEOF
~/devstack/stack.sh

View File

@ -6,12 +6,12 @@ devstack_controller:
memory: 8192
cpus: 2
devstack_compute1:
host_name: compute.devstack.dev
host_name: compute1.devstack.dev
ip: "192.168.33.102"
memory: 1024
cpus: 1
devstack_compute2:
host_name: compute.devstack.dev
host_name: compute2.devstack.dev
ip: "192.168.33.103"
memory: 1024
cpus: 1