summaryrefslogtreecommitdiffstats
path: root/vagrant/create_onap.sh
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-10-11 21:19:51 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2017-10-11 20:39:19 -0400
commit917f988d2d8716eaa764b291b7f10672c77e8ed6 (patch)
treeb13d5fc82ed69f8d3d1b9b62ff38e2b3ee7eb7f2 /vagrant/create_onap.sh
parentc2c9a348183cce409c401ebf7cf104be7438abd0 (diff)
fix vagrant script to deploy onap
Change-Id: I93d428875a3ca15df4829609cd79d5c6546329af Issue-ID: INT-272 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'vagrant/create_onap.sh')
-rw-r--r--[-rwxr-xr-x]vagrant/create_onap.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/vagrant/create_onap.sh b/vagrant/create_onap.sh
index 9b4dfc06..55679ab7 100755..100644
--- a/vagrant/create_onap.sh
+++ b/vagrant/create_onap.sh
@@ -1,8 +1,10 @@
#!/usr/bin/env bash
set -ex
+sudo apt-get install -y python-openstackclient python-heatclient
+
source /vagrant/openrc
-cp /demo/heat/OpenECOMP/* .
+cp /demo/heat/ONAP/* .
# Parameters used across all ONAP components
pub_net=$(openstack network list -f value|grep public | cut -f1 -d' ')
@@ -29,13 +31,15 @@ sed -i "s,keystone_url:.*,keystone_url: http://192.168.0.10/identity/," onap_o
sed -i "s/dns_list:.*/dns_list: 8.8.8.8/" onap_openstack.env
sed -i "s/external_dns:.*/external_dns: 8.8.8.8/" onap_openstack.env
+openstack stack delete --yes --wait ONAP || true
openstack stack create -t onap_openstack.yaml -e onap_openstack.env ONAP
-sleep 180
+sleep 300
+sudo sed -i "/.*simpledemo.openecomp.org.*/d" /etc/hosts
vms=$(grep "_vm:" onap_openstack.yaml | cut -f1 -d"_")
-sudo rm -rf /vagrant/hosts
for vm in $vms
do
ip=$(openstack server list --name $vm -f yaml | grep Networks | cut -f2 -d",")
- echo "$ip $vm.api.simpledemo.openecomp.org" >> /vagrant/hosts
+ echo "$ip $vm.api.simpledemo.openecomp.org" | sudo tee -a /etc/hosts
done
+ssh -o StrictHostKeyChecking=no ubuntu@portal.api.simpledemo.openecomp.org -i onap "curl sina.com.cn"