tools/deployment/libvirt/setup_allinone.sh
Abraham Arce 787d7f1f2e [Doc] Controller Identity Nodes Common Code
The creation and removal of the Controller identity nodes are common
between all-in-one and standard controller configuration setups:

  -  create_controller
  -  destroy_controller

Make both scripts shared same code located at a common functions
file.

Change-Id: I2ff7d43bd01a2a40264c442d8031a83e1dbbfadb
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-11-20 07:43:51 -06:00

38 lines
737 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
source ${SCRIPT_DIR}/functions.sh
while getopts "i:" o; do
case "${o}" in
i)
ISOIMAGE=$(readlink -f "$OPTARG")
;;
*)
usage
exit 1
;;
esac
done
shift $((OPTIND-1))
if [ -z "${ISOIMAGE}" ]; then
usage
exit -1
fi
iso_image_check ${ISOIMAGE}
CONFIGURATION="allinone"
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
CONTROLLER=${CONTROLLER:-controller}
DOMAIN_DIRECTORY=vms
bash ${SCRIPT_DIR}/destroy_allinone.sh
[ ! -d ${DOMAIN_DIRECTORY} ] && mkdir ${DOMAIN_DIRECTORY}
create_controller $CONFIGURATION $CONTROLLER $BRIDGE_INTERFACE $ISOIMAGE
sudo virt-manager