Thursday, 2019-04-18

*** dmsimard5 has joined #ara00:54
*** sshnaidm has quit IRC01:02
*** harlowja has quit IRC01:02
*** dmsimard has quit IRC01:02
*** dmsimard5 is now known as dmsimars01:03
*** dmsimars is now known as dmsimard01:03
*** irclogbot_3 has quit IRC01:05
*** irclogbot_2 has joined #ara01:05
*** sshnaidm has joined #ara01:08
*** harlowja has joined #ara01:08
*** gvincent has quit IRC05:35
*** gvincent has joined #ara06:53
*** gvincent has quit IRC07:04
*** gvincent has joined #ara07:05
*** gvincent has quit IRC07:50
*** gvincent has joined #ara12:21
*** herald85 has joined #ara12:59
*** vincent- has joined #ara13:17
vincent-One question. Does ara record the run when running "ansible-playbook" in check mode?13:18
*** herald85 has quit IRC13:19
dmsimardvincent-: yes but they aren't differentiated from normal runs from a UI perspective (yet)13:48
dmsimardYou can find the "check" variable as true or false under the playbook parameters13:48
*** herald85 has joined #ara13:49
vincent-dmsimard, I have run the playbook without check. It doesn't matter :-)13:54
vincent-I have worse problems than that. For instance, even if I have installed "ara-plugins" and "ara-clients", when I do "python -m ara.plugins" it tells me the ara module does not exist.13:55
dmsimardara-plugins no longer exists since alpha3, everything was melded back into ara13:59
dmsimardpip install ara --pre will get you alpha4 with clients and plugins included14:00
dmsimardWhat instructions did you follow for your installation ? I might have forgotten to update docs or something.14:01
vincent-Uhm..., I think it's better if I explain what I'm trying to achieve so you can help me better. I want to setup on a separate host the ara API server. On a separate host, a database. And on all the laptops I use for running Ansible, I want to install the ara plugins so it will record the playbook run and will pass it to the API server.14:03
vincent-I don't want a bloated installation of ara that contains everything in my laptops, for instance.14:04
dmsimardBloated is a big word, 1.0 is already far more lightweight than 0.x :p14:05
dmsimardMaking the plugins available as a standalone package is on the todo list but it's not available yet.14:06
vincent-dmsimard, well, what I mean is, it feels wrong to me that if I don't want to have the server on my client machines (the ones that run ansible-playbook), by installing ara it also installs the server and all its dependencies.14:06
dmsimardYes, I realize that and that's why ara-plugins was created in the first place14:08
vincent-In an organization, many people can run ansible-playbook from their laptops. They all should be storing the logs in the same server, so, why installing the server on each laptop? The server should be centralised.14:09
vincent-From what I read in the last post, ara-plugins, ara-clients and ara-server were put together into the same git repo.14:10
dmsimardThe server /can/ be centralized14:10
vincent-But I didn't understood you couldn't install those three elements separately.14:11
dmsimardThey'll be made available separately, it's a matter of time14:11
vincent-That will be nice :-)14:12
dmsimardBut back to bloat14:12
dmsimardCreate two separate venvs14:12
dmsimardInstall ara 0.x in the first and 1.0 in the second14:12
dmsimardWatch the amount of deps that 0.x pulls in14:13
dmsimardCompared to 1.014:13
dmsimardI understand that you don't want to install the server code if you don't need it but the overhead is minimal and the server code simply won't be used or running14:14
dmsimardIMO not a blocker to get started and you can move to the standalone packages when they're available14:14
vincent-I'll try it :-)14:15
dmsimardYou can use the role to deploy and configure your API server: https://ara.readthedocs.io/en/feature-1.0/ansible-role-ara-api.html14:16
dmsimardIt's in the git source for now but it'll be available in other ways eventually14:17
dmsimardhttps://github.com/ansible-community/ara/tree/feature/1.0/roles14:17
vincent-dmsimard, is ara-1.0 python3 only? Or only for the api server?14:18
dmsimardThis is what was used to deploy https://api.demo.recordsansible.org/api/v1/ with https://github.com/ansible-community/ara-infra/blob/master/playbooks/live-demo.yaml14:18
dmsimardPython3 for the API. The plugins and clients are not tested for py2 right now but I'd like for them to work with both.14:20
dmsimardbtw, back to your database server you mentioned14:21
dmsimardIt's a good idea to minimize the latency wherever you can since even a 10ms roundtrip adds up quickly over the course of a playbook14:21
dmsimardI'd keep the database running on the same machine as the API server unless you're running at a scale that justifies something else14:23
vincent-One problem I'm facing is, the latest ara available with "pip install" is 1.0.0a4. When I try to install that with python2, it depends on a version of Django that is not available for python2.14:24
vincent-dmsimard> I'd keep the database running on the same machine as the API server unless you're running at a scale that justifies something else14:24
vincent-I'll keep that advise in mind. Thanks.14:24
dmsimardThe API parts (django/django-rest-framework) will never be available under py2. py2 is EOL next year and it was not realistic or sustainable to write new code to work with py2.14:26
dmsimardHowever, the API server is an excellent candidate for living in a container14:27
dmsimardSo you could technically run a container with a py3 interpreter (fedora, ubuntu, etc) on a py2 host.14:28
vincent-I was planing to have the API server on a container with Python3.14:28
dmsimardI'd love to see that when you get it working, good opportunity to land it in the project :)14:29
vincent-However, my client machines run ansible-playbook in a container which only has python2, so if I want to install ara in there, it fails with that error.14:29
vincent-dmsimard> It's a good idea to minimize the latency wherever you can since even a 10ms roundtrip adds up quickly over the course of a playbook14:40
vincent-Regarding that...14:40
vincent-I was expecting the ansible-playbook command run until the end, and after that, ara picks up the log and does an HTTP request to the API server.14:41
vincent-Doesn't work in that way?14:41
dmsimardvincent-: I don't have a good solution for py2 right now14:41
dmsimardNo, not at all14:41
dmsimardara doesn't have access to the log14:42
vincent-So it makes HTTP requests as the ansible-playbook outputs stuff?14:42
dmsimardIt doesn't use the log or the output, it is a native callback plugin14:43
dmsimardhttps://ara.readthedocs.io/en/feature-1.0/architecture.html14:43
vincent-I see...14:45
vincent-From that doc, "The API server validates and serializes the data before storing it the configured database backend". Is up to the API server to decide the amount of data it serializes before storing it into the DB.14:47
vincent-Perhaps it could send data to the DB based not only on the amount of data, but also on a time basis, so you don't flood the DB server with too many requests?14:48
vincent-That latency of 10ms you told me before scared me. And having the DB server in the same container where the API server runs is not something I would do.14:49
*** gvincent has quit IRC14:50
*** herald85 has quit IRC15:19
*** sshnaidm has quit IRC15:27
*** sshnaidm has joined #ara15:38
dmsimardvincent-: not necessarily in the same container but on the same host16:17
dmsimardThe data is sent in real time by callback hooks16:17
dmsimardAsynchronous processing would need to rely on something like a message bus which is not out of the question but is not a priority at this time16:18
vincent-Yes, I understand.16:18
vincent-It would be a nice feature. Accumulate the data in the API server and send it in batches to the DB.16:19
*** etienne has quit IRC17:01
*** sshnaidm is now known as sshnaidm|off18:32

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