Last active
September 4, 2015 20:09
-
-
Save rm-you/70f0b779970402e9baba to your computer and use it in GitHub Desktop.
Devstack Barbican (New)
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 | |
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 | |
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=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 | |
# 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