Jump to: navigation, search

Difference between revisions of "BarbicanDevStack"

(Created page with "== Running Barbican via DevStack == Steps to run Barbican via DevStack (assuming Ubuntu 12.04 LTS): <pre><nowiki> $ sudo apt-get update $ sudo apt-get install git -y $ git c...")
 
(Added a note about a required workaround.)
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
== Running Barbican via DevStack ==
 
== Running Barbican via DevStack ==
  
Steps to run Barbican via DevStack (assuming Ubuntu 12.04 LTS):
+
Steps to run Barbican via DevStack (assuming Ubuntu 12.04 LTS or Ubuntu 14.04 LTS):
 +
 
 +
Note: Due to the amount of dependencies and configuration performed by the DevStack process, we suggest running DevStack from a dedicated/temporary virtual machine rather than your local workstation.
  
 
<pre><nowiki>
 
<pre><nowiki>
 
$ sudo apt-get update
 
$ sudo apt-get update
$ sudo apt-get install git -y
+
$ sudo apt-get install libffi-dev libssl-dev git -y
 
$ git clone https://github.com/openstack-dev/devstack.git
 
$ git clone https://github.com/openstack-dev/devstack.git
$ git clone https://github.com/stackforge/barbican.git
+
$ git clone https://github.com/openstack/barbican.git
 
$ mv barbican/contrib/devstack/lib/barbican devstack/lib/
 
$ mv barbican/contrib/devstack/lib/barbican devstack/lib/
 +
 +
$ mv barbican/contrib/devstack/local.conf devstack/
 +
  (!!!! NOTE: Please modify line #3 of the repository's 'local.conf' file to replace 'barbican-svc barbican-retry' with 'barbican')
 +
 
$ mv barbican/contrib/devstack/extras.d/70-barbican.sh devstack/extras.d/
 
$ mv barbican/contrib/devstack/extras.d/70-barbican.sh devstack/extras.d/
$ ./devstack/tools/create-stack-user.sh
+
$ sudo ./devstack/tools/create-stack-user.sh
$ mv devstack/ /opt/stack/
+
$ sudo mv devstack/ /opt/stack/
 
$ rm -rf barbican/
 
$ rm -rf barbican/
 
$ chown -R stack:stack /opt/stack/devstack/
 
$ chown -R stack:stack /opt/stack/devstack/
Line 18: Line 24:
 
</nowiki></pre>
 
</nowiki></pre>
  
You'll need to create and edit a file called '''local.conf''':
+
This next step will take a while to run but the end result is you should have Barbican running under DevStack:
  
 
<pre><nowiki>
 
<pre><nowiki>
$ nano local.conf
+
$ ./stack.sh
</nowiki></pre>
 
 
 
Add the following into the '''local.conf''' file and modify the passwords as required:
 
 
 
<pre><nowiki>
 
[[local|localrc]]
 
enable_service barbican
 
KEYSTONE_TOKEN_FORMAT=UUID
 
 
 
# If you don't need these services
 
# un-comment them to speed up
 
# the DevStack install time
 
#disable_service horizon
 
#disable_service glance
 
#disable_service cinder
 
#disable_service nova
 
 
 
DATABASE_PASSWORD=password
 
RABBIT_PASSWORD=password
 
SERVICE_TOKEN=password
 
SERVICE_PASSWORD=password
 
ADMIN_PASSWORD=password
 
 
</nowiki></pre>
 
</nowiki></pre>
  
This next step will take a while to run but the end result is you should have Barbican running under DevStack:
+
To shutdown Barbican (and its dependent services) simply run this:
  
 
<pre><nowiki>
 
<pre><nowiki>
$ ./stack.sh
+
$ ./unstack.sh
 
</nowiki></pre>
 
</nowiki></pre>
  
'''Note:''' If you have issues (compute might be throwing some errors) you can ease back the firewall. Keep in mind this opens your computer up completely. '''Only do this if you know what you are doing and if you are having issues'''. Adjust as needed.
+
'''Note:''' If you have issues (compute might be throwing some errors - assuming you've enabled compute because we don't by default in the local.conf) you can ease back the firewall. Keep in mind this opens your computer up completely. '''Only do this if you know what you are doing and if you are having issues'''. Adjust as needed.
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 62: Line 46:
 
$ iptables -P OUTPUT ACCEPT
 
$ iptables -P OUTPUT ACCEPT
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
===The Easy Way===
 +
''Last Updated: March 18, 2015''
 +
 +
This script will set up Devstack with Barbican (when run on a clean Ubuntu 14.04 VM), then run the Barbican functional tests.
 +
https://gist.github.com/rm-you/6feacb91182f5c011018
 +
 +
<nowiki>bash <(curl -sL https://gist.githubusercontent.com/rm-you/6feacb91182f5c011018/raw/b03c74bbe1c76af55d29083b4b823a037cc34018/setup.sh)</nowiki>

Latest revision as of 20:13, 10 August 2015

Running Barbican via DevStack

Steps to run Barbican via DevStack (assuming Ubuntu 12.04 LTS or Ubuntu 14.04 LTS):

Note: Due to the amount of dependencies and configuration performed by the DevStack process, we suggest running DevStack from a dedicated/temporary virtual machine rather than your local workstation.

$ sudo apt-get update
$ sudo apt-get install libffi-dev libssl-dev git -y
$ git clone https://github.com/openstack-dev/devstack.git
$ git clone https://github.com/openstack/barbican.git
$ mv barbican/contrib/devstack/lib/barbican devstack/lib/

$ mv barbican/contrib/devstack/local.conf devstack/
   (!!!! NOTE: Please modify line #3 of the repository's 'local.conf' file to replace 'barbican-svc barbican-retry' with 'barbican')

$ mv barbican/contrib/devstack/extras.d/70-barbican.sh devstack/extras.d/
$ sudo ./devstack/tools/create-stack-user.sh
$ sudo mv devstack/ /opt/stack/
$ rm -rf barbican/
$ chown -R stack:stack /opt/stack/devstack/
$ su - stack
$ cd /opt/stack/devstack/

This next step will take a while to run but the end result is you should have Barbican running under DevStack:

$ ./stack.sh

To shutdown Barbican (and its dependent services) simply run this:

$ ./unstack.sh

Note: If you have issues (compute might be throwing some errors - assuming you've enabled compute because we don't by default in the local.conf) you can ease back the firewall. Keep in mind this opens your computer up completely. Only do this if you know what you are doing and if you are having issues. Adjust as needed.

# Flush all firewall rules for DevStack
# (Only do this if you really know what you're doing and have problems running DevStack)
$ iptables -F
$ iptables -P INPUT ACCEPT
$ iptables -P FORWARD ACCEPT
$ iptables -P OUTPUT ACCEPT

The Easy Way

Last Updated: March 18, 2015

This script will set up Devstack with Barbican (when run on a clean Ubuntu 14.04 VM), then run the Barbican functional tests. https://gist.github.com/rm-you/6feacb91182f5c011018

bash <(curl -sL https://gist.githubusercontent.com/rm-you/6feacb91182f5c011018/raw/b03c74bbe1c76af55d29083b4b823a037cc34018/setup.sh)