Change-Id: Icd713fc620986303c9e5b4bf87fb036828795d6d
2.8 KiB
Running Barbican on DevStack
Currently, Barbican is not available within the default DevStack installation. However, you can patch a DevStack installation to include Barbican in the manual setup process below.
It is suggested that you install DevStack into an empty VM due to the number of dependencies installed and configuration that is performed. With this in mind, we provide an easy way of running Barbican on DevStack within a Vagrant VM.
Warning
This process takes anywhere from 10-30 minutes depending on your internet connection.
Easy Mode
To simplify the setup process of running Barbican on DevStack, there is a Vagrantfile that will automatically setup up a VM containing Barbican running on Devstack.
Clone the Vagrantfile collection
git clone https://github.com/cloudkeep/vagrantfile-collection.git
Get into the
barbican-devstack
directorycd vagrantfile-collection/barbican-devstack
Start create a new VM based on the cloned configuration
vagrant up
Once the VM has been successfully started and provisioned, ssh into the VM.
vagrant ssh
Once inside the VM, change your directory to the
devstack
folder.cd /opt/stack/devstack/
Start DevStack
./stack.sh
Manual Setup
These steps assume you are running within a clean Ubuntu 14.04 virtual machine (local or cloud instance). If you are running locally, do not forget to expose the following ports
- Barbican -
9311
- Keystone API -
5000
- Keystone Admin API -
35357
Installation
# Install system dependencies to start DevStack and install Barbican
sudo apt-get update
sudo apt-get install -y python-pip python-dev libffi-dev libssl-dev git \
libldap2-dev libsasl2-dev
# Clone DevStack and Barbican
git clone https://git.openstack.org/cgit/openstack-dev/devstack.git
git clone https://github.com/openstack/barbican.git
# Patch DevStack with Barbican setup files
cp barbican/contrib/devstack/lib/barbican devstack/lib/
cp barbican/contrib/devstack/local.conf devstack/
cp barbican/contrib/devstack/extras.d/70-barbican.sh devstack/extras.d/
# Copy to setup directory
sudo cp -R devstack/ /opt/stack/
# Create a non-root user for DevStack
sudo ./devstack/tools/create-stack-user.sh
# Assign permissions to that user
sudo chown -R stack:stack /opt/stack/
# Set the service host to localhost (Only for Local VMs)
sudo su - stack -c "echo \"export SERVICE_HOST=\\\"localhost\\\"\" >> .bashrc"
# Start DevStack
cd /opt/stack/devstack/
./stack.sh