summaryrefslogtreecommitdiffstats
path: root/ocata/vagrant/setup_compute.sh
blob: 3f503531f6fac4c4749456e2860e28d74125429e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set -ex

cd devstack
cp /vagrant/compute.conf local.conf
data_if=$(ifconfig | grep 192.168.* -B 1 | awk -F " " 'NR==1{print $1}')
ip=$(ip a s $data_if | grep inet | grep -v inet6 | sed "s/.*inet //" | cut -f1 -d'/')
host=$(hostname)
sed -i -e "s/HOSTIP/$ip/" -e "s/HOSTNAME/$host/" local.conf
./stack.sh

sudo apt-get update -y
sudo apt-get install -y putty
echo y | plink -ssh -l vagrant -pw vagrant 192.168.0.10 "bash /vagrant/setup_cell.sh"