Wednesday, 2018-11-28

ara-slackgraeme.danielson: @dmsimard Thanks for confirming. We will go ahead with auth on nginx as there is potentially sensitive network info in there and need to keep the security team happy.00:13
*** bcoca has quit IRC03:38
*** gvincent has quit IRC07:59
*** themroc has joined #ara08:19
*** gvincent has joined #ara08:50
*** gvincent has quit IRC08:50
*** gvincent has joined #ara09:28
*** dougbtv has quit IRC10:15
*** gvincent has quit IRC11:25
*** gvincent has joined #ara11:25
*** dougbtv has joined #ara12:19
*** gvincent has quit IRC12:31
*** dougbtv has quit IRC13:03
*** dougbtv has joined #ara13:40
*** dbpiv has joined #ara13:41
*** bcoca has joined #ara13:43
*** bcoca has joined #ara13:43
*** dougbtv has quit IRC13:44
*** dougbtv has joined #ara14:05
*** dougbtv has quit IRC14:11
*** dougbtv has joined #ara14:18
*** gvincent has joined #ara14:20
*** tbielawa has joined #ara14:20
*** dougbtv has quit IRC14:30
apollo13dmsimard: no strong preference, I use what fits for the specific deployment :)14:32
dmsimardgunicorn or uwsgi ? need to work on docs/deployment14:34
dmsimardapollo13: ^14:34
apollo13dmsimard: gunicorn14:34
dmsimardack14:35
apollo13but generally: what fits better for the specifc environment ;)14:35
dmsimardsure, I just want to use/document one thing for now14:35
apollo13but uwsgi is relatively hard to configure, it has like 700 options14:35
apollo13gunicorn has no C deps, so that makes it rather nice14:35
dmsimardfor example ara is currently documented with mod_wsgi but not other things14:35
dmsimardI want to document/support 2-3 deployment scenarios14:35
dmsimardapollo13: btw a live demo will eventually be redeployed automatically on https://api.demo.recordsansible.org/api/v1/14:36
XarothUwsgi isn't hard to configure, it did have a fuckton of config options, 90% of which you won't ever use14:50
XarothBut a uwsgi config file should only be about 10 lines14:51
dmsimardXaroth: are you familiar with uwsgi deployments of django ? :D14:52
XarothYes14:53
XarothVery14:53
Xaroth2 config files, one for emperor mode, one per app14:54
XarothAnd one unit/init file14:55
dmsimardXaroth: sweet! Do you happen to already have something we could use ? :p14:56
dmsimardIf you could contribute it, even better14:56
XarothI should have some somewhere, will check when I'm back home tonight14:57
XarothHow do you want it, just the config files or full Ansible roles14:57
dmsimardIf the roles are open, we could look at them15:02
XarothIf they are on my own envs I can open them15:03
dmsimardXaroth: Up to you, we need to document setting up the ARA 1.0 things in general. I wouldn't turn down a contribution for uwsgi docs or playbooks to deploy ARA with it :D15:10
dmsimardIt'll be important to have roles for 1.0, especially because the web part will no longer come bundled with "pip install ara"15:14
*** mgariepy has quit IRC15:18
*** mgariepy has joined #ara15:19
*** tbielawa has left #ara15:33
*** herald85 has joined #ara15:35
*** Led_Zeppelin has joined #ara15:48
Led_Zeppelinhey there15:48
herald85continuing from  #ansible : whats the timeline for 1.0 ?15:48
herald85Led_Zeppelin:  goshdarn he tricked us into joining his channel :X15:48
Led_Zeppelinha yeah.15:49
Led_Zeppelinalthough i never used ara my issue is there is too much stuff that needs to be installed to get it going.15:49
dmsimardherald85: I'm long overdue for a status update but it's been more than a year in the making.. I've attempted to predict timelines before and have horribly failed so I'm trying to be cautious about timelines now :p15:49
dmsimardherald85: does "soon" work ? :p15:49
Led_Zeppelinideally, it would be great with ara would just send json output to a endpoint. and the endpoint does all the processes (storing) and visualizing.15:49
dmsimardLed_Zeppelin: but that's what ara does :p15:50
dmsimardLed_Zeppelin: https://api.demo.recordsansible.org/api/v1/15:50
dmsimardhttps://ara-server.readthedocs.io/en/latest/arch.html15:50
Led_Zeppelinright, but with a lot of infrastructure such as sql drivers, paramiko, a webserver, etc...15:50
dmsimardit doesn't need to be that way15:50
dmsimarda webserver or an api server is not required15:51
dmsimardeverything can be offline if required15:51
dmsimarddefaulting to sqlite15:51
*** raktajino has joined #ara15:51
dmsimard1.0 has an API client that is able to "talk" to the API without an API server15:51
dmsimardif you need to, you can spin up an API server, though15:51
Led_Zeppelini see15:52
Led_Zeppelinlet me first get it installed and play with it.15:52
Led_Zeppelinso, I use ansible in a docker container, so I guess i need to have ara in the container also?15:53
XarothAra hooks into Ansible to be able to get the task output, so yes15:53
dmsimardLed_Zeppelin: so a word of caution15:53
dmsimardLed_Zeppelin: the current stable release of ara (0.16.1) on pypi is nothing like what we've just discussed with an API and everything15:54
dmsimard1.0 is a complete rewrite15:54
Led_Zeppelinnot a problem. i will use 0.16.115:54
dmsimardLed_Zeppelin: there was a user who contributed some docker things recently, hang on15:54
dmsimardLed_Zeppelin: https://www.reddit.com/r/ansible/comments/9u7d9h/i_found_configuring_ara_in_apachewsgi_confusing/15:55
Led_Zeppelinyikes. you see, it IS very confusing :-)15:55
dmsimard¯\_(ツ)_/¯15:55
Led_Zeppelinthe web portion should be outsourced to a better framework. Not python. Like go or java for easier deployment.15:55
dmsimardthe web is bundled in 0.x, it's no longer bundled in 1.015:56
dmsimard1.0 will feature a standalone/stateless interface written in javascript/react15:56
Led_Zeppelini see15:56
dmsimardor, well, that's what we're trying to do -- I guess once you have the API, people can write their own frontends to it15:56
herald85ARA website isnt showing anything  so I guess that means my config is off?15:57
Led_Zeppelini think its a cool concept BTW15:57
dmsimardherald85: if you ran ansible with ara enabled, it should have created a database in ~/.ara/ansible.sqlite -- you can check if there's a playbook in it with something like: sqlite3 ~/.ara/ansible.sqlite "select path from playbooks;"15:58
dmsimardherald85: if there's nothing in the interface, it usually means one of two things: 1) ansible didn't run with the callback enabled 2) the web app isn't looking at the right database (i.e, if it's running under a different user than what the ansible playbook ran with)15:59
herald85hm i dont see a sqlite file indeed. I configured :16:00
herald85[ara] ARA_DIR=/etc/ansible_ara16:00
herald85and that's empty16:00
XarothLed_Zeppelin: Java and easier ?!?!16:00
Xaroth`ara-manage runserver`16:00
dmsimardherald85: did you set the location of the callback plugin in the configuration ?16:00
XarothPresto, something that runs16:00
dmsimard^ right, it's easy to get started but I get that configuring things for larger scale (with apache, centralized database, etc.) can be more complicated16:01
XarothEasier than with any Java app tbqfh16:02
dmsimardLast time I did any remotely serious java was in college and that wasn't much. I try to forget those days :)16:02
dmsimardI'd love to pick up golang, though. There's a lot to love about it but I haven't had the use case or the opportunity for it. I guess I haven't come up with something that /required/ something other than python16:03
XarothSame16:04
dmsimardbefore python I did a lot of perl16:04
* dmsimard shivers16:04
XarothI tried to fiddle with nginx-sso, which was go based.. was actually not that hard to get into16:04
dmsimardit's not hard to read but writing it is another matter16:05
herald85mmh can't get it to work. I'll have to check again tomorrow.16:05
XarothTrue16:05
dmsimardherald85: let me know if you can't figure it out, happy to help16:06
Xaroth^16:06
herald85i'm new to pip , but is it supposed to end up in /usr/local ?16:07
herald85locate ara | grep callbacks /usr/local/lib/python2.7/dist-packages/ara/plugins/callbacks16:07
dmsimardherald85: that's an appropriate location, means it is installed for the global python interpreter16:08
dmsimardherald85: so before running your playbook you need to do something like "export ANSIBLE_CALLBACK_PLUGINS=/usr/local/lib/python2.7/dist-packages/ara/plugins/callbacks" or put it in your ansible.cfg file16:08
dmsimardfwiw ara ships some helper modules to find those paths because it can be just about anywhere depending on the distribution, python version, virtual environment, etc.16:09
Led_Zeppelinok. so I installed ara16:09
dmsimard"python -m ara.setup.callback_plugins" prints the path that you found16:09
Led_Zeppelinran my playbook and running my server, but I don't see any reports.16:09
dmsimardLed_Zeppelin: did you export the callback plugins variable like I mentioned above ?16:09
Led_Zeppelinyep. i did16:10
Led_Zeppelinin the callback does it have hardcoded to 127.0.0.1? if so I would need to change that.16:10
dmsimardara-manage runserver has some arguments to customize the binding address and port if need be16:10
Led_Zeppelinyeah, i am able to run ara-manage with 0.0.0.0 port 9191 no issue there.16:11
Led_Zeppelinrunning in a docker container.16:11
herald85oh huh... python -m ara.setup.library /usr/local/lib/python2.7/dist-packages/ara/plugins/modules   BUT ls: cannot access '/usr/local/lib/python2.7/dist-packages/ara/plugins/modules': No such file or directory16:11
Led_Zeppelini suspect when I run my playbook its hitting 127.0.0.116:11
dmsimardherald85: oops, I need to remove that16:11
dmsimardherald85: there used to be a bug in ansible where the modules directory was *required* despite ara not needing to ship anything there16:11
dmsimardyou only need to care about callback_plugins and, if you want to use ara_record, action plugins16:12
herald85ah OK :)16:12
dmsimardLed_Zeppelin: there's no API in 0.x, it's all directly to the database16:12
dmsimardLed_Zeppelin: if there's nothing in the web app, it means the place where data is being recorded to and where it's read from are different16:12
dmsimard"ara-manage runserver" is really *only* a passive web application that reads from the database16:12
Led_Zeppelinlet me try setting the ARA_HOST when running the playbook16:12
dmsimardthe web application doesn't even need to run before launching your playbook16:13
dmsimardyou really just need to set ansible to use the callback plugin and that should be it16:13
Led_Zeppelini see16:14
Led_Zeppelinseems li need to share the database.16:15
Led_Zeppelinseems I need to share the database in my docker containers.16:15
Led_ZeppelinXaroth, well, not as simple as ara-manage runserver because you need to get its dependecies which is much harder in python than in java.16:17
XarothWait what16:17
XarothIt's really not16:18
herald85do I need to change "stdout_callback = yaml"  too?16:18
Led_Zeppelingot it working BTW.16:19
XarothPython is very, very easy with dep management16:19
XarothPip install Ara16:19
Led_ZeppelinXaroth, lol. i take it you never worked in a large environment :p16:19
XarothDone.16:19
openstackgerritDavid Moreau Simard proposed openstack/ara master: Remove the notion of ANSIBLE_LIBRARY from setup and docs  https://review.openstack.org/62064716:20
Led_ZeppelinXaroth, you are assuming; 1) the proxy is properly setup. 2) everyone is running the same version of python 3) people pinned their version of ansible to XYZ and they refuse to upgrade beacuse it works. etc...16:20
Led_Zeppelindmsimard, interface is awesome!16:20
dmsimardherald85: you can do what you want with stdout callbacks16:20
dmsimardherald85: ara isn't a stdout callback and doesn't interfere16:20
XarothI'm devops, those problems are not an issue in my environments because all are managed properly16:21
XarothPython version is moot16:21
Led_Zeppelinhow big is your environment?16:21
XarothAnsible version is moot, as long as it's supported by ara16:21
Led_Zeppelinand how many active users?16:21
XarothOf all our customers? Several thousand16:22
dmsimardLed_Zeppelin: yay, it works, haha16:22
dmsimardXaroth: I think it's fair to say that different environments have different complexities based on different requirements -- I can see how it can be easy for someone but not for someone else16:24
dmsimardthe other day there was a user who needed to install ara in air-gapped networks (i.e, without access to pypi)16:24
Led_Zeppelinbingo :p16:24
XarothThat is fair, but that's not to blame on Ara/python16:25
dmsimardthat's also an accurate statement :D16:25
herald85ow ***** i'm stupid16:25
dmsimardGo is nice because everything gets compiled down to a binary16:25
Led_Zeppelini am not blaming; i am telling the reality. Its much harder to do with depends on Python than Go/Java.16:25
dmsimardso you ship that binary and you're done16:25
herald85I misread the docs and added ara_ to all the vars in the ansible.cfg16:25
Led_Zeppelindmsimard, bingo!16:25
Led_Zeppelindmsimard, i am learning go; i can help you with any ansible golang projects :p16:26
XarothYeah, but that means you have to trust that binary16:26
dmsimardLed_Zeppelin: maybe we'll need a golang API client for ara one day, I'll be in touch :p16:26
dmsimardXaroth: yup, but you have that problem with python to some extent as well16:27
dmsimardI am a packager for different packages in fedora/centos16:27
herald85eurka, we have fancy logs16:27
dmsimardand sometimes it's not very fun16:27
XarothWe at some point ran out own Deb build farm because our customer refused to use binaries from "outside sources"16:27
herald85eureka even16:27
XarothThat was a fun project16:27
dmsimardherald85: yay16:28
dmsimardLed_Zeppelin, herald85: the web interface isn't super intuitive (because I'm not a frontend person and I've done a lot of copy/pasting) but there's a video where I go through the different features in case it might be helpful: https://www.youtube.com/watch?v=k3i8VPCanGo16:29
herald85i'll check it out tomorrow, thanks for the help !16:31
Led_Zeppelinyeah, i am not good with webinterfaces. But I believe thats the reason most people will use ara. I think the setup should be much easier. Basically, set the environment variable for the call back. The call back should just POST to the running webserver. The webserver should ingest and store into a database and also serve the results.16:31
Led_Zeppelinthe call back mechanism should be dead simple. you set 1 variable. the http host endpoint and done!16:32
dmsimardLed_Zeppelin: that's more or less how 1.0 will work but I did not want to make running an API server or a web server mandatory16:32
dmsimardso it defaults to localhost/offline16:32
Led_Zeppelini see16:32
dmsimardyou can set a remote api server, but you don't need to16:32
Led_Zeppelinthat would be nice.16:32
herald85one last question: if I had multiple hosts running ansible scripts, do they each get their own mysql/postgres or is there an identifier in the DB?16:34
XarothYou can make multiple instances write to 1 db16:35
dmsimardLed_Zeppelin: to give you an idea of what the API clients look like: http://paste.openstack.org/show/736325/16:36
dmsimardherald85: you can have everything use the same database, or different databases, that's up to you16:37
Led_Zeppelingoing to use swagger or raml?16:37
dmsimardLed_Zeppelin: neither, it leverages django-rest-framework (same thing as Ansible Tower and AWX)16:37
dmsimardI believe django-rest-framework has implementations for swagger16:38
Led_Zeppelinok16:38
herald85thanks again, cya tomorrow for more ARA probing16:39
*** herald85 has quit IRC16:39
dmsimardLed_Zeppelin: so are you really Led Zeppelin ? :p16:41
Led_Zeppelinha yeah16:41
dmsimardachievement unlocked, get a band to try ara16:41
*** themroc has quit IRC17:09
*** dougbtv has joined #ara17:27
*** sshnaidm is now known as sshnaidm|afk18:01
Led_Zeppelinso, does ara only work with ansible-playbooks? not for ansible command?20:09
Xarothcorrect20:10
Led_Zeppelinso, if I want to do ansible -m ping it won't work. is there a work around for it?20:10
Led_Zeppelinor don't even bother20:10
Xarothturn it into a playbook? :P20:10
Led_Zeppelinyep. thats what I will do20:10
Xarothansible-playbook ping.yml20:11
dmsimardIt might be possible to record adhoc things in the future. It's on the todo list to investigate.20:30
*** openstackgerrit has quit IRC20:36
*** dbpiv has quit IRC20:39
*** bcoca has quit IRC22:12
dmsimardIf you speak french, you might be interested in a presentation I did about ARA to Ansible meetups in France today: https://www.youtube.com/watch?v=BlU_QnxRaPA22:22
dmsimardIf you don't, well, there's going to be an english version available eventually :)22:22
*** dbpiv has joined #ara22:45
XarothMy French teacher quickly realized that teaching me French was not really going to happen, so I'll wait for the English one :D22:51
*** dbpiv has quit IRC22:53

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