aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant/run_demo.sh
blob: e99b28d7c1f0c2491fffa33b41e994f865477e89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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"