#!/bin/bash OCTAVIA_PATCH="" OCTAVIA_DASHBOARD_PATCH="refs/changes/42/497642/1" OCTAVIA_CLIENT_PATCH="" NEUTRON_LBAAS_PATCH="" BARBICAN_PATCH="" # Quick sanity check (should be run on Ubuntu 16.04 and MUST be run as root directly) if [ `lsb_release -rs` != "16.04" ] then echo -n "Warning: This script is only tested against Ubuntu xenial. 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 jq -y # Clone the devstack repo git clone https://github.com/openstack-dev/devstack.git /tmp/devstack wget -O - https://raw.githubusercontent.com/rm-you/devstack_deploy/oct_dash/local.conf > /tmp/devstack/local.conf # Create the stack user /tmp/devstack/tools/create-stack-user.sh # Apparently the group for libvirt changed to libvirtd in parallels? usermod -a -G libvirtd stack # Move everything into place mv /tmp/devstack /opt/stack/ chown -R stack:stack /opt/stack/devstack/ cat >>/opt/stack/.profile < ~/routes.log route del default gw 192.168.0.1 &> /dev/null # Install tox globally pip install tox &> /dev/null # Grab utility scripts from github and add them to stack's .profile wget -q -O - https://raw.githubusercontent.com/rm-you/devstack_deploy/oct_dash/profile | sudo -u stack tee -a /opt/stack/.bash_profile > /dev/null # Set up barbican container sudo -u stack wget -q https://raw.githubusercontent.com/rm-you/devstack_deploy/oct_dash/make_container.sh -O /opt/stack/make_container.sh chmod +x /opt/stack/make_container.sh sudo su - stack -c /opt/stack/make_container.sh # Fix missing route ROUTER_IP=$(su - stack -c "openstack router show router1 | awk -F '|' ' / external_gateway_info / {print \$3} ' | jq -r '.external_fixed_ips[0].ip_address'") route add -net 10.0.0.0 netmask 255.255.255.0 gw $ROUTER_IP dev br-ex # Drop into a shell su - stack