Skip to content

Instantly share code, notes, and snippets.

@rm-you
Forked from fnaval/devstack-setup.sh
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rm-you/e487c3569d872b23228b to your computer and use it in GitHub Desktop.
Save rm-you/e487c3569d872b23228b to your computer and use it in GitHub Desktop.
Devstack setup script for Neutron-LBaaS and Barbican (New)
#!/bin/bash
# Set up the packages we need
apt-get update
apt-get install git vim -y
# Clone the repos we need
git clone https://github.com/openstack-dev/devstack.git /tmp/devstack
cat <<EOF > /tmp/devstack/localrc
enable_plugin barbican https://review.openstack.org/openstack/barbican refs/changes/85/167885/2
enable_plugin neutron-lbaas https://review.openstack.org/openstack/neutron-lbaas
LIBS_FROM_GIT+=python-neutronclient
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+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-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
EOF
# 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/
# 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