summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index d43960ef..18f96319 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -106,7 +106,8 @@ parse_setting_value() {
##parses network settings yaml into globals
parse_network_settings() {
- if local output=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py parse_net_settings -n $NETSETS -i $net_isolation_enabled); then
+ local output
+ if output=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py parse_net_settings -n $NETSETS -i $net_isolation_enabled); then
echo -e "${blue}${output}${reset}"
eval "$output"
else
@@ -117,7 +118,8 @@ parse_network_settings() {
##parses deploy settings yaml into globals
parse_deploy_settings() {
- if local output=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py parse-deploy-settings -f $DEPLOY_SETTINGS_FILE); then
+ local output
+ if output=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py parse-deploy-settings -f $DEPLOY_SETTINGS_FILE); then
echo -e "${blue}${output}${reset}"
eval "$output"
else
@@ -639,7 +641,7 @@ function configure_network_environment {
##Copy over the glance images and instackenv json file
##params: none
function configure_undercloud {
-
+ local controller_nic_template compute_nic_template
echo
echo "Copying configuration files to Undercloud"
if [[ "$net_isolation_enabled" == "TRUE" ]]; then
@@ -647,13 +649,22 @@ function configure_undercloud {
echo -e "${blue}Network Environment set for Deployment: ${reset}"
cat $CONFIG/network-environment.yaml
scp ${SSH_OPTIONS[@]} $CONFIG/network-environment.yaml "stack@$UNDERCLOUD":
+ if ! controller_nic_template=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then
+ echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}"
+ exit 1
+ fi
+
+ if ! compute_nic_template=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then
+ echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}"
+ exit 1
+ fi
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" << EOI
mkdir nics/
cat > nics/controller.yaml << EOF
-$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family)
+$controller_nic_template
EOF
cat > nics/compute.yaml << EOF
-$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family)
+$compute_nic_template
EOF
EOI
fi