Monday, 2020-08-10

*** schnipdip has joined #ara00:47
schnipdipHi00:48
*** schnipdip has quit IRC00:52
*** schnipdip has joined #ara01:52
schnipdipcan I stream the data using the API into plotext for real time data analytics>?01:56
schnipdipalso, there should be dependency checks on the nodejs installation? I ran into an issue with installing it. It was trying to pass apt-key add -... which isn't a parsable field02:12
dmsimardschnipdip: hey, it's a bit late but happy to chat tomorrow03:24
dmsimardara-web is a bit neglected right now but there's a simple reporting UI built-in to the API server03:25
schnipdipcool beans :) I appreciate it :D04:08
*** evrardjp has quit IRC04:33
*** evrardjp has joined #ara04:33
*** schnipdip has quit IRC05:05
*** TKersten has joined #ara06:50
*** sshnaidm|off is now known as sshnaidm09:44
*** apollo13 has quit IRC09:53
*** apollo13 has joined #ara09:55
*** mgariepy has quit IRC11:05
*** TKersten has left #ara11:05
*** yeled has quit IRC11:23
*** yeled has joined #ara11:34
*** mgariepy has joined #ara12:32
*** dbpiv has joined #ara12:54
*** schnipdip has joined #ara13:19
*** schnipdip has quit IRC13:48
*** bwatson has quit IRC14:06
*** dbpiv has joined #ara14:17
*** mgariepy has quit IRC15:31
*** dbpiv has quit IRC16:12
*** mgariepy has joined #ara16:36
*** schnipdip has joined #ara17:04
schnipdipIs there a configuration file to change the IP address of the development server?17:04
schnipdipbuilt from pip317:12
*** dbpiv has joined #ara17:16
dmsimardschnipdip: ara-manage runserver 0.0.0.0:800017:29
dmsimardyou might need to edit ALLOWED_HOSTS to take into account the hostname/ip under which you expect to access it17:30
schnipdipcool beans :D  I'll give it a shot. I'm really excited about setting up Ara. My friend and I wanted to build an Ansible plugin for task time data analytics. We ended up with the same design, except for the API server, as Ara (before we discovered Ara)17:31
schnipdipIs allowed_hosts a django setting?17:32
dmsimardyeah it's a django setting -- ara creates a default configuration file you can edit in ~/.ara/server/settings.yaml17:33
dmsimardschnipdip: happy that you're excited, ara isn't perfect but I like to think it has a lot of potential :p17:34
schnipdipIt does! We want to utilize the API to out the analytics to a stream plotter17:35
dmsimardbtw there's new CLI commands in master that haven't been released yet.17:35
dmsimardfor lack of demo, there's some screenshots on https://twitter.com/arecordsansible17:37
schnipdipCool! I will take a look at it in a bit. I'm receiving a 400 bad request error at the moment. Just added 0.0.0.0 to Allowed_hosts (i'm not an web app guy as you can tell).17:39
dmsimard0.0.0.0 is the listen address (on all addresses)17:39
dmsimardyou need to add the address or hostname you're trying to reach, like ara.tld or 192.168.x.x or whatever17:40
dmsimardalso if you installed from pip, you might have picked up a settings regression from a dependency. There's an issue for it but it's not fixed yet. You can workaround by downgrading to the previous version: pip install "dynaconf<3.0"17:43
schnipdipOkay, I will give it a shot. I'm still receiving a 400 error. I added the local host IPv4 to the ALLOWED_HOSTS and 0.0.0.0.17:46
dmsimardyeah the regression can prevent settings from being loaded properly :(17:49
schnipdiphttps://imgur.com/a/wMJ1glx17:54
schnipdipHere is what I'm seeing17:54
dmsimardthe version of dynaconf looks alright but the fact that the settings file isn't being loaded properly reminds me of the issue a lot17:58
schnipdipMy env set up:17:58
dmsimardhow did you install with pip ? system-wide ? --user ?17:59
dmsimardI'm not saying that this is what is happening here but you could have different versions installed across different librairies or interpreters17:59
schnipdiplet me take a look at my command history17:59
schnipdipmm great it didn't record that pip command. I believe i copy pastaed out of Git18:01
dmsimardwhere is ara-manage ? you can tell with "which ara-manage"18:01
schnipdip~/.local/bin/ara-manage18:01
dmsimardok so that means it was installed with --user, otherwise it'd be in /usr/bin or /usr/local/bin18:02
dmsimardthe pip show command you gave me ran as root so that returned the version of the packaged installed in the system librairies18:03
dmsimardpython packaging is confusing :p18:03
dmsimardtry: pip install --user "dynaconf<3.0"18:03
schnipdipIt's pretty confusing haha. So I ran it with the --user and it regressed the version to 2.2.318:06
dmsimardnow if you try again, settings are likely to work18:06
schnipdiptesting ara-manage runserver 0.0.0.0:800018:07
schnipdipconnecting via chrome to 10.91.100.144:800018:07
schnipdipcould be a firewall rule now that I am thinking about it18:08
schnipdipbad request 40018:08
dmsimardis the bad request due to allowed_hosts again ?18:10
schnipdipI'm not 100% sure. It's pulling the django settings ara.server.settings18:10
dmsimardit should tell you in the errors, like in the screenshots you sent there was an error that said you needed to add the address in ALLOWED_HOSTS18:11
dmsimardnot in the browser but on the server side18:11
schnipdipYes, that error is still occurring18:12
schnipdip10.91.100.144 is the host that is running Ara. It's says, "Invalid HTTP_HOST header: '10.91.100.144:8000'. You may need to add '10.91.100.144' to ALLOWED_HOSTS.18:13
dmsimardshould be good if dynaconf isn't >=3.0 and it's in ALLOWED_HOSTS of ~/.ara/server/settings.yaml18:15
dmsimardI guess you re-ran the ara-manage command so it picked up the new version18:15
schnipdipLet me uninstall and reinstall ara and start from scratch.18:16
schnipdipI was fiddling with sqlite3 because the versioning was wrong... BTW it's a pain in the ass the upgrade pysqlite versions18:17
dmsimardwhat distro ?18:17
schnipdipRed Hat 4.8.5-3618:18
schnipdipbe right back18:19
dmsimarder -- that looks like a kernel version.. would it be rhel8 ?18:20
schnipdipit's 7.818:34
*** dbpiv has quit IRC18:34
*** dbpiv has joined #ara18:34
dmsimardthere's different gotchas (including that sqlite one you mentioned) for running under rhel7 :(18:39
dmsimardruns out of the box on rhel8 though18:39
schnipdiprats, okay, I'll spin up a new box for Rhel 818:40
*** dbpiv has quit IRC18:42
dmsimardsorry about that, rather send you the more simple/straightforward path18:42
schnipdipThat's okay. It only takes a few minutes to spin up a new box. I'd prefer to break it off of my dev ansible server anyways for now18:43
schnipdip@dm19:19
schnipdipdmsimard I'll continue this tonight. Something work related just came up. Started to provision the new RHEL8 box19:19
schnipdipI noticed ~/.ara wasn't created after running the19:20
schnipdipbut it's there... all well, i'm updating the ALLOW_HOSTS section19:23
dmsimardafter running the [...] ? suspense is killing me ;)19:24
schnipdipgiving it a test :D  i'm excited too!19:25
schnipdipohhh hmm new error19:28
schnipdiperror 500, is there a test playbook.yml I am supposed to run or can it be any playbook?19:30
dmsimardneed to run sql migrations maybe ? ara-manage migrate19:30
schnipdiphttps://imgur.com/a/wMJ1glx19:30
schnipdiplast picture is the new error19:30
dmsimardyeah no such table playbooks19:30
dmsimardinterrupt the server and run "ara-manage migrate"19:31
dmsimardand start it up again19:31
schnipdipYESSSSSSSSSSSSSSSSSSSSSSSSS!!!!!!!!19:31
schnipdipIt's working!19:31
schnipdipAHAHAHAHHAHAHA!!19:31
*** dbpiv has joined #ara19:31
dmsimard\o/19:32
schnipdipThank you so much! I'm going to make some standup notes in my journal19:32
dmsimardso then the next step is to install just ara (not ara[server]) wherever you are running ansible from, export ANSIBLE_CALLBACK_PLUGINS=$(python3 -m ara.setup.callback_plugins), export ARA_API_SERVER=http://host:8000 and finally export ARA_API_CLIENT=http19:33
dmsimardapi_server and api_client can go under [ara] of your ansible.cfg19:33
schnipdipOh okay I see, I did an all in one server. I'll break them out. So I can go back to my dev ansible controller and install pip3 install --user ara19:37
dmsimardit's really up to you, it can be colocated -- or not19:38
dmsimardif you colocate ansible and ara, the API server doesn't need to be running all the time -- the callback uses the offline client to talk to the API19:40
dmsimardif the API server is located elsewhere then it needs to run as a service19:40
dmsimardthere's an ansible role that supports centos8, should work on rhel8 too: https://github.com/ansible-community/ara-collection/blob/master/roles/ara_api/README.md19:41
schnipdipin a dev env collation may be best. In Prod, we will break it out. Btw my friend and I own a basement datacenter - about 6 racks of compute/storage with a 10G backbone. We are going to be using it there :)  I will also be using this for my work env for when I develop ansible code19:41
dmsimardcool stuff, that's much larger than my basement cloud :)19:42
schnipdipI built it from Ansible last night to test it. It worked until it got to the nodejs section. I think in the main.yml there should be a state check on nodejs. If nodejs exists and matches version, skip, otherwise do stuff. I had nodejs installed already and I was receiving an apt-key error. It was trying to parse '-', which isn't a valid key.19:44
schnipdipIt also saves processing time19:44
dmsimardI'm not much of a nodejs or javascript person but yeah, we can fix it19:45
dmsimardara_api doesn't do any nodejs things -- that's ara-webn19:47
schnipdipSame haha, it was one of those things that kept popping up during the install and I said "screw it, I'll do it myself" and disabled the nodejs section entirely19:47
schnipdipIt's nicely written code :)19:48
*** schnipdip has quit IRC20:42
*** dbpiv has quit IRC20:52
*** dbpiv has joined #ara20:59
*** dbpiv has quit IRC21:17
*** dbpiv has joined #ara21:22

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!