Add a command to run the config tools provision.sh
This commit is contained in:
parent
39a6662cb4
commit
bfaa804d5e
|
@ -141,3 +141,16 @@
|
|||
--show-profile
|
||||
--setup-flavors
|
||||
--deploy-nodes"
|
||||
- job:
|
||||
name: 'instack-ironic-deployment-config-tools-provision'
|
||||
description: 'Run config-tools provision.sh to prep for Puppet'
|
||||
project-type: freestyle
|
||||
wrappers:
|
||||
- ansicolor:
|
||||
colormap: xterm
|
||||
builders:
|
||||
- shell: >
|
||||
sudo /bin/bash -c "
|
||||
source /root/stackrc;
|
||||
/home/stack/instack-undercloud/scripts/instack-ironic-deployment -x
|
||||
--config-tools-provision"
|
||||
|
|
|
@ -32,13 +32,15 @@ function show_options () {
|
|||
echo " deployed node."
|
||||
echo " --delete-stack -- Wait until the stack has deleted."
|
||||
echo " --delete-nodes -- Delete all nodes."
|
||||
echo " --config-tools-provision"
|
||||
echo " -- Run provision.sh for config-tools"
|
||||
echo " -x -- enable tracing"
|
||||
echo " --help, -h -- Print this help message."
|
||||
echo
|
||||
exit $1
|
||||
}
|
||||
|
||||
TEMP=$(getopt -o ,h -l,register-nodes,nodes-json:,discover-nodes,deploy-nodes,help,setup-flavors,show-profile,check-ssh,delete-stack,delete-nodes -o,x,h -n $SCRIPT_NAME -- "$@")
|
||||
TEMP=$(getopt -o ,h -l,register-nodes,nodes-json:,discover-nodes,deploy-nodes,help,setup-flavors,show-profile,check-ssh,delete-stack,delete-nodes,config-tools-provision -o,x,h -n $SCRIPT_NAME -- "$@")
|
||||
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||
|
||||
# Note the quotes around `$TEMP': they are essential!
|
||||
|
@ -53,6 +55,7 @@ SHOW_PROFILE=
|
|||
CHECK_SSH=
|
||||
DELETE_STACK=
|
||||
DELETE_NODES=
|
||||
CONFIG_TOOLS_PROVISION=
|
||||
STDERR=/dev/null
|
||||
|
||||
DEPLOY_NAME=${DEPLOY_NAME:-"ironic-discover"}
|
||||
|
@ -68,6 +71,7 @@ while true ; do
|
|||
--check-ssh) CHECK_SSH="1"; shift 1;;
|
||||
--delete-stack) DELETE_STACK="1"; shift 1;;
|
||||
--delete-nodes) DELETE_NODES="1"; shift 1;;
|
||||
--config-tools-provision) CONFIG_TOOLS_PROVISION="1"; shift 1;;
|
||||
-x) set -x; STDERR=/dev/stderr; shift 1;;
|
||||
-h | --help) show_options 0;;
|
||||
--) shift ; break ;;
|
||||
|
@ -265,6 +269,17 @@ function delete_nodes {
|
|||
done
|
||||
}
|
||||
|
||||
function config_tools_provision {
|
||||
pushd /opt/stack/config-tools/
|
||||
sudo mkdir -p /var/www/install
|
||||
sudo bash -x ./provision.sh master https://github.com/agroup/spinalstack-env.git/etest.yml version=master
|
||||
for x in 0 1 2; do
|
||||
sudo sed -i -e "s/SERVER$x/$(nova show openstack$x | grep ctlplane | grep -Eo "192[^ ]+")/g" env/etest.yml
|
||||
done
|
||||
sudo bash -x ./provision.sh -l master https://github.com/agroup/spinalstack-env.git/etest.yml version=master
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Preparing for deployment..."
|
||||
|
||||
if [ "$REGISTER_NODES" = 1 ]; then
|
||||
|
@ -295,6 +310,10 @@ if [ "$DELETE_NODES" = 1 ]; then
|
|||
delete_nodes
|
||||
fi
|
||||
|
||||
if [ "$CONFIG_TOOLS_PROVISION" = 1 ]; then
|
||||
config_tools_provision
|
||||
fi
|
||||
|
||||
echo "Prepared."
|
||||
|
||||
if [ "$DEPLOY_NODES" = 1 ]; then
|
||||
|
|
Loading…
Reference in New Issue