Wednesday, 2019-06-19

*** spiette has quit IRC00:29
*** spiette has joined #ara00:31
*** dbpiv has joined #ara01:16
*** spiette has quit IRC01:21
*** spiette has joined #ara01:23
dmsimardlarsks: https://github.com/ansible/ansible/issues/5795002:11
dmsimardsounds like what we had chatted about the other day02:12
*** dbpiv has quit IRC02:54
*** spiette has quit IRC05:27
*** spiette_ has joined #ara05:28
*** irclogbot_3 has quit IRC05:30
*** irclogbot_2 has joined #ara05:30
*** herald85 has joined #ara06:31
*** gvincent has joined #ara06:33
*** micisuta has joined #ara08:35
jungleslowHey 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
jungleslowDo you have any apache2 configuration ? :D10:08
*** sshnaidm is now known as sshnaidm|afk10:24
*** spiette_ has quit IRC10:50
*** dbpiv has joined #ara11:20
dmsimardjungleslow: the Ansible roles for the API and ara-web set up nginx. Would definitely accept patches for Apache :p11:48
dmsimardSee https://github.com/ansible-community/ara/tree/master/roles/ara_frontend_nginx/templates11:49
dmsimardAnd customized a bit here: https://github.com/ansible-community/ara-infra/tree/master/playbooks/templates11:50
*** mgariepy has joined #ara12:15
*** sshnaidm|afk is now known as sshnaidm12:29
MarbugI'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
dmsimardMarbug: we don't have integration tests for mysql (yet) so I don't have documentation to point you at12:56
dmsimardHow did you set it up ?12:56
Marbugdmsimard 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 thro12:59
Marbugugh the api navigating to the playbooks, I get bad request.12:59
MarbugWhen I checked the database, there are no tables present12:59
dmsimardThe tables can be created with "ara-manage migrate"12:59
MarbugI'm trying to get my ansible configured now, as I did want to test if the database would get populated when I run a playbook12:59
Marbugoh, that was one of the commands I didn't tried 😅13:00
dmsimardThe bad request might be due to the ALLOWED_HOSTS setting13:00
Marbugwell no actually not :) When I checked the logs, it mentioned that the table playbooks didn't existed :)13:00
dmsimardOh, well, that too13:02
dmsimardYou'll need a mysql client library installed too13:03
dmsimardFor postgre it's psycopg213:03
dmsimardDjango recommends "mysqlclient" https://docs.djangoproject.com/en/2.2/ref/databases/#mysql-db-api-drivers13:04
Marbugyeps 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
dmsimardapollo13: is mysqlclient really the go-to lib ?13:05
dmsimardopenstack is all over pymysql13:06
Marbugdmsimard, so after running "ara-manage migrate" the tables where created and I didn't had any bad request anymore, success! :)13:06
dmsimardMarbug: awesome13:06
*** krion has quit IRC13:09
dmsimardSo we need something like https://github.com/ansible-community/ara/blob/master/roles/ara_api/tasks/database_engine/django.db.backends.postgresql.yaml13:10
dmsimardBut for mysql13:11
dmsimardAnd then we can integration test it with something like https://github.com/ansible-community/ara/blob/master/tests/with_postgresql.yaml13:13
MarbugI suppose you already got mysql to work ?13:16
dmsimardWhen I last tried, mysqlclient was a bit of a pain to get to work properly and consistently across different distros13:23
dmsimardAnd then there was the question of mariadb vs mysql13:23
*** spiette has joined #ara13:24
dmsimardIt needed taking some decisions that I wasn't ready for at the time but postgre was easy to set up so there you go13:26
MarbugI 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-dev13:28
Marbugor libmariadbclient-dev13:28
MarbugI also had some pain with getting the mysqlclient to work, but it just needed the dev library files (potencially the headers)13:29
dmsimardYeah pymysql is less of a pain in that regard13:32
dmsimardSeems possible to use pymysql but it goes against the django recommendation: https://stackoverflow.com/a/3477815513:33
dmsimardThere's a ticket here that lead nowhere https://code.djangoproject.com/ticket/2814513:34
openstackDjango bug 28145 in Documentation "Django documention - MySQL database connector - PyMySQL for python 3 support" [Normal,Closed] - Assigned to Unknown13:34
Marbugwell 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 correct13:36
MarbugI'm living proof that it works, even on alpine.. :D13:36
*** krion_ has joined #ara13:40
*** krion_ is now known as krion13:40
*** krion has quit IRC13:50
*** krion has joined #ara13:55
larsksdmsimard: thanks for the pointer re: that ansible docs issue!13:57
dmsimardlarsks: it's rabbithole-ish (between the different issues and discussions) but the general topic is the same :p13:58
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Test noop change  https://review.opendev.org/66629714:01
openstackgerritMerged recordsansible/ara-infra master: Update github link to use ansible-community instead of openstack  https://review.opendev.org/66426814:11
dmsimardMarbug: people much smarter than I am once decided to switch everything in openstack to pymysql https://wiki.openstack.org/wiki/PyMySQL_evaluation14:20
dmsimardand it turns out it's much easier to install and packaged in most distros14:20
dmsimardit looks like pymysql "hacked" supported got broken between django 2.1 and 2.214:22
dmsimards/supported/support/14:22
dmsimardI'll try to take another look at mysqlclient at one point, it's just harder to support from a project perspective14:23
apollo13dmsimard: 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
apollo13anyways, time to party, bbl14:50
*** herald85 has quit IRC15:05
Marbugdmsimard potencially due to the fact that you don't need the header files, which means you don't need much overhead15:27
Marbuganything as long as it works is fine for me anyway :)15:27
Marbugstill got the issue with the action module though always throwing The error was: KeyError: 'api_client' error15:28
Marbuganyway, that is something I'll check for tomorrow, today was good enough already 😅15:29
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: WIP: Add support for mysql backend  https://review.opendev.org/66631715:31
dmsimardMarbug: can you create an issue with the trace for the api_client keyerror ?15:32
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Test noop change  https://review.opendev.org/66629715:35
*** micisuta has quit IRC16:10
*** etienne has joined #ara17:11
Marbugsure 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 somewhere17:14
*** micisuta has joined #ara18:17
*** micisuta1 has joined #ara18:19
*** micisuta has quit IRC18:21
*** micisuta1 is now known as micisuta18:21
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Stop specifying the python interpreter as Zuul job vars  https://review.opendev.org/66629718:43
dmsimardMarbug: much appreciated <318:43
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: WIP: Add support for mysql backend  https://review.opendev.org/66631718:54
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app  https://review.opendev.org/66532318:54
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: WIP: Implement Ansible lookup plugin to query the ARA API  https://review.opendev.org/66396818:54
*** dbpiv has quit IRC19:13
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Add support for mysql backend in the ara_api role  https://review.opendev.org/66631719:29
dmsimardblack and pep8 disagreeing on how a line should be written :(19:32
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Add distributed_sqlite db backend and WSGI app  https://review.opendev.org/66532319:34
*** dbpiv has joined #ara20:16
*** micisuta has quit IRC21:05
openstackgerritDavid Moreau Simard proposed recordsansible/ara master: Re-structure integration tests  https://review.opendev.org/66629721:27
*** dbpiv has quit IRC21:36
*** zbr|ruck has quit IRC22:17
*** dmsimard0 has joined #ara23:08
*** dmsimard has quit IRC23:08

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