*** devlaps has joined #ara | 04:58 | |
openstackgerrit | Christian Berendt proposed openstack/ara: Add bandit to pep8 as generic linting target https://review.openstack.org/407443 | 10:23 |
---|---|---|
*** Harosgr has joined #ara | 10:23 | |
openstackgerrit | Christian Berendt proposed openstack/ara: Improve the readability of the RST files https://review.openstack.org/407447 | 10:35 |
Harosgr | Hey guys. What's up? :) | 12:46 |
dmsimard | o/ | 12:47 |
Harosgr | so, I was wondering... is there any way to find the ara playbook id at the end of a playbook execution? A way to "predict" it or soemthing... even though I've seen the code and it it random | 12:48 |
Harosgr | i am using ansible together with rundeck as a UI | 12:49 |
Harosgr | and I was thinking of generating a link at the end of each rundeck / ansible execution that will point to the ARA analysis | 12:49 |
dmsimard | Harosgr: so do you need the playbook id during the run or after it's completed ? | 12:49 |
Harosgr | after should be fine | 12:50 |
Harosgr | is it also possible to get it during? | 12:50 |
dmsimard | Yup. | 12:50 |
dmsimard | There's two ways, both during and after | 12:51 |
Harosgr | cool.. maybe I can test them both then :P | 12:51 |
dmsimard | Okay. During: The playbook id is exposed through using the ara_record and ara_read modules: http://ara.readthedocs.io/en/latest/usage.html#using-the-ara-record-module | 12:52 |
dmsimard | playbook_id is one of the variables available from the output of ara_read | 12:53 |
dmsimard | https://github.com/openstack/ara/blob/master/ara/plugins/actions/ara_read.py#L57 | 12:54 |
dmsimard | The other way is through the mechanism by which the playbook id is persisted for the purpose of making ara_record and ara_read work in the first place | 12:55 |
dmsimard | We create a ara.json file in the Ansible tmp directory (~/. ansible/ara.json) by default where you'll find playbook['id'] | 12:56 |
dmsimard | https://github.com/openstack/ara/blob/master/ara/plugins/callbacks/log_ara.py#L266 | 12:57 |
dmsimard | After the playbook finished, you could probably use the command line client to get the list of playbooks that ran and get the one you're interested in | 12:59 |
Harosgr | the temp file is deleted after the playbook run right? | 12:59 |
dmsimard | There's a few examples in tests here: https://github.com/openstack/ara/blob/master/run_tests.sh#L39 but otherwise there's also the docs: https://github.com/openstack/ara/blob/master/run_tests.sh#L39 | 13:00 |
dmsimard | Er, wrong clipboard. http://ara.readthedocs.io/en/latest/usage.html#querying-the-database-with-the-cli | 13:00 |
Harosgr | yes I've thought of doing something like "ara playbook list" and grepping the execution time to get the proper id | 13:00 |
dmsimard | ara doesn't delete that file, Ansible might. It's a directory controlled by Ansible. | 13:01 |
dmsimard | But it will definitely overwrite the file at the start of the next playbook | 13:01 |
Harosgr | yes if parallel playbooks are in run you cannot find the poper id easily | 13:02 |
dmsimard | parallel playbooks ? Ouch | 13:02 |
dmsimard | I've never tested that use case before | 13:03 |
dmsimard | But it's true that ansible let's you do that. Hmm. You've just exposed a bug :) | 13:03 |
Harosgr | there shouldn't be any problem with the playbook_id from ara_read or with grepping the cli output even with parallel runs... I guess... | 13:04 |
* dmsimard takes note | 13:04 | |
dmsimard | Well, see that bug I told you about, ara_record and ara_read will not work properly if playbook runs are parallelized | 13:05 |
dmsimard | So I have to fix that. It's not complicated but needs to be done nonetheless. | 13:06 |
dmsimard | The two runs (or N runs) will compete with each other for that ara.json. | 13:07 |
Harosgr | oh, I got it now, because they will both write in ara.json the playbook id right? | 13:07 |
* dmsimard nods | 13:07 | |
Harosgr | yes got it | 13:07 |
dmsimard | Use the CLI for now :) | 13:07 |
dmsimard | I'll file a bug after I've got some amount of caffeine | 13:07 |
Harosgr | I will give a try with the cli then.. Thanks for the info :D | 13:08 |
Harosgr | btw... I have added in ARA a small piece of code because I want some kind of athentication for the web page. If you find it an interesting feature I can commit the code | 13:10 |
Harosgr | it's basic auth for flask | 13:10 |
Harosgr | and it uses the ara variables in ansible conf file to set a username and a password | 13:10 |
dmsimard | Hmmm. Maybe :) | 13:12 |
dmsimard | Give it a shot, I'll help you merge it! | 13:13 |
Harosgr | jsut take a look at it and see if it makes sense as a feature :) | 13:13 |
Harosgr | so, thanks for the help. And good job with ARA. It's a really nice tool :) | 13:14 |
dmsimard | Harosgr: thanks ! | 13:16 |
dmsimard | Harosgr: hm, on second thought - maybe this kind of thing would belong more in a web server configuration ? like htaccess/htpasswd kind of thing. | 13:16 |
dmsimard | but I realize that might not help if you're running the standalone web server | 13:17 |
dmsimard | the thing is I'm not sure how well this would translate to the statically generated version of the web application. | 13:17 |
dmsimard | I have to afk for a bit, brb. | 13:17 |
Harosgr | hmm I haven't tested it with static. What I do now is call a configure_auth, where the basic auth configuration is done, in webapp.py | 13:21 |
Harosgr | I will give a try and see how that behaves with static generation | 13:23 |
dmsimard | berendt: o/ | 13:49 |
dmsimard | berendt: re: host facts | 13:49 |
dmsimard | We didn't come to the current 1:1 mapping of hosts vs playbooks by accident :) | 13:49 |
dmsimard | That's actually how it was before -- we ran with the assumption that hosts were unique across all playbook runs, however, in reality this isn't the case. In the context of Ansible, a host is only really unique for the duration of that run. | 13:50 |
dmsimard | An easy example, let's pretend you alias your host "webserver". This server "webserver" could in reality be any server behind, with any ip address.. or if it did happen to be unique, perhaps sometime it could be re-installed. | 13:51 |
dmsimard | The issue was discussed to some extent here: https://github.com/dmsimard/ara/issues/103 | 13:52 |
dmsimard | re: improve generation time: yes :) Definitely open to suggestions here. I'm blindly throwing everything at Flask-Frozen which crawls the web application and does it's thing right now. | 13:53 |
dmsimard | recording extra-vars, tags, limits and such was already logged here: https://storyboard.openstack.org/#!/story/2000747 | 13:54 |
dmsimard | so definitely on the to-do list | 13:54 |
dmsimard | the diff idea too, except I have no clue how to approach that just yet: https://storyboard.openstack.org/#!/story/2000752 | 13:55 |
openstackgerrit | Merged openstack/ara: Improve the readability of the RST files https://review.openstack.org/407447 | 14:05 |
openstackgerrit | Merged openstack/ara: Add bandit to pep8 as generic linting target https://review.openstack.org/407443 | 14:06 |
*** devlaps has quit IRC | 14:21 | |
berendt | dmsimard: for diff, check the molecule code, they are doing it right now in a very nice way, i can provide you a sample output | 14:32 |
dmsimard | berendt: yeah a sample output would be nice | 14:33 |
berendt | the discussion around the host facts makes sense to me and it is not that hard to write a wrapper for it | 14:34 |
dmsimard | berendt: yeah, well.. maybe there could be some level of facilitation done through the CLI | 14:35 |
dmsimard | like, instead of having a custom bash profile function on your laptop, we'd embed it in the CLI properly :) | 14:35 |
berendt | it is annoying when a public cloud provider returns "Error in creating the server: No valid host was found." when trying to run a CI job :( | 14:35 |
dmsimard | berendt: you might enjoy https://twitter.com/dmsimard/status/675830775384809472 :P | 14:36 |
berendt | lol | 14:37 |
berendt | dmsimard: http://paste.openstack.org/show/591545/ | 14:44 |
berendt | dmsimard: two sample outputs from molecule | 14:44 |
dmsimard | berendt: that output looks very puppet-ish heh | 14:46 |
dmsimard | berendt: so are you interested in that diff right there ? in the task output from ansible-playbook ? or do you want some sort of integration in the UI/CLI ? | 14:53 |
berendt | it would be nice to have this output when clicking on the details of a task in the ui | 14:54 |
*** devlaps has joined #ara | 16:08 | |
*** Harosgr has quit IRC | 16:52 | |
openstackgerrit | Christian Berendt proposed openstack/ara: Enable PEP8 E221 test and solve identified issues https://review.openstack.org/407615 | 17:19 |
openstackgerrit | Merged openstack/ara: Enable PEP8 E221 test and solve identified issues https://review.openstack.org/407615 | 17:33 |
openstackgerrit | Naga Ravi Chaitanya Elluri proposed openstack/ara: update usage.rst https://review.openstack.org/407623 | 17:53 |
openstackgerrit | Naga Ravi Chaitanya Elluri proposed openstack/ara: update usage.rst https://review.openstack.org/407623 | 18:12 |
openstackgerrit | Naga Ravi Chaitanya Elluri proposed openstack/ara: Fix ara command syntax to generate a static web app https://review.openstack.org/407623 | 18:39 |
openstackgerrit | David Moreau Simard proposed openstack/ara: Fix ara command syntax to generate a static web app https://review.openstack.org/407623 | 19:14 |
openstackgerrit | David Moreau Simard proposed openstack/ara: Fix ara command syntax to generate a static web app https://review.openstack.org/407623 | 19:15 |
*** devlaps has quit IRC | 19:16 | |
*** devlaps has joined #ara | 19:17 | |
openstackgerrit | Merged openstack/ara: Fix ara command syntax to generate a static web app https://review.openstack.org/407623 | 19:28 |
*** devlaps has quit IRC | 20:10 | |
*** devlaps has joined #ara | 21:07 | |
*** myoung is now known as myoung|afk | 22:25 | |
*** myoung|afk is now known as myoung|bbl | 22:25 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!