Remove working dir issues from deploy scripts
This lets the deployment scripts not care about the current working dir. It also puts the vms directory in wherever the current working directory actually is, allowing more than one set of stx VMs to be controlled at a time. Change-Id: I21ae6f4e7ea327c62cf04fc877161032daf1223e Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
8e311097e7
commit
e0e60c576b
@ -2,9 +2,9 @@
|
||||
#
|
||||
# cleanup_network.sh - Cleans up network interfaces - not safe to run blindly!
|
||||
|
||||
MY_WORKING_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source ${MY_WORKING_DIR}/functions.sh
|
||||
source ${SCRIPT_DIR}/functions.sh
|
||||
|
||||
NETWORK_DEFAULT=${NETWORK_DEFAULT:-default}
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE=stxbr0}
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MY_WORKING_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source ${MY_WORKING_DIR}/functions.sh
|
||||
source ${SCRIPT_DIR}/functions.sh
|
||||
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
CONTROLLER=${CONTROLLER:-controller-allinone}
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MY_WORKING_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source ${MY_WORKING_DIR}/functions.sh
|
||||
source ${SCRIPT_DIR}/functions.sh
|
||||
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
CONTROLLER=${CONTROLLER:-controller}
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
usage() {
|
||||
echo "$0 [-h] [-i <iso image>]"
|
||||
echo ""
|
||||
@ -38,7 +40,7 @@ CONTROLLER=${CONTROLLER:-controller-allinone}
|
||||
DOMAIN_DIRECTORY=vms
|
||||
DOMAIN_FILE=$DOMAIN_DIRECTORY/$CONTROLLER.xml
|
||||
|
||||
bash destroy_allinone.sh
|
||||
bash ${SCRIPT_DIR}/destroy_allinone.sh
|
||||
|
||||
[ ! -d ${DOMAIN_DIRECTORY} ] && mkdir ${DOMAIN_DIRECTORY}
|
||||
|
||||
@ -49,7 +51,7 @@ for i in {0..1}; do
|
||||
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img 200G
|
||||
ISOIMAGE=${ISOIMAGE}
|
||||
DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml
|
||||
cp controller_allinone.xml ${DOMAIN_FILE}
|
||||
cp ${SCRIPT_DIR}/controller_allinone.xml ${DOMAIN_FILE}
|
||||
sed -i -e "
|
||||
s,NAME,${CONTROLLER_NODE},
|
||||
s,DISK0,/var/lib/libvirt/images/${CONTROLLER_NODE}-0.img,
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#set -x
|
||||
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
usage() {
|
||||
echo "$0 [-h] [-i <iso image>]"
|
||||
echo ""
|
||||
@ -40,7 +42,7 @@ CONTROLLER=${CONTROLLER:-controller}
|
||||
COMPUTE=${COMPUTE:-compute}
|
||||
DOMAIN_DIRECTORY=vms
|
||||
|
||||
bash destroy_standard_controller.sh
|
||||
bash ${SCRIPT_DIR}/destroy_standard_controller.sh
|
||||
|
||||
[ ! -d ${DOMAIN_DIRECTORY} ] && mkdir ${DOMAIN_DIRECTORY}
|
||||
|
||||
@ -50,7 +52,7 @@ for i in {0..1}; do
|
||||
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img 200G
|
||||
ISOIMAGE=${ISOIMAGE}
|
||||
DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml
|
||||
cp controller.xml ${DOMAIN_FILE}
|
||||
cp ${SCRIPT_DIR}/controller.xml ${DOMAIN_FILE}
|
||||
sed -i -e "
|
||||
s,NAME,${CONTROLLER_NODE},
|
||||
s,DISK0,/var/lib/libvirt/images/${CONTROLLER_NODE}-0.img,
|
||||
@ -76,7 +78,7 @@ for i in {0..1}; do
|
||||
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${COMPUTE_NODE}-0.img 200G
|
||||
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${COMPUTE_NODE}-1.img 200G
|
||||
DOMAIN_FILE=${DOMAIN_DIRECTORY}/${COMPUTE_NODE}.xml
|
||||
cp compute.xml ${DOMAIN_FILE}
|
||||
cp ${SCRIPT_DIR}/compute.xml ${DOMAIN_FILE}
|
||||
sed -i -e "
|
||||
s,NAME,${COMPUTE_NODE},;
|
||||
s,DISK0,/var/lib/libvirt/images/${COMPUTE_NODE}-0.img,;
|
||||
|
Loading…
Reference in New Issue
Block a user