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
|
--show-profile
|
||||||
--setup-flavors
|
--setup-flavors
|
||||||
--deploy-nodes"
|
--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 " deployed node."
|
||||||
echo " --delete-stack -- Wait until the stack has deleted."
|
echo " --delete-stack -- Wait until the stack has deleted."
|
||||||
echo " --delete-nodes -- Delete all nodes."
|
echo " --delete-nodes -- Delete all nodes."
|
||||||
|
echo " --config-tools-provision"
|
||||||
|
echo " -- Run provision.sh for config-tools"
|
||||||
echo " -x -- enable tracing"
|
echo " -x -- enable tracing"
|
||||||
echo " --help, -h -- Print this help message."
|
echo " --help, -h -- Print this help message."
|
||||||
echo
|
echo
|
||||||
exit $1
|
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
|
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||||
|
|
||||||
# Note the quotes around `$TEMP': they are essential!
|
# Note the quotes around `$TEMP': they are essential!
|
||||||
|
@ -53,6 +55,7 @@ SHOW_PROFILE=
|
||||||
CHECK_SSH=
|
CHECK_SSH=
|
||||||
DELETE_STACK=
|
DELETE_STACK=
|
||||||
DELETE_NODES=
|
DELETE_NODES=
|
||||||
|
CONFIG_TOOLS_PROVISION=
|
||||||
STDERR=/dev/null
|
STDERR=/dev/null
|
||||||
|
|
||||||
DEPLOY_NAME=${DEPLOY_NAME:-"ironic-discover"}
|
DEPLOY_NAME=${DEPLOY_NAME:-"ironic-discover"}
|
||||||
|
@ -68,6 +71,7 @@ while true ; do
|
||||||
--check-ssh) CHECK_SSH="1"; shift 1;;
|
--check-ssh) CHECK_SSH="1"; shift 1;;
|
||||||
--delete-stack) DELETE_STACK="1"; shift 1;;
|
--delete-stack) DELETE_STACK="1"; shift 1;;
|
||||||
--delete-nodes) DELETE_NODES="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;;
|
-x) set -x; STDERR=/dev/stderr; shift 1;;
|
||||||
-h | --help) show_options 0;;
|
-h | --help) show_options 0;;
|
||||||
--) shift ; break ;;
|
--) shift ; break ;;
|
||||||
|
@ -265,6 +269,17 @@ function delete_nodes {
|
||||||
done
|
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..."
|
echo "Preparing for deployment..."
|
||||||
|
|
||||||
if [ "$REGISTER_NODES" = 1 ]; then
|
if [ "$REGISTER_NODES" = 1 ]; then
|
||||||
|
@ -295,6 +310,10 @@ if [ "$DELETE_NODES" = 1 ]; then
|
||||||
delete_nodes
|
delete_nodes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$CONFIG_TOOLS_PROVISION" = 1 ]; then
|
||||||
|
config_tools_provision
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Prepared."
|
echo "Prepared."
|
||||||
|
|
||||||
if [ "$DEPLOY_NODES" = 1 ]; then
|
if [ "$DEPLOY_NODES" = 1 ]; then
|
||||||
|
|
Loading…
Reference in New Issue