summaryrefslogtreecommitdiffstats
path: root/vagrant/run_demo.sh
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-05-10 15:05:30 -0700
committerGuo Ruijing <ruijing.guo@intel.com>2017-05-13 00:32:18 +0800
commit5a14ee34314b6d500c63dc19523ee4748734c8c0 (patch)
tree4f82b4514f9ab5517372916372a1227d31b9f61e /vagrant/run_demo.sh
parent62e3159bb6e3f90e2ad53b8da39a7ea34c819b4f (diff)
setup onap demo by vagrant
Change-Id: I7d46f7f6081e7aed0cc2ea2506a47925171f9be2 Co-Authored-By: Chen, Wei <wei.d.chen@intel.com> Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'vagrant/run_demo.sh')
-rwxr-xr-xvagrant/run_demo.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/vagrant/run_demo.sh b/vagrant/run_demo.sh
new file mode 100755
index 00000000..e99b28d7
--- /dev/null
+++ b/vagrant/run_demo.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+set -ex
+
+sudo apt-get install -y virtualbox
+ver=$(apt-cache policy vagrant | grep Installed | cut -d ':' -f 3)
+if [[ "$ver" != "1.8.7" ]]; then
+ wget --no-check-certificate https://releases.hashicorp.com/vagrant/1.8.7/vagrant_1.8.7_x86_64.deb
+ sudo dpkg -i vagrant_1.8.7_x86_64.deb
+fi
+
+vagrant destroy -f
+vagrant up
+vagrant ssh control -c "/vagrant/create_onap.sh"
+sudo sed -i "/.*simpledemo.openecomp.org.*/d" /etc/hosts
+cat hosts | sudo tee -a /etc/hosts
+sleep 300
+ssh -o StrictHostKeyChecking=no ubuntu@portal.api.simpledemo.openecomp.org -i onap "curl sina.com.cn"