*** spiette has quit IRC | 00:29 | |
*** spiette has joined #ara | 00:31 | |
*** dbpiv has joined #ara | 01:16 | |
*** spiette has quit IRC | 01:21 | |
*** spiette has joined #ara | 01:23 | |
dmsimard | larsks: https://github.com/ansible/ansible/issues/57950 | 02:11 |
---|---|---|
dmsimard | sounds like what we had chatted about the other day | 02:12 |
*** dbpiv has quit IRC | 02:54 | |
*** spiette has quit IRC | 05:27 | |
*** spiette_ has joined #ara | 05:28 | |
*** irclogbot_3 has quit IRC | 05:30 | |
*** irclogbot_2 has joined #ara | 05:30 | |
*** herald85 has joined #ara | 06:31 | |
*** gvincent has joined #ara | 06:33 | |
*** micisuta has joined #ara | 08:35 | |
jungleslow | Hey David, the method with build/ seems to work. Just needed to install the nodejs LTS otherwise apt will give you a really old version of nodejs (Xenial) | 10:07 |
jungleslow | Do you have any apache2 configuration ? :D | 10:08 |
*** sshnaidm is now known as sshnaidm|afk | 10:24 | |
*** spiette_ has quit IRC | 10:50 | |
*** dbpiv has joined #ara | 11:20 | |
dmsimard | jungleslow: the Ansible roles for the API and ara-web set up nginx. Would definitely accept patches for Apache :p | 11:48 |
dmsimard | See https://github.com/ansible-community/ara/tree/master/roles/ara_frontend_nginx/templates | 11:49 |
dmsimard | And customized a bit here: https://github.com/ansible-community/ara-infra/tree/master/playbooks/templates | 11:50 |
*** mgariepy has joined #ara | 12:15 | |
*** sshnaidm|afk is now known as sshnaidm | 12:29 | |
Marbug | I'm trying to get the new ARA to wrok, but when I have been able to setup the API, the database stays empty. Before it was automatically initialized, but I have a hard time finding something to initialize the database? btw I'm using mariadb ad a database engine (mysql) | 12:49 |
dmsimard | Marbug: we don't have integration tests for mysql (yet) so I don't have documentation to point you at | 12:56 |
dmsimard | How did you set it up ? | 12:56 |
Marbug | dmsimard I created a small role to setup an alpine lxd container which has "ara-manager runserver <ip>:<port>" as an init script started, and I push the settings.yaml file to the fefault location. So I have the api listening to port 8000. When I go to that endpoint through my brower, by default I could see the api json returning. And when I go thro | 12:59 |
Marbug | ugh the api navigating to the playbooks, I get bad request. | 12:59 |
Marbug | When I checked the database, there are no tables present | 12:59 |
dmsimard | The tables can be created with "ara-manage migrate" | 12:59 |
Marbug | I'm trying to get my ansible configured now, as I did want to test if the database would get populated when I run a playbook | 12:59 |
Marbug | oh, that was one of the commands I didn't tried 😅 | 13:00 |
dmsimard | The bad request might be due to the ALLOWED_HOSTS setting | 13:00 |
Marbug | well no actually not :) When I checked the logs, it mentioned that the table playbooks didn't existed :) | 13:00 |
dmsimard | Oh, well, that too | 13:02 |
dmsimard | You'll need a mysql client library installed too | 13:03 |
dmsimard | For postgre it's psycopg2 | 13:03 |
dmsimard | Django recommends "mysqlclient" https://docs.djangoproject.com/en/2.2/ref/databases/#mysql-db-api-drivers | 13:04 |
Marbug | yeps that is done already too, otherwise I got a stack thrown when I had mysql configured and tried to execute even --help on ara-manage :) | 13:04 |
dmsimard | apollo13: is mysqlclient really the go-to lib ? | 13:05 |
dmsimard | openstack is all over pymysql | 13:06 |
Marbug | dmsimard, so after running "ara-manage migrate" the tables where created and I didn't had any bad request anymore, success! :) | 13:06 |
dmsimard | Marbug: awesome | 13:06 |
*** krion has quit IRC | 13:09 | |
dmsimard | So we need something like https://github.com/ansible-community/ara/blob/master/roles/ara_api/tasks/database_engine/django.db.backends.postgresql.yaml | 13:10 |
dmsimard | But for mysql | 13:11 |
dmsimard | And then we can integration test it with something like https://github.com/ansible-community/ara/blob/master/tests/with_postgresql.yaml | 13:13 |
Marbug | I suppose you already got mysql to work ? | 13:16 |
dmsimard | When I last tried, mysqlclient was a bit of a pain to get to work properly and consistently across different distros | 13:23 |
dmsimard | And then there was the question of mariadb vs mysql | 13:23 |
*** spiette has joined #ara | 13:24 | |
dmsimard | It needed taking some decisions that I wasn't ready for at the time but postgre was easy to set up so there you go | 13:26 |
Marbug | I just use mariadb and installed mysqlclient and from the pakat manager of the distro, on alpine I needed to install mariadb-dev, for ubuntu/debian it's potentially libmysqlclient-dev | 13:28 |
Marbug | or libmariadbclient-dev | 13:28 |
Marbug | I also had some pain with getting the mysqlclient to work, but it just needed the dev library files (potencially the headers) | 13:29 |
dmsimard | Yeah pymysql is less of a pain in that regard | 13:32 |
dmsimard | Seems possible to use pymysql but it goes against the django recommendation: https://stackoverflow.com/a/34778155 | 13:33 |
dmsimard | There's a ticket here that lead nowhere https://code.djangoproject.com/ticket/28145 | 13:34 |
openstack | Django bug 28145 in Documentation "Django documention - MySQL database connector - PyMySQL for python 3 support" [Normal,Closed] - Assigned to Unknown | 13:34 |
Marbug | well imo I think you could go best for the mysqlclient connector instead of the pymysql as it isn't recomended for django, well that I what I had read if I'm correct | 13:36 |
Marbug | I'm living proof that it works, even on alpine.. :D | 13:36 |
*** krion_ has joined #ara | 13:40 | |
*** krion_ is now known as krion | 13:40 | |
*** krion has quit IRC | 13:50 | |
*** krion has joined #ara | 13:55 | |
larsks | dmsimard: thanks for the pointer re: that ansible docs issue! | 13:57 |
dmsimard | larsks: it's rabbithole-ish (between the different issues and discussions) but the general topic is the same :p | 13:58 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Test noop change https://review.opendev.org/666297 | 14:01 |
openstackgerrit | Merged recordsansible/ara-infra master: Update github link to use ansible-community instead of openstack https://review.opendev.org/664268 | 14:11 |
dmsimard | Marbug: people much smarter than I am once decided to switch everything in openstack to pymysql https://wiki.openstack.org/wiki/PyMySQL_evaluation | 14:20 |
dmsimard | and it turns out it's much easier to install and packaged in most distros | 14:20 |
dmsimard | it looks like pymysql "hacked" supported got broken between django 2.1 and 2.2 | 14:22 |
dmsimard | s/supported/support/ | 14:22 |
dmsimard | I'll try to take another look at mysqlclient at one point, it's just harder to support from a project perspective | 14:23 |
apollo13 | dmsimard: I think django supports (or supported both), but I do not use mysql so… | 14:49 |
apollo13 | (that is via the pymysql compatibility layer) | 14:50 |
apollo13 | anyways, time to party, bbl | 14:50 |
*** herald85 has quit IRC | 15:05 | |
Marbug | dmsimard potencially due to the fact that you don't need the header files, which means you don't need much overhead | 15:27 |
Marbug | anything as long as it works is fine for me anyway :) | 15:27 |
Marbug | still got the issue with the action module though always throwing The error was: KeyError: 'api_client' error | 15:28 |
Marbug | anyway, that is something I'll check for tomorrow, today was good enough already 😅 | 15:29 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: WIP: Add support for mysql backend https://review.opendev.org/666317 | 15:31 |
dmsimard | Marbug: can you create an issue with the trace for the api_client keyerror ? | 15:32 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Test noop change https://review.opendev.org/666297 | 15:35 |
*** micisuta has quit IRC | 16:10 | |
*** etienne has joined #ara | 17:11 | |
Marbug | sure dmsimard I'll check it tomorrow when I'm back at the office, I think something is wrong somewhere, but I want to double check tha it isn't a mistake I made somewhere | 17:14 |
*** micisuta has joined #ara | 18:17 | |
*** micisuta1 has joined #ara | 18:19 | |
*** micisuta has quit IRC | 18:21 | |
*** micisuta1 is now known as micisuta | 18:21 | |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Stop specifying the python interpreter as Zuul job vars https://review.opendev.org/666297 | 18:43 |
dmsimard | Marbug: much appreciated <3 | 18:43 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: WIP: Add support for mysql backend https://review.opendev.org/666317 | 18:54 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app https://review.opendev.org/665323 | 18:54 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: WIP: Implement Ansible lookup plugin to query the ARA API https://review.opendev.org/663968 | 18:54 |
*** dbpiv has quit IRC | 19:13 | |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Add support for mysql backend in the ara_api role https://review.opendev.org/666317 | 19:29 |
dmsimard | black and pep8 disagreeing on how a line should be written :( | 19:32 |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app https://review.opendev.org/665323 | 19:34 |
*** dbpiv has joined #ara | 20:16 | |
*** micisuta has quit IRC | 21:05 | |
openstackgerrit | David Moreau Simard proposed recordsansible/ara master: Re-structure integration tests https://review.opendev.org/666297 | 21:27 |
*** dbpiv has quit IRC | 21:36 | |
*** zbr|ruck has quit IRC | 22:17 | |
*** dmsimard0 has joined #ara | 23:08 | |
*** dmsimard has quit IRC | 23:08 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!