#!/bin/bash BARBICAN_PATCH="stable/mitaka" OCTAVIA_PATCH="stable/mitaka" NEUTRON_LBAAS_PATCH="stable/mitaka" NEUTRON_CLIENT_PATCH="stable/mitaka" # Quick sanity check (should be run on Ubuntu 14.04 and MUST be run as root directly) if [ `lsb_release -rs` != "14.04" ] then echo -n "Warning: This script is only tested against Ubuntu 14.04. Press to continue at your own risk... " read fi if [ `whoami` != "root" -o -n "$SUDO_COMMAND" ] then echo "This script must be run as root, and not using 'sudo'!" exit 1 fi # Set up the packages we need apt-get update apt-get install git vim -y # Clone the devstack repo git clone https://github.com/openstack-dev/devstack.git /tmp/devstack cd /tmp/devstack git checkout stable/mitaka cd - cat >/tmp/devstack/localrc <> /tmp/devstack/localrc # Create the stack user /tmp/devstack/tools/create-stack-user.sh # Move everything into place mv /tmp/devstack /opt/stack/ chown -R stack:stack /opt/stack/devstack/ git clone https://github.com/openstack/octavia ~stack/octavia cd ~stack/octavia git checkout $OCTAVIA_PATCH sed -i 's:octavia:octavia stable/mitaka:' ~stack/octavia/elements/amphora-agent-ubuntu/source-repository-amphora-agent cd - cat >>/opt/stack/.profile </etc/pip.conf </opt/stack/.pydistutils.cfg <> /opt/stack/.profile # Set up barbican container bash <(curl -sL https://raw.githubusercontent.com/rm-you/devstack_deploy/master/make_container.sh) # Drop into a shell su - stack