Merge "Fixing an incorrect variable name"
[apex.git] / ci / deploy.sh
index 8dc9d7f..39f76c0 100755 (executable)
@@ -194,7 +194,7 @@ for Auto-detection${reset}"
     done
     echo -e "${blue}INFO: Detecting Network Specific settings for: ${enabled_network}${reset}"
     # detect network specific settings
-    if [ -n $(eval echo \${${network}_optional_settings}) ]; then
+    if [ -n $(eval echo \${${enabled_network}_optional_settings}) ]; then
       eval "network_specific_settings=\${${enabled_network}_optional_settings}"
       for setting in ${network_specific_settings}; do
         eval "setting_value=\${${enabled_network}_${setting}}"
@@ -932,9 +932,10 @@ function configure_post_install {
   ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
 source overcloudrc
 set -o errexit
+service_tenant_id=$(keystone tenant-get service 2>/dev/null | grep id | cut -d '|' -f 3)
 echo "Configuring Neutron external network"
-neutron net-create external --router:external=True
-neutron subnet-create --name external-net --disable-dhcp external --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr}
+neutron net-create external --router:external=True --tenant-id $service_tenant_id
+neutron subnet-create --name external-net --tenant-id $service_tenant_id --disable-dhcp external --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr}
 EOI
 
   echo -e "${blue}INFO: Checking if OVS bridges have IP addresses...${reset}"
@@ -998,7 +999,7 @@ for node in \$(nova list | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do
  sudo chown heat-admin /home/heat-admin/messages.log
 EOF
 scp ${SSH_OPTIONS[@]} heat-admin@\$node:/home/heat-admin/messages.log ~/deploy_logs/\$node.messages.log
-if [ \$debug == "TRUE" ]; then
+if [ "\$debug" == "TRUE" ]; then
     nova list --ip \$node
     echo "---------------------------"
     echo "-----/var/log/messages-----"
@@ -1013,6 +1014,12 @@ fi
 EOF
 done
 EOI
+
+  # Print out the dashboard URL
+  source stackrc
+  publicvip=$(heat output-show overcloud PublicVip | sed 's/"//g')
+  echo "Overcloud dashboard available at http://$publicvip/dashboard"
+
 }
 
 display_usage() {