Monday, 2017-01-23

openstackgerritHa Dung proposed openstack/ara: Fixes all current typo errors of Ara project.  https://review.openstack.org/42392806:17
*** karimb has joined #ara11:49
*** karimb has quit IRC12:22
*** karimb has joined #ara13:40
openstackgerritMerged openstack/ara: Add meta description and favicon  https://review.openstack.org/42370114:02
*** boxrick1 has joined #ara14:59
boxrick1Good afternoon peops, I am currently trying to set up ARA to run as a semi permanent box, this obviously lends itself to Apache rather than flask14:59
dmsimardboxrick1: hey o/15:00
boxrick1In the past I have used WSGI to get Python flask apps behind Apache, in this case. What does ara-manage runserver call ?15:01
dmsimardboxrick1: I haven't personally ran ara behind apache but I know that nginx works really well.15:01
boxrick1I imagine the process is fairly similar, any hints where I should start with NGINX? Perhaps I can dissect that to get where I need.15:01
dmsimardWell, to be fair, I've not run ara as proper WSGI -- just proxying to the dev server. Doing proper WSGI would be a good thing to try and document15:02
dmsimardlet me see15:03
boxrick1I am currently making this into a set of Ansible playbooks to install it and use as a central service.15:17
boxrick1So any bits you could help with the web service component, in either an NGINX world or Apache would be pretty cool! I already have the foundation of the WSGI from another Flask app I made.15:18
dmsimardboxrick1: someone contributed an ara role which I intend to bring upstream sometime, one sec15:20
dmsimardboxrick1: https://github.com/chaitanyaenr/ansible-role-ara15:21
dmsimardI'm testing out a proper wsgi setup right now15:21
dmsimardboxrick1: after fighting with apache and selinux a bit I got something working, not super happy with the workarounds though15:46
dmsimardchecking if there's a better solution.15:46
boxrick1Well, I wonder if I can merge it with my stuff? I am running this on Ubuntu15:47
boxrick1So no SELINUX to contend with at least.15:47
dmsimardyeah, just figured I'd make it work with selinux :)15:48
dmsimardThere's no apache hacks involved in making selinux work, it was just policies about apache reading and writing stuff.15:48
dmsimardboxrick1: Okay, I got something I'm a bit more happy with, hang on16:08
dmsimardThis would be the vhost: http://paste.openstack.org/raw/596078/16:09
dmsimardThis the wsgi file at /var/www/ara/ara.wsgi: http://paste.openstack.org/raw/596079/16:10
dmsimardAnd then /var/www/ara/ansible.cfg: http://paste.openstack.org/raw/596080/16:10
dmsimardThat should be enough to get you started16:10
dmsimardI'll open up a bug to add this to the documentation16:11
boxrick1Ok cool, cheers for that. Greatly appreciated!16:18
mnaseri'm integrating ara into our CI to publish reports for our ansible runs.  I have [ara] dir=.ara (which works locally), however it's trying to create a file at "/var/lib/jenkins/.ara/ara.log" which is ~/.ara (default value).  makes me feel that its not being read.  I added an 'env' in our jenkins run and set an env variable, i see ARA_DIR=.ara yet it still does the same16:51
mnaseraccording to env, PWD=/var/lib/jenkins/workspace/system-config_sensu-horizon-MPWIZA5IP7X42BN3WPDVB6V5ED2LB47KXNGJBFV3ZEFT3PEN2N5Q@2 in this case.. so it should create .ara inside of it :x16:52
mnaserhardcoded ARA_DIR to contain the full path, so env reports: ARA_DIR=/var/lib/jenkins/workspace/system-config_sensu-horizon-MPWIZA5IP7X42BN3WPDVB6V5ED2LB47KXNGJBFV3ZEFT3PEN2N5Q@2/.ara17:07
mnaserbuut traceback with this still: IOError: [Errno 2] No such file or directory: '/var/lib/jenkins/.ara/ara.log'17:07
*** karimb has quit IRC17:09
dmsimardmnaser: there's two different configs17:17
dmsimardmnaser: under [ara], that'd be "dir" and "logfile"17:17
mnaserdmsimard oh my bad, i misinterpreted this - https://github.com/dmsimard/ara/blob/master/ara/config.py#L2317:18
dmsimardalthough I actually bumped into that earlier when setting up something with wsgi17:18
mnaseri thought changing dir would prefix both log and sql17:18
dmsimardright, that'd be my end user expectation too :)17:18
mnaserooo17:19
mnaseralso a small doc bug, ARA_LOG is actaully ARA_LOG_FILE here - https://ara.readthedocs.io/en/latest/configuration.html#ara-dir17:19
mnaserlemme fix17:19
mnaseroh also, docs say: ARA_DIR: Base directory where ARA will store it’s log file and sqlite database, unless specified otherwise. -- should that be changed or you'll likely change the behaviour?17:20
openstackgerritDavid Moreau Simard proposed openstack/ara: Properly default the log file location to ARA's directory  https://review.openstack.org/42425117:23
dmsimardmnaser: I think that should do it ^17:23
openstackgerritMohammed Naser proposed openstack/ara: Fix log file docs to point to correct setting  https://review.openstack.org/42425317:25
mnaserand this should make life easier ^17:25
mnaser:p17:25
dmsimardoh snap17:27
dmsimardAdded a comment17:27
openstackgerritMohammed Naser proposed openstack/ara: Fix log file docs to point to correct setting  https://review.openstack.org/42425317:28
dmsimardthanks :)17:28
mnasernp17:29
mnaserdmsimard: looks like the DEFAULT_DATABASE_PATH has the same issue as the one above17:34
mnaserit goes off DEFAULT_ARA_DIR17:34
dmsimardyou're not wrong17:35
dmsimard(╯°□°)╯︵ ┻━┻17:35
mnaserill have them in our ansible.cfg but yeah :p17:35
dmsimardmy english is failing me17:40
dmsimard"# Log and database locations default to the "computed" ARA directory"17:40
dmsimardcomputed ? rendered ?17:40
dmsimardcompiled ?17:40
mnaserahem17:41
mnaserdefault to the ARA directory which is predetermined using <x> method .. i guess?17:41
mnasercool, got past that stage, not hopefully jenkins html publisher grabs those correctly17:45
openstackgerritDavid Moreau Simard proposed openstack/ara: Properly default the database and logs location to ARA's directory  https://review.openstack.org/42425117:46
openstackgerritDavid Moreau Simard proposed openstack/ara: Properly default the database and logs location to ARA's directory  https://review.openstack.org/42425117:46
dmsimardmnaser: in my experience serving html/js apps straight out of jenkins artifact collection sucks17:47
mnaserdmsimard: using this instead of collecting it as an artifact - https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin17:47
dmsimardsomething something jenkins csp ? content security policy ?17:47
mnaseryes17:47
mnaseri'll have to do a little fix up around that too17:48
dmsimardI was never able to get it to work properly iirc17:48
dmsimardhaven't tried in a long time17:48
dmsimardmaybe that plugin helps, never tried it17:48
mnaseri'll report back :)17:48
openstackgerritMerged openstack/ara: Fix log file docs to point to correct setting  https://review.openstack.org/42425317:55
*** themurph has joined #ara19:18
openstackgerritMerged openstack/ara: Properly default the database and logs location to ARA's directory  https://review.openstack.org/42425121:06

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!