-
-
Save fnaval/92118d4949db14593eba to your computer and use it in GitHub Desktop.
20151016 DevStack Setup Script
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 git vim -y | |
# Clone the devstack repo | |
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 | |
enable_plugin neutron-lbaas https://review.openstack.org/openstack/neutron-lbaas | |
enable_plugin octavia https://review.openstack.org/openstack/octavia | |
IMAGE_URLS+=",http://g8de985af226d635b09bbb525b05dc4af.cdn.hpcloudsvc.com/amphora/amphora-x64-haproxy.qcow2" | |
#IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img" | |
LIBS_FROM_GIT+=python-neutronclient | |
KEYSTONE_TOKEN_FORMAT=UUID | |
DATABASE_PASSWORD=secretdatabase | |
RABBIT_PASSWORD=secretrabbit | |
ADMIN_PASSWORD=secretadmin | |
SERVICE_PASSWORD=secretservice | |
SERVICE_TOKEN=111222333444 | |
# 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 | |
# Nova | |
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch | |
# 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 | |
# Tempest | |
ENABLED_SERVICES+=,tempest | |
# Octavia | |
ENABLED_SERVICES+=,octavia,o-api,o-cw,o-hk,o-hm | |
# Horizon | |
ENABLED_SERVICES+=,horizon | |
HORIZON_REPO=https://github.com/openstack/horizon | |
HORIZON_BRANCH=master | |
EOF | |
# Create the stack user | |
/tmp/devstack/tools/create-stack-user.sh | |
# give stack permission to screen | |
chown stack:stack `readlink /proc/self/fd/0` | |
# 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 'source /opt/stack/devstack/openrc admin admin' >> /opt/stack/.bashrc | |
echo 'export BARBICAN_ENDPOINT="http://localhost:9311"' >> /opt/stack/.bashrc | |
# Install tox globally | |
pip install tox | |
# Run Barbican functional tests | |
#su - stack -c "cd /opt/stack/barbican/ && tox -e functional" | |
# Drop into a shell | |
su - stack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment