Print information about openstack deployed. 65/25765/3
authorliyuenan <liyuenan@huawei.com>
Mon, 12 Dec 2016 02:46:18 +0000 (10:46 +0800)
committerliyuenan <liyuenan@huawei.com>
Wed, 14 Dec 2016 09:20:42 +0000 (17:20 +0800)
Change-Id: I80a379bcb5851ef2b29a52c8d45450dd1d36ade0
Signed-off-by: liyuenan <liyuenan@huawei.com>
deploy/compass_vm.sh
deploy/launch.sh

index 61e2705..adc936f 100755 (executable)
@@ -263,3 +263,10 @@ function wait_controller_nodes_ok() {
     "
     sleep 30
 }
+
+function get_public_vip () {
+    ssh $ssh_args root@$MGMT_IP "
+        cd /var/ansible/run/openstack_newton_xenial-opnfv2
+        cat group_vars/all | grep -A 3 public_vip: | sed -n '2p' |sed -e 's/  ip: //g'
+    "
+}
index 9031cb6..7d0e269 100755 (executable)
@@ -111,9 +111,8 @@ if [[ "$DEPLOY_HOST" == "true" || $REDEPLOY_HOST == "true" ]]; then
     echo $DHA
     if [[ `echo $HOST_ROLES | grep opencontrail` ]]; then
         ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
-        installer_ip="192.168.200.2"
-        vgw_ip=$(sshpass -p 'root' ssh $ssh_options root@$installer_ip 'cat /home/opencontrail1.rc')
-        externet_cidr=$(sshpass -p 'root' ssh $ssh_options root@$installer_ip 'cat /home/opencontrail2.rc')
+        vgw_ip=$(sshpass -p 'root' ssh $ssh_options root@$MGMT_IP 'cat /home/opencontrail1.rc')
+        externet_cidr=$(sshpass -p 'root' ssh $ssh_options root@$MGMT_IP 'cat /home/opencontrail2.rc')
         sudo ip route add $externet_cidr via $vgw_ip dev br-external 2>/dev/null
         sleep 60
         sudo python ${COMPASS_DIR}/deploy/reset_compute.py $TYPE $DHA
@@ -121,4 +120,24 @@ if [[ "$DEPLOY_HOST" == "true" || $REDEPLOY_HOST == "true" ]]; then
     fi
 fi
 
+public_vip=$(get_public_vip)
+set +x
+
 figlet -ctf slant Installation Complete!
+echo ""
+echo "+-----------------+----------+--------------------------------+"
+echo "| Dashboard       | Web      | http://$public_vip/horizon |"
+echo "|                 | Domain   | default                        |"
+echo "|                 | User     | admin                          |"
+echo "|                 | Password | console                        |"
+echo "+-------------------------------------------------------------+"
+echo "| Compass         | IP       | $MGMT_IP                  |"
+echo "| Virtual Machine | User     | root                           |"
+echo "|                 | Password | root                           |"
+echo "+-------------------------------------------------------------+"
+echo "| Openrc Path     | admin    | /opt/admin-openrc.sh           |"
+echo "|                 | demo     | /opt/demo-openrc.sh            |"
+echo "+-----------------+----------+--------------------------------+"
+echo "NOTE: openrc file is in the controller nodes"
+echo ""
+