summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh41
1 files changed, 38 insertions, 3 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 2e3bea71..39f76c03 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -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}"
@@ -985,6 +986,40 @@ EOF
done
EOI
fi
+
+ # Collect deployment logs
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+mkdir -p ~/deploy_logs
+rm -rf deploy_logs/*
+source stackrc
+set -o errexit
+for node in \$(nova list | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"); do
+ ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
+ sudo cp /var/log/messages /home/heat-admin/messages.log
+ 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
+ nova list --ip \$node
+ echo "---------------------------"
+ echo "-----/var/log/messages-----"
+ echo "---------------------------"
+ cat ~/deploy_logs/\$node.messages.log
+ echo "---------------------------"
+ echo "----------END LOG----------"
+ echo "---------------------------"
+fi
+ ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" <<EOF
+ sudo rm -f /home/heat-admin/messages.log
+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() {