Multiple vpx for xen, post splitting of script
Ensure building, installing multiple nova vms works after we split the build script as build nova vm, install nova vm. Change-Id: Iadb6e181caec511325a30727bf9e9c79e8afea5a
This commit is contained in:
parent
ce59d643f5
commit
e98cc1220e
@ -182,7 +182,7 @@ fi
|
|||||||
if [ -z $PUB_BR ]; then
|
if [ -z $PUB_BR ]; then
|
||||||
PUB_BR=$(xe network-list --minimal uuid=$PUB_NET params=bridge)
|
PUB_BR=$(xe network-list --minimal uuid=$PUB_NET params=bridge)
|
||||||
fi
|
fi
|
||||||
$TOP_DIR/scripts/install-os-vpx.sh -f $XVA -v $VM_BR -m $MGT_BR -p $PUB_BR
|
$TOP_DIR/scripts/install-os-vpx.sh -f $XVA -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -w
|
||||||
|
|
||||||
# If we have copied our ssh credentials, use ssh to monitor while the installation runs
|
# If we have copied our ssh credentials, use ssh to monitor while the installation runs
|
||||||
WAIT_TILL_LAUNCH=${WAIT_TILL_LAUNCH:-1}
|
WAIT_TILL_LAUNCH=${WAIT_TILL_LAUNCH:-1}
|
||||||
|
@ -17,19 +17,19 @@ FLOATING_RANGE=${FLOATING_RANGE:-192.168.1.196/30}
|
|||||||
COMMON_VARS="$STACKSH_PARAMS MYSQL_HOST=$HEAD_MGT_IP RABBIT_HOST=$HEAD_MGT_IP GLANCE_HOSTPORT=$HEAD_MGT_IP:9292 FLOATING_RANGE=$FLOATING_RANGE"
|
COMMON_VARS="$STACKSH_PARAMS MYSQL_HOST=$HEAD_MGT_IP RABBIT_HOST=$HEAD_MGT_IP GLANCE_HOSTPORT=$HEAD_MGT_IP:9292 FLOATING_RANGE=$FLOATING_RANGE"
|
||||||
|
|
||||||
# Helper to launch containers
|
# Helper to launch containers
|
||||||
function build_domU {
|
function build_xva {
|
||||||
GUEST_NAME=$1 PUB_IP=$2 MGT_IP=$3 DO_SHUTDOWN=$4 TERMINATE=$TERMINATE STACKSH_PARAMS="$COMMON_VARS $5" ./build_domU.sh
|
GUEST_NAME=$1 PUB_IP=$2 MGT_IP=$3 DO_SHUTDOWN=$4 TERMINATE=$TERMINATE STACKSH_PARAMS="$COMMON_VARS $5" ./build_xva.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
# Launch the head node - headnode uses a non-ip domain name,
|
# Launch the head node - headnode uses a non-ip domain name,
|
||||||
# because rabbit won't launch with an ip addr hostname :(
|
# because rabbit won't launch with an ip addr hostname :(
|
||||||
build_domU HEADNODE $HEAD_PUB_IP $HEAD_MGT_IP 1 "ENABLED_SERVICES=g-api,g-reg,key,n-api,n-sch,n-vnc,horizon,mysql,rabbit"
|
build_xva HEADNODE $HEAD_PUB_IP $HEAD_MGT_IP 1 "ENABLED_SERVICES=g-api,g-reg,key,n-api,n-sch,n-vnc,horizon,mysql,rabbit"
|
||||||
|
|
||||||
# Wait till the head node is up
|
# Wait till the head node is up
|
||||||
while ! curl -L http://$HEAD_PUB_IP | grep -q username; do
|
#while ! curl -L http://$HEAD_PUB_IP | grep -q username; do
|
||||||
echo "Waiting for head node ($HEAD_PUB_IP) to start..."
|
# echo "Waiting for head node ($HEAD_PUB_IP) to start..."
|
||||||
sleep 5
|
# sleep 5
|
||||||
done
|
#done
|
||||||
|
|
||||||
# Build the HA compute host
|
# Build the HA compute host
|
||||||
build_domU $COMPUTE_PUB_IP $COMPUTE_PUB_IP $COMPUTE_MGT_IP 0 "ENABLED_SERVICES=n-cpu,n-net,n-api"
|
build_xva COMPUTENODE $COMPUTE_PUB_IP $COMPUTE_MGT_IP 0 "ENABLED_SERVICES=n-cpu,n-net,n-api"
|
||||||
|
40
tools/xen/install_domU_multi.sh
Executable file
40
tools/xen/install_domU_multi.sh
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Echo commands
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Head node host, which runs glance, api, keystone
|
||||||
|
HEAD_PUB_IP=${HEAD_PUB_IP:-192.168.1.57}
|
||||||
|
HEAD_MGT_IP=${HEAD_MGT_IP:-172.16.100.57}
|
||||||
|
|
||||||
|
COMPUTE_PUB_IP=${COMPUTE_PUB_IP:-192.168.1.58}
|
||||||
|
COMPUTE_MGT_IP=${COMPUTE_MGT_IP:-172.16.100.58}
|
||||||
|
|
||||||
|
# Networking params
|
||||||
|
FLOATING_RANGE=${FLOATING_RANGE:-192.168.1.196/30}
|
||||||
|
|
||||||
|
# Variables common amongst all hosts in the cluster
|
||||||
|
COMMON_VARS="$STACKSH_PARAMS MYSQL_HOST=$HEAD_MGT_IP RABBIT_HOST=$HEAD_MGT_IP GLANCE_HOSTPORT=$HEAD_MGT_IP:9292 FLOATING_RANGE=$FLOATING_RANGE"
|
||||||
|
|
||||||
|
# Helper to launch containers
|
||||||
|
function install_domU {
|
||||||
|
GUEST_NAME=$1 PUB_IP=$2 MGT_IP=$3 DO_SHUTDOWN=$4 TERMINATE=$TERMINATE STACKSH_PARAMS="$COMMON_VARS $5" ./build_domU.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
# Launch the head node - headnode uses a non-ip domain name,
|
||||||
|
# because rabbit won't launch with an ip addr hostname :(
|
||||||
|
install_domU HEADNODE $HEAD_PUB_IP $HEAD_MGT_IP 1 "ENABLED_SERVICES=g-api,g-reg,key,n-api,n-sch,n-vnc,horizon,mysql,rabbit"
|
||||||
|
|
||||||
|
if [ $HEAD_PUB_IP == "dhcp" ]
|
||||||
|
then
|
||||||
|
guestnet=$(xe vm-list --minimal name-label=HEADNODE params=networks)
|
||||||
|
HEAD_PUB_IP=$(echo $guestnet | grep -w -o --only-matching "3/ip: [0-9,.]*;" | cut -d ':' -f2 | cut -d ';' -f 1)
|
||||||
|
fi
|
||||||
|
# Wait till the head node is up
|
||||||
|
while ! curl -L http://$HEAD_PUB_IP | grep -q username; do
|
||||||
|
echo "Waiting for head node ($HEAD_PUB_IP) to start..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
# Build the HA compute host
|
||||||
|
install_domU COMPUTENODE $COMPUTE_PUB_IP $COMPUTE_MGT_IP 0 "ENABLED_SERVICES=n-cpu,n-net,n-api"
|
@ -38,7 +38,7 @@ usage()
|
|||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
Usage: $0 [-f FILE_PATH] [-d DISK_SIZE] [-v BRIDGE_NAME] [-m BRIDGE_NAME] [-p BRIDGE_NAME]
|
Usage: $0 [-f FILE_PATH] [-d DISK_SIZE] [-v BRIDGE_NAME] [-m BRIDGE_NAME] [-p BRIDGE_NAME]
|
||||||
[-k PARAMS] [-r RAM] [-i|-c] [-w] [-b]
|
[-k PARAMS] [-r RAM] [-i|-c] [-w] [-b] [-l NAME_LABEL]
|
||||||
|
|
||||||
Installs XenServer OpenStack VPX.
|
Installs XenServer OpenStack VPX.
|
||||||
|
|
||||||
@ -60,6 +60,7 @@ cat << EOF
|
|||||||
-k params Specifies kernel parameters.
|
-k params Specifies kernel parameters.
|
||||||
-r MiB Specifies RAM used by the VPX, in MiB.
|
-r MiB Specifies RAM used by the VPX, in MiB.
|
||||||
By default it will take the value from the XVA.
|
By default it will take the value from the XVA.
|
||||||
|
-l name Specifies the name label for the VM.
|
||||||
|
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ EOF
|
|||||||
|
|
||||||
get_params()
|
get_params()
|
||||||
{
|
{
|
||||||
while getopts "hicwbf:d:v:m:p:k:r:" OPTION;
|
while getopts "hicwbf:d:v:m:p:k:r:l:" OPTION;
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h) usage
|
h) usage
|
||||||
@ -126,6 +127,9 @@ get_params()
|
|||||||
v)
|
v)
|
||||||
BRIDGE_V=$OPTARG
|
BRIDGE_V=$OPTARG
|
||||||
;;
|
;;
|
||||||
|
l)
|
||||||
|
NAME_LABEL=$OPTARG
|
||||||
|
;;
|
||||||
?)
|
?)
|
||||||
usage
|
usage
|
||||||
exit
|
exit
|
||||||
@ -443,7 +447,7 @@ else
|
|||||||
|
|
||||||
renumber_system_disk "$vm_uuid"
|
renumber_system_disk "$vm_uuid"
|
||||||
|
|
||||||
nl=$(xe_min vm-list params=name-label uuid=$vm_uuid)
|
nl=${NAME_LABEL:-$(xe_min vm-list params=name-label uuid=$vm_uuid)}
|
||||||
xe vm-param-set \
|
xe vm-param-set \
|
||||||
"name-label=${nl/ import/}" \
|
"name-label=${nl/ import/}" \
|
||||||
other-config:os-vpx=true \
|
other-config:os-vpx=true \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user