Tuesday, 2019-05-28

*** herald85 has joined #ara06:06
*** gvincent has joined #ara06:36
*** gvincent has quit IRC06:44
*** logan- has quit IRC07:33
*** logan- has joined #ara07:33
*** gvincent has joined #ara08:00
*** vincent- has joined #ara09:22
*** odyssey4me has left #ara10:51
*** dbpiv has joined #ara11:52
*** idir__ has joined #ara14:16
*** idir__ has quit IRC15:16
*** idir__ has joined #ara15:17
idir__hi, i'm trying to setup the new version of ara, but the interface does not show any data ( the database and the ara-api are ok) can you help me please ?15:20
dmsimardidir__: sure thing15:24
dmsimardidir__: are you able to browse the API web interface ?15:25
dmsimardshould look like this: https://api.demo.recordsansible.org/api/v1/15:25
idir__ I can access the interface but no data is displayed while there is data in the database15:26
idir__ and the API is ok, I can see the data on the interface django framework15:28
idir__ in summary the web ara interface is displayed, the interface API django framework is also functional with the good data retrieved, but on the ara-web interface no data15:30
dmsimardidir__: so in public/config.json, there is a configuration option that needs to be set to where the API server is hosted: https://github.com/ansible-community/ara-web/blob/master/public/config.json15:31
idir__ yes I have set the address of the API, http: // ip: port/api/v1/  in ​​the json file15:32
idir__i using ansible roles to install all the part of ara and the database15:34
dmsimardidir__: don't add /api/v115:34
dmsimardjust the URL15:34
dmsimardlike the link I just provided, "apiURL": "http://localhost:8000" -- not "http://localhost:8000/api/v1"15:35
idir__i have the ara-web and ara-api in the same host,  so I need to put localhost or the IP address?15:37
*** etienne has joined #ara15:38
dmsimardidir__: it depends on the address the server is listening on15:38
dmsimardidir__: if it's listening on 127.0.0.1, you'd need to put 127.0.0.115:39
dmsimardif it's listening on, say, 0.0.0.0, it can be any IP or hostname that resolves to your machine15:39
idir__yes it's 127.0.0.1:800015:40
*** spiette_ has joined #ara15:41
*** spiette has quit IRC15:41
dmsimardgvincent: considering we have a proper "/" now with https://api.demo.recordsansible.org/, we should probably have an error that differentiates between "I contacted the API server but it's empty" vs "There's no API server at this destination"15:44
idir__with 127.0.0.1 it does not work :/15:44
dmsimardidir__: let me try to reproduce locally15:44
idir__ok15:45
idir__ thank you for giving me all this attention :)15:46
dmsimardgvincent: created issue as https://github.com/ansible-community/ara-web/issues/915:49
dmsimardidir__: running the API server (ara-manage runserver 127.0.0.1:8000) and the web client with defaults (npm install, npm start -- localhost:3000) works for me15:52
dmsimardidir__: how are you running the API server ?15:52
dmsimardalso, are you running the latest versions ?15:53
openstackgerritDavid Moreau Simard proposed recordsansible/ara-web master: Add a note about configuring public/config.json in the README  https://review.opendev.org/66179815:54
openstackgerritDavid Moreau Simard proposed recordsansible/ara-web master: Add a note about configuring public/config.json in the README  https://review.opendev.org/66179815:55
idir__dmsimard:  I run it from an ansible role that uses gunicorn15:57
dmsimardidir__: the bundled ara_api role ?15:58
idir__yes15:58
idir__and the role ara-web also15:59
dmsimardok, is there nginx in front ?15:59
idir__yes15:59
dmsimardidir__: what linux distro ?16:03
idir__rhel 716:04
idir__ now i have retrieved the request from the browser and I see http://127.0.0.1:8000/api/v1/playbooks (failed)16:04
openstackgerritDavid Moreau Simard proposed recordsansible/ara-web master: Fix contributors link from /openstack/ to /ansible-community/  https://review.opendev.org/66180116:05
dmsimardidir__: I'm not sure I follow -- it fails now but it didn't earlier ?16:05
idir__before there was not this query16:07
idir__i think i have to set the external ip address16:07
idir__but when i curl inside the host http://127.0.0.1:8000/api/v1/playbooks  it works16:09
dmsimardidir__: so the way this works is that your browser is the one doing API requests16:10
dmsimardidir__: if the API server is set to 127.0.0.1, your browser will query 127.0.0.1 which won't work if the API server isn't running on your local machine16:11
idir__ yes it's normal, now I just put the address of the machine16:13
dmsimardidir__: slightly related, I'm interested how you got the new version of ara working on rhel 7 :)16:13
dmsimardDid you use software collections ?16:13
*** ChanServ sets mode: +o dmsimard16:14
idir__Request URL: http://192.168.226.59:8000/api/v1/playbooks Request Method: GET Status Code: 200 OK16:14
idir__ but no data displayed oo'16:15
dmsimardidir__: 192.168.226.59 needs to be added to ALLOWED_HOSTS and CORS_ORIGIN_WHITELIST16:15
dmsimardwell, hang on16:16
dmsimardnot ALLOWED_HOSTS since you're running off of 127.0.0.1 and that's fine16:16
dmsimardbut you might have a CORS error in your browser console16:16
idir__yes i have this error now16:17
dmsimardidir__: there's a variable for that in the role https://github.com/ansible-community/ara-infra/blob/47ecb4fa1176cbe9f8a0f0e42477551df3ec5f7a/playbooks/live-demo.yaml#L1316:18
idir__ yes I edit in a variable file16:19
idir__i'm deploying changes16:21
idir__so i add the ip to the whitelist16:21
*** herald85 has quit IRC16:25
idir__dmsimard yes it works \o/16:26
idir__ in summary I use nginx with a server_name, and I had to add it in the whitelist. and also in the config.json I have the address 192.168 ...16:28
openstackgerritDavid Moreau Simard proposed recordsansible/ara feature/1.0: Add missing selinux policy package for running gunicorn  https://review.opendev.org/66180816:28
dmsimardidir__: nice job16:29
openstackgerritMerged recordsansible/ara-web master: Add a note about configuring public/config.json in the README  https://review.opendev.org/66179816:29
dmsimardidir__: did you use python3 from EPEL or from software collections to run this new version ?16:29
idir__ j'ai pas bien compris la question, mais python3 était déja installé sur la machine16:31
idir__ I did not understand the question, but python3 was already installed on the machine16:31
dmsimardrhel7 doesn't ship python3 by default so I was curious :)16:33
dmsimardThanks for trying out the beta, I've already taken a few notes and sent a few fixes :p16:33
idir__ yes it's a symbolic link to python 316:34
idir__ thank you very much, I also added to the roles / vars the RedHat os familly16:36
idir__ il était très intéressant de comprendre tous les rôles et la personnalisation pour Redhat16:37
idir__it was very interesting to understand all the roles and customising for Redhat16:37
dmsimardMerci! :)16:39
idir__;)16:40
*** idir__ has quit IRC16:45
*** etienne has quit IRC17:10
*** etienne has joined #ara17:11
*** irclogbot_2 has quit IRC17:17
*** irclogbot_3 has joined #ara17:17
openstackgerritMerged recordsansible/ara-web master: Fix contributors link from /openstack/ to /ansible-community/  https://review.opendev.org/66180118:17
openstackgerritDavid Moreau Simard proposed recordsansible/ara feature/1.0: Add missing selinux policy package for running gunicorn  https://review.opendev.org/66180818:20
*** harlowja has joined #ara21:44

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