-
-
Save mallow111/a47873e24f3e7de478e4 to your computer and use it in GitHub Desktop.
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 refs/changes/13/218613/11 | |
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 | |
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 | |
# Octavia | |
ENABLED_SERVICES+=,octavia,o-api,o-cw | |
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 'source /opt/stack/devstack/openrc admin admin' >> /opt/stack/.bashrc | |
# echo 'export OS_TENANT_NAME=admin' >> /opt/stack/.bashrc | |
# echo 'export OS_USERNAME=admin' >> /opt/stack/.bashrc | |
# echo 'export OS_PASSWORD=secretadmin' >> /opt/stack/.bashrc | |
# echo 'export OS_AUTH_URL="http://localhost:5000/v3/"' >> /opt/stack/.bashrc | |
echo 'export BARBICAN_ENDPOINT="http://localhost:9311"' >> /opt/stack/.bashrc | |
# echo 'export OS_IDENTITY_API_VERSION="3"' >> /opt/stack/.bashrc | |
# su - stack -c "source ~/devstack/openrc admin admin && nova flavor-create --is-public False m1.amphora 10 1024 5 1" | |
# sed -i 's/^amp_flavor_id =.*/amp_flavor_id = 10/' /etc/octavia/octavia.conf | |
# sed -i 's/^connection_max_retries =.*/connection_max_retries = 200/' /etc/octavia/octavia.conf | |
# cat <<EOF >> /etc/neutron/neutron.conf | |
# [octavia] | |
# request_poll_timeout = 5000 | |
# EOF | |
# 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