<div dir="ltr"><div><div><div>Thanks John for you answer. <br></div>I tried running the script bin/barbican-api and ran into this issue (pasted at the end) . Seems like the script does not take care of the database side. <br><br></div>1) do we need to do something else to setup database? or its being worked on ?<br></div>2) Can we help in the process of removing dependencies in these scripts? Should that be through the launchpad ?<br><div><div><div><div><br><br>TASK: [barbican | install barbican] ******************************************* <br>failed: [barbican-04] => {"changed": true, "cmd": "cd /root/barbican/; python bin/barbican-api", "delta": "0:00:00.553279", "end": "2015-04-23 14:56:45.773115", "rc": 1, "start": "2015-04-23 14:56:45.219836", "warnings": []}<br>stderr: 2015-04-23 14:56:45.736 6984 CRITICAL barbican [-] BarbicanException: No SQL connection configured<br>2015-04-23 14:56:45.736 6984 TRACE barbican Traceback (most recent call last):<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "bin/barbican-api", line 17, in <module><br>2015-04-23 14:56:45.736 6984 TRACE barbican run()<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "bin/barbican-api", line 12, in run<br>2015-04-23 14:56:45.736 6984 TRACE barbican relative_to='.')<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp<br>2015-04-23 14:56:45.736 6984 TRACE barbican return loadobj(APP, uri, name=name, **kw)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj<br>2015-04-23 14:56:45.736 6984 TRACE barbican return context.create()<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create<br>2015-04-23 14:56:45.736 6984 TRACE barbican return self.object_type.invoke(self)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke<br>2015-04-23 14:56:45.736 6984 TRACE barbican **context.local_conf)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call<br>2015-04-23 14:56:45.736 6984 TRACE barbican val = callable(*args, **kw)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib64/python2.7/site-packages/paste/urlmap.py", line 31, in urlmap_factory<br>2015-04-23 14:56:45.736 6984 TRACE barbican app = loader.get_app(app_name, global_conf=global_conf)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app<br>2015-04-23 14:56:45.736 6984 TRACE barbican name=name, global_conf=global_conf).create()<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create<br>2015-04-23 14:56:45.736 6984 TRACE barbican return self.object_type.invoke(self)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 203, in invoke<br>2015-04-23 14:56:45.736 6984 TRACE barbican app = context.app_context.create()<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create<br>2015-04-23 14:56:45.736 6984 TRACE barbican return self.object_type.invoke(self)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke<br>2015-04-23 14:56:45.736 6984 TRACE barbican return fix_call(context.object, context.global_conf, **context.local_conf)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call<br>2015-04-23 14:56:45.736 6984 TRACE barbican val = callable(*args, **kw)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/root/barbican/barbican/api/app.py", line 89, in create_main_app<br>2015-04-23 14:56:45.736 6984 TRACE barbican repositories.setup_database_engine_and_factory()<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/root/barbican/barbican/model/repositories.py", line 109, in setup_database_engine_and_factory<br>2015-04-23 14:56:45.736 6984 TRACE barbican _ENGINE = _get_engine(_ENGINE)<br>2015-04-23 14:56:45.736 6984 TRACE barbican File "/root/barbican/barbican/model/repositories.py", line 170, in _get_engine<br>2015-04-23 14:56:45.736 6984 TRACE barbican u._('No SQL connection configured'))<br>2015-04-23 14:56:45.736 6984 TRACE barbican BarbicanException: No SQL connection configured<br>2015-04-23 14:56:45.736 6984 TRACE barbican <br><br>FATAL: all hosts have already failed -- aborting<br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 22, 2015 at 11:50 PM, Asha Seshagiri <span dir="ltr"><<a href="mailto:asha.seshagiri@gmail.com" target="_blank">asha.seshagiri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks a lot John for your response.<div>I appreciate for your time and effort in answering the queries and also pointing to the latest changes which you been always doing :)</div><span class=""><div><br></div><div>Thanks and Regards,</div><div>Asha Seshagiri</div></span></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Wed, Apr 22, 2015 at 6:09 PM, John Wood <span dir="ltr"><<a href="mailto:john.wood@rackspace.com" target="_blank">john.wood@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,255);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello Asha,</div>
<div><br>
</div>
<div>The barbican.sh script was originally intended to be a convenient way to boot up a Barbican instance locally to quickly start evaluating its API and functionality. </div>
<div><br>
</div>
<div>It was not intended to be used as a production script, deferring instead to deployments utilizing packages such as RDO RPMs and so forth for that purpose.</div>
<div><br>
</div>
<div>That said, changes to that script have been discussed, including removing pyenv and uWSGI as dependencies, hence such changes would be good to consider.</div>
<div><br>
</div>
<div>I’d also note that a solution based on this recently added script [1] might be in order.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>John</div>
<div><br>
</div>
<div>[1] <a href="https://github.com/openstack/barbican/blob/master/bin/barbican-api" target="_blank">https://github.com/openstack/barbican/blob/master/bin/barbican-api</a></div>
<div><br>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Asha Seshagiri <<a href="mailto:asha.seshagiri@gmail.com" target="_blank">asha.seshagiri@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, April 22, 2015 at 4:57 PM<br>
<span style="font-weight:bold">To: </span>openstack-dev <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Cc: </span>John Wood <<a href="mailto:john.wood@rackspace.com" target="_blank">john.wood@rackspace.com</a>>, "Reller, Nathan S." <<a href="mailto:Nathan.Reller@jhuapl.edu" target="_blank">Nathan.Reller@jhuapl.edu</a>>, Douglas Mendizabal <<a href="mailto:douglas.mendizabal@RACKSPACE.COM" target="_blank">douglas.mendizabal@RACKSPACE.COM</a>>,
Paul Kehrer <<a href="mailto:paul.kehrer@RACKSPACE.COM" target="_blank">paul.kehrer@RACKSPACE.COM</a>>, Adam Harwell <<a href="mailto:adam.harwell@RACKSPACE.COM" target="_blank">adam.harwell@RACKSPACE.COM</a>>, Alexis Lee <<a href="mailto:alexisl@hp.com" target="_blank">alexisl@hp.com</a>>, "<a href="mailto:nutshi@gmail.com" target="_blank">nutshi@gmail.com</a>"
<<a href="mailto:nutshi@gmail.com" target="_blank">nutshi@gmail.com</a>><br>
<span style="font-weight:bold">Subject: </span>Barbican : Dependency of pyenv configuration in Barbican.sh script<br>
</div><div><div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi All,
<div><br>
</div>
<div>I would like to know the reason behind the dependency of the pyenv virtual environment and pyenv in the barbican.sh script.</div>
<div>Ideally in the production environment , barbican would run on standalone virtual box with a particular python version .I feel that their dependecies needs to be removed from the script.</div>
<div><br>
</div>
<div>Was able to stand up the barbican instance without configuring pyenv and pyenv-virtualenv dependencies by modifying the barbican script , installing few additional packages and exporting the python path to PATH variable</div>
<div>Please find the change in barbican.sh script for installation and starting of the script below :</div>
<div><br>
<font face="Tahoma" color="#000000"><span style="font-size:13.3333330154419px">VENV_DIR=${VIRTUAL_ENV:-`pyenv prefix`} ->
<b>This line needs to be removed </b></span></font><br style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">
<span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">uwsgi --master --emperor $CONFIG_DIR/vassals</span><b style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px"> -H</b><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px"> </span><b style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">$VENV_DIR
-> The </b><b style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">$VENV_DIR variable need to be removed as an argument and -H as an option.</b></div>
<div><b><br>
</b></div>
<div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">The barbican script has been tied to $VENV_DIR variable which is dependent on the pyenv for python configuration.Hence the barbican.sh script needs to be modified to remove </span><b style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">$VENV_DIR
variable </b><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">by configuring python path in PATH variable.</span></div>
<div>On doing this , we can avoid the sourcing the pyenv and pyenv-virtualenv packages and its dependices on Barbican script.</div>
<div><br>
</div>
<div>Any help would be highly appreciated and also would like to know opinion from the openstack group on the changes indicated </div>
<div>Thanks in advance</div>
<div>
<div><br>
</div>
<br>
<div>
<div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div>
</div>
</div>
</div>
</div>
</div>
</div></div></span>
</div>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><span class=""><div><div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div></div>
</span></div>
</blockquote></div><br></div>