Last active
August 29, 2015 14:16
-
-
Save rm-you/d7fbe613d525f12dc447 to your computer and use it in GitHub Desktop.
Devstack setup script for Neutron-LBaaS + Barbican + Octavia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set up the packages we need | |
apt-get update | |
apt-get install libffi-dev libssl-dev git vim libxml2-dev libsqlite3-dev libxslt1-dev -y | |
# Clone the repos we need | |
git clone https://github.com/openstack/barbican.git /tmp/barbican | |
git clone https://github.com/openstack-dev/devstack.git /tmp/devstack | |
cp -r /tmp/barbican/contrib/devstack/lib/barbican /tmp/devstack/lib/ | |
cp /tmp/barbican/contrib/devstack/extras.d/70-barbican.sh /tmp/devstack/extras.d/ | |
cat <<EOF > /tmp/devstack/localrc | |
enable_plugin neutron-lbaas https://review.openstack.org/openstack/neutron-lbaas refs/changes/14/174114/20 | |
enable_plugin octavia https://review.openstack.org/openstack/octavia refs/changes/66/213066/1 | |
LIBS_FROM_GIT+=python-neutronclient | |
USE_CONSTRAINTS=True | |
DATABASE_PASSWORD=password | |
ADMIN_PASSWORD=password | |
SERVICE_PASSWORD=password | |
SERVICE_TOKEN=password | |
RABBIT_PASSWORD=password | |
# Enable Logging | |
LOGFILE=/opt/stack/logs/stack.sh.log | |
VERBOSE=True | |
LOG_COLOR=True | |
SCREEN_LOGDIR=/opt/stack/logs | |
# Pre-requisite | |
ENABLED_SERVICES=rabbit,mysql,key | |
# Horizon (always use the trunk) | |
#ENABLED_SERVICES+=,horizon | |
#HORIZON_REPO=https://github.com/openstack/horizon | |
#HORIZON_BRANCH=master | |
# Nova | |
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch | |
IMAGE_URLS+=",http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img" | |
# Glance | |
ENABLED_SERVICES+=,g-api,g-reg | |
# Neutron | |
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron | |
# Enable LBaaS V2 | |
ENABLED_SERVICES+=,q-lbaasv2 | |
# Cinder | |
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch | |
# Tempest | |
ENABLED_SERVICES+=,tempest | |
# Barbican | |
ENABLED_SERVICES+=,barbican | |
# Octavia | |
ENABLED_SERVICES+=,octavia,o-api,o-cw,o-hk,o-hm | |
EOF | |
# Create the stack user | |
/tmp/devstack/tools/create-stack-user.sh | |
# Move everything into place | |
mv /tmp/devstack /opt/stack/ | |
rm -rf /tmp/barbican/ | |
git clone https://github.com/openstack/requirements.git /opt/stack/requirements | |
chown -R stack:stack /opt/stack/devstack/ | |
# Fix permissions on current tty so screens can attach | |
chmod go+rw `tty` | |
# Let's rock | |
su - stack -c /opt/stack/devstack/stack.sh | |
# Add environment variables for auth/endpoints | |
echo 'export OS_TENANT_NAME=admin' >> /opt/stack/.bashrc | |
echo 'export OS_USERNAME=admin' >> /opt/stack/.bashrc | |
echo 'export OS_PASSWORD=password' >> /opt/stack/.bashrc | |
echo 'export OS_AUTH_URL="http://localhost:5000/v2.0/"' >> /opt/stack/.bashrc | |
echo 'export BARBICAN_ENDPOINT="http://localhost:9311/"' >> /opt/stack/.bashrc | |
echo 'export OS_IDENTITY_API_VERSION="2.0"' >> /opt/stack/.bashrc | |
# Set up tempest config | |
mkdir /etc/tempest | |
cp /opt/stack/tempest/etc/tempest.conf /etc/tempest/ | |
# Drop into a shell | |
su - stack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment