Tuesday, 2018-11-27

*** Bakey has quit IRC01:20
ara-slackgraeme.danielson: hi ara people,  we are testing out ara and are seeing immediate positive results in navigating playbook results!  In our test environment web access is open, however before moving into our prod deployment pipeline we need to have an authenticated gate  - our auth provider is AD/LDAPS. As ara is behind nginx we could investigate auth at that level, e.g. nginx-ldap-auth.01:23
ara-slackHowever would prefer to authenticate at the app layer. Appreciate if anyone has any pointers for LDAPS auth for ara if i01:23
ara-slackt's possible?01:23
*** Naphtime has quit IRC04:14
*** Naphta has joined #ara04:15
ara-slackdmsimard: @graeme.danielson there are no authentication mechanisms in ARA right now. The web interface in the current stable release is passive (read only) and either you have access to it or you don't.04:38
ara-slackdmsimard: ARA 1.0 ships a REST API which can be used over http, separate from the web application. There's no form of authentication or permissions there yet either but, again, a web server (or firewall) can be used to secure the components if required.04:40
ara-slackdmsimard: 1.0 is rewritten from scratch with django/django-rest-framework which will make it easier to implement ACLs/RBACs if we really need them in the future.04:41
ara-slackdmsimard: The current lack of security is "almost" by design. Since ARA doesn't really allow you run anything, the one thing you want to control is whether people have access to the data or not. It helps manage user expectations of security, keeps things simpler to maintain with the limited development resources. I think using nginx or apache to control security is not a terrible compromise in the meantime.04:46
*** gvincent has quit IRC06:20
*** gvincent has joined #ara07:03
*** gvincent has quit IRC07:06
*** gvincent has joined #ara07:06
*** themroc has joined #ara08:18
Xarothif it's DRF based, adding your own auth app wouldn't be that difficult to accomplish08:47
*** themroc has quit IRC13:10
*** themroc has joined #ara13:12
*** bcoca has joined #ara14:04
*** bcoca has joined #ara14:04
dmsimardXaroth: yeah, it's just not a priority for the initial 1.0 release because there are several other "not that difficult" things to do before I can actually release the thing :p14:48
Xarothof course14:48
Xarothbut I was more suggesting for whoever needed ldap auth14:48
Xarothto add an auth-ldap module14:48
Xarothnot for ARA to have it by itself.14:49
dmsimardjust in django you mean ?14:49
Xarothmhm14:49
dmsimardthat's not very granular, though14:49
dmsimardright ?14:49
dmsimardI mean, typically permissions in drf are set for every endpoint14:49
Xarothnot very, no, but you have to start somewhere :P14:49
dmsimardor at least I think they are14:49
dmsimardright14:50
Xarothpersonally I use nginx' auth-request to shield all systems that don't have auth by themselves14:51
Xarothbit of a fiddle but I got it to work14:51
dmsimardapollo13: what's your favorite runtime for django with wsgi ? gunicorn ? mod_wsgi ?14:57
XarothI'm biased towards uwsgi and gunicorn, I try to avoid apache/mod_wsgi whenever I can14:59
dmsimardah, uwsgi is the one I was forgetting15:00
Xarothnginx unit is also an option15:00
Xarothbut it's an oddball15:00
dmsimardI tend to use nginx more as a reverse proxy (with something like gunicorn etc)15:00
Xarothsame15:01
dmsimardTIL there's a gunicorn ansible module https://docs.ansible.com/ansible/latest/modules/gunicorn_module.html15:04
XarothI... why though.. don't you want to hook that to something so it actually runs as  a service?15:05
dmsimardoh, I wasn't saying I was going to use it15:06
dmsimardit came up in a google search :p15:07
dmsimardthere's a django_manage module too!15:07
Xaroththat's a useful one15:07
Xarothrunning your migrations as part of your ansible deploy15:07
ara-slacksmbambling: @smbambling has joined the channel15:50
ara-slacksmbambling: Is there a change log hosted anywhere, I don't see anything on github or RTD15:52
ara-slackdmsimard: @smbambling the changelog is in the tagged versions in git -- you can see them on github: https://github.com/openstack/ara/releases, for example: https://github.com/openstack/ara/releases/tag/0.16.015:53
ara-slackdmsimard: I hope we can pull them out of there to make them more obvious in the future15:54
ara-slacksmbambling: Is there any way to see the diff changeset of a file in the web UI15:57
ara-slackdmsimard: as in, using --diff ?16:04
ara-slackchris: I’ve installed ara, configured ara, and can bring up the web interface, but my ansible plays aren’t getting recorded. Additionally I don’t see the sqlite db. Is there a logging  directory or somewhere to troubleshoot why?16:05
ara-slackdmsimard: @chris if the ~/.ara directory of the user running ansible doesn't exist, it means Ansible hasn't loaded the callback16:05
ara-slackchris: Ok so that directory is there, but the web interface still comes up with the The ARA database is empty or the web application is not configured properly to find your playbook data.16:07
ara-slackchris: dev web interface on 919116:07
ara-slackdmsimard: So what that means is that the web server and the ansible user do not "agree" on where the database is located -- are you running the web interface from the same user ?16:08
ara-slackchris: i’m running the web interface as myself and then running ansible-playbook as myself but using sudo16:08
ara-slackdmsimard: so there's probably a database in /root/.ara ?16:09
ara-slackchris: i found the database in my home directory16:09
ara-slackchris: i was searching for .db instead of ansible.sqlite16:10
ara-slackdmsimard: the database location defaults to ~/.ara/ansible.sqlite -- if you run ansible as root, there'll be a database in /root/.ara/ansible.sqlite.. so if you try to run the webapp from your user, it'll try to use /home/chris/.ara/ansible.sqlite (or vice versa)16:11
ara-slackchris: .ara doesn’t exist for root just for my user16:12
ara-slackchris: I ran ansible as myself for testing and it populated the db. Thanks for the help!16:14
ara-slackchris: @dmsimard If I want to make ARA available to everyone who runs playbooks, I would just need to setup [ara] section in the ansible.cfg config? Would I be able to just move the site-packages for ara to the python2.7 folder instead of my home directory?16:19
ara-slackdmsimard: You can install ara globally so it's available to every user16:23
ara-slackdmsimard: ARA has some dependencies so if you just copy that one directory, it won't find them16:23
ara-slackdmsimard: And yes, you can use /etc/ansible/ansible.cfg16:24
ara-slackdmsimard: @smbambling you might not have seen my reply, I asked if you meant the contents of "--diff" or something else ?16:25
ara-slacksmbambling: @dmsimard Yeah, we always use --diff in our run, but in the version we are running ( which is old 13.1 ) there doesn't seem to be a way to see the diff output of a changed resource.  Is there a way in newer versions or some way in the current version we have16:27
ara-slacksmbambling: Also sorry so many slacks going I got pulled into another16:27
ara-slackdmsimard: @smbambling --diff isn't supported yet but it's something I want to add and there's a bug for it: https://storyboard.openstack.org/#!/story/200092916:30
ara-slacksmbambling: cool thanks for the pointer !16:30
ara-slackchris: @dmsimard Thanks David, if I add [ara] to the ansible.cfg do I need to specify all of the variables or just ones that I want to chang from the default? Can I just change the ara_dir?16:54
ara-slackdmsimard: yup, you can change only the stuff that you need to change16:55
ara-slackchris: :raised_hands:16:55
*** themroc has quit IRC16:57
*** sshnaidm|afk is now known as sshnaidm17:08
ara-slackchris: Is there a way to skip PyYAML install to keep our distutils version? Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.17:17
ara-slackchris: It’s using version 3.10 and it wants to install 3.1317:18
*** etienne has joined #ara17:18
ara-slackdmsimard: it's typically not a good idea to mix pip and distro packages... could you perhaps have a "global" virtualenv instead ?17:18
ara-slackdmsimard: what I've seen before was something like /opt/ansible-venv with everything installed to it and then /usr/local/bin/ansible{-playbook} symlinked to /opt/ansible-venv/bin/ansible{-playbook}17:19
ara-slackchris: You’re chatting with a guy who is learning ansible and python as he goes. I can certainly look into doing that17:20
ara-slackdmsimard: a virtual environment is basically an isolated python interpreter with it's own set of libraries and modules -- sort of like a container or a chroot17:21
ara-slackdmsimard: there's usually a distro package for virtualenv17:21
ara-slackdmsimard: so you do something like "virtualenv /opt/ansible-venv" which will set up a python interpreter at /opt/ansible-venv/bin/python and a pip binary at /opt/ansible-venv/bin/pip17:22
ara-slackdmsimard: so you can do either "/opt/ansible-venv/bin/pip install ara" -- or activate the virtualenv so that you're set to use it first: "source /opt/ansible-venv/bin/activate; pip install ara"17:23
etiennehttps://packaging.python.org/guides/installing-using-pip-and-virtualenv/#creating-a-virtualenv17:23
ara-slackchris: does running ansible-playbook change at all with the virtualenv?17:24
dmsimardwell, if you currently have ansible installed globally, this means you already have an ansible-playbook command in /usr/bin/ or /usr/local/bin (in your shell $PATH)17:25
dmsimardif you want to be able to type "ansible-playbook" and have it pick the one from the virtualenv instead of the /usr/local/bin/ one, you need to either adjust your PATH environment variable or remove the installed ansible and symlink them17:25
dmsimardotherwise it doesn't change anything17:26
ara-slackchris: Alternatively I could just remove the PyYAML dist package and install from pip, yes? Also thank you for all the virtualenv information. That’s really fascinating to know it’s available. I am trying to keep things straightforward for our sysadmin team to manage ansible.17:29
ara-slackdmsimard: the distro might or might not let you do that17:32
ara-slackdmsimard: for example, if you have a package that depends on PyYAML -- removing that package might lead to the uninstallation of the software that depends on it17:33
ara-slackdmsimard: I can't recommend mixing distribution and pip packages17:33
ara-slackdmsimard: What distribution are you using ?17:34
ara-slackchris: Understood. I’m looking for the most straightforward approach. CentOS7.517:34
ara-slackdmsimard: I've packaged ARA for Fedora but it's not in EPEL due to conflicting base OS dependencies unfortunately17:36
*** dougbtv has joined #ara17:36
ara-slackdmsimard: There is a third party repository that has packaged ARA for CentOS -- it's not "officially" supported but it's there and could be an option, perhaps17:36
ara-slackdmsimard: hmmm17:38
ara-slackchris: I can look into that as well. You’re suggestion of the venv may be the best option.17:38
ara-slackdmsimard: yeah, no matter how I look it -- the venv is the best bet IMO17:39
ara-slackchris: Perfect, an opportunity to learn something new. Thanks again for your time and patience!17:39
ara-slackdmsimard: happy to help17:39
*** dougbtv has quit IRC18:00
*** dougbtv has joined #ara18:03
*** dougbtv has quit IRC18:36
*** dougbtv has joined #ara18:48
ara-slackchris: Just to follow up I removed PyYAML with yum, installed ara with pip, then reinstalled PyYAML with yum and everything is working correctly.20:05
*** jrist has quit IRC20:22
ara-slackdmsimard: @chris lucky :p20:23
ara-slackchris: No doubt!20:23
*** jrist has joined #ara21:15

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