kuryr/contrib/vagrant/devstack.sh
Kyle Mestery a68600fc6c Integrate devstack plugin with Vagrant setup
This integrates the freshly added devstack plugin with the Kuryr
Vagrant setup.

Also cleans up a few nits found while here in plugin.sh

Change-Id: I5de55e7d6415d4bffe8bb7a2b2e5e15188815c36
Signed-off-by: Kyle Mestery <mestery@mestery.com>
2015-11-25 09:57:28 -06:00

34 lines
810 B
Bash
Executable File

#!/bin/sh
BASHPATH=$(dirname "$0"\")
echo "run script from $BASHPATH"
# update system
export DEBIAN_FRONTEND noninteractive
sudo apt-get update
sudo apt-get install -qqy git
# determine checkout folder
PWD=$(su "$OS_USER" -c "cd && pwd")
DEVSTACK=$PWD/devstack
# check if devstack is already there
if [ ! -d "$DEVSTACK" ]
then
echo "Download devstack into $DEVSTACK"
# clone devstack
su "$OS_USER" -c "cd && git clone -b master https://github.com/openstack-dev/devstack.git $DEVSTACK"
echo "Copy configuration"
# copy local.conf.sample settings (source: kuryr/devstack/local.conf.sample)
cp /vagrant/devstack/local.conf.sample $DEVSTACK/local.conf
chown "$OS_USER":"$OS_USER" "$DEVSTACK"/local.conf
fi
# start devstack
echo "Start Devstack"
su "$OS_USER" -c "cd $DEVSTACK && ./stack.sh"