Thursday, 2017-11-23

*** ara-slack has joined #ara01:51
*** ChanServ sets mode: +v ara-slack01:51
*** ara-slack1 has quit IRC01:55
*** bcoca has quit IRC02:58
ara-slack<cab.abraham> @dmsimard Could you help with my prior comment?04:22
ara-slack<dmsimard> @cab.abraham hey, thanks for pinging me. I had seen your question but didn't get the chance to look. Let me see.04:23
ara-slack<cab.abraham> Alright let me know if you need anything04:25
ara-slack<dmsimard> Okay, let's start from scratch and leave apache out of the equation for now04:25
ara-slack<cab.abraham> alright04:25
ara-slack<dmsimard> Do you know what a virtual environment is ? Can you create one ?04:26
ara-slack<cab.abraham> yeah I know virtualenv04:26
ara-slack<dmsimard> Ok, let's do that and source it. Then, just do "pip install ara", Ansible will be picked up automatically.04:27
ara-slack<dmsimard> What we're doing here seems weird but we're making sure of a few things by doing this.. for example that Ubuntu python packages aren't conflicting with pip packages.04:28
ara-slack<cab.abraham> File uploaded https://ara-community.slack.com/files/U7SCM74KU/F84HXF5GA/-.txt / https://slack-files.com/T6VAB05L7-F84HXF5GA-bd2f46740704:29
ara-slack<cab.abraham> File uploaded https://ara-community.slack.com/files/U7SCM74KU/F84FSLU8K/-.txt / https://slack-files.com/T6VAB05L7-F84FSLU8K-9627eb9df504:29
ara-slack<cab.abraham> File uploaded https://ara-community.slack.com/files/U7SCM74KU/F84HXNJHY/-.txt / https://slack-files.com/T6VAB05L7-F84HXNJHY-9a409b4d3c04:30
ara-slack<dmsimard> Once ara is installed, run "ara playbook list". It should come back empty but it also happens to bootstrap ara and you should now have a ~/.ara directory.04:30
ara-slack<cab.abraham> should I delete ~/.ara before hand?04:30
ara-slack<dmsimard> If there's nothing important in there, sure04:31
ara-slack<dmsimard> We're starting from scratch :)04:31
ara-slack<cab.abraham> yeah I got nothing important in it04:31
ara-slack<cab.abraham> ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ ara playbook list Initializing new DB from scratch  ```04:31
ara-slack<dmsimard> Ok, cool. Now run "ara-manage runserver". You'll have an empty webapp.04:32
ara-slack<cab.abraham> ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ nohup ara-manage runserver & [1] 2143 (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ nohup: ignoring input and appending output to 'nohup.out' ```04:33
ara-slack<cab.abraham> ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ cat nohup.out Traceback (most recent call last):   File "/home/muffinz/virtualenv/aravirt/bin/ara-manage", line 11, in <module>     sys.exit(main())   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/ara/manage.py", line 58, in main     manager.run()   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/flask_script/__init__.py", line 417, i04:33
ara-slackrun     result = self.handle(argv[0], argv[1:])   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/flask_script/__init__.py", line 386, in handle     res = handle(*args, **config)   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/flask_script/commands.py", line 479, in __call__     **self.server_options)   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/flask/app.py", line 841, i04:33
ara-slackrun     run_simple(host, port, self, **options)   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/werkzeug/serving.py", line 739, in run_simple     inner()   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/werkzeug/serving.py", line 699, in inner     fd=fd)   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/werkzeug/serving.py", line 587, in make_server     passthrough_errors,04:33
ara-slackssl_context, fd=fd)   File "/home/muffinz/virtualenv/aravirt/local/lib/python2.7/site-packages/werkzeug/serving.py", line 504, in __init__     HTTPServer.__init__(self, (host, int(port)), handler)   File "/usr/lib/python2.7/SocketServer.py", line 417, in __init__     self.server_bind()   File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind     SocketServer.TCPServer.server_bind(self)   File "/usr/lib/python2.7/SocketServer.py", line 4304:33
ara-slackin server_bind     self.socket.bind(self.server_address)   File "/usr/lib/python2.7/socket.py", line 228, in meth     return getattr(self._sock,name)(*args) socket.error: [Errno 98] Address already in use ``04:33
ara-slack<cab.abraham> what is the socket file?04:34
ara-slack<dmsimard> There's no socket file, you probably just have another process running. Find it with"ps aux" and kill it04:34
ara-slack<dmsimard> Also, don't run it with nohup, keep it in the foreground.. that's fine.04:35
ara-slack<cab.abraham> hmmm04:35
ara-slack<cab.abraham> ok it is running now04:36
ara-slack<cab.abraham> let me04:36
ara-slack<cab.abraham> go check on my browser04:36
ara-slack<dmsimard> Ok, ctrl+c that and let's put data in there now.04:36
ara-slack<cab.abraham> Hmmm04:37
ara-slack<dmsimard> Get Ansible to use the ARA callback by running this command as is: export ANSIBLE_CALLBACK_PLUGINS="$(python -c 'import os,ara; print(os.path.dirname(ara.__file__))')/plugins/callbacks04:37
ara-slack<cab.abraham> So is it not suppose to show something?04:37
ara-slack<dmsimard> Nope, there's nothing yet, were almost there04:37
ara-slack<dmsimard> Export the callback and then run a playbook04:37
ara-slack<cab.abraham> I already added that export to my ~/.bashrc04:37
ara-slack<dmsimard> Your bashrc was sourced before you started using your venv so it's not pointing to the right place04:38
ara-slack<cab.abraham> actually I have`export ara_location=$(python -c "import os,ara; print(os.path.dirname(ara.__file__))")`04:38
ara-slack<cab.abraham> right04:38
ara-slack<dmsimard> Just comment out the stuff from bashrc for now04:39
ara-slack<dmsimard> And run the export for Ansible callback plugins04:40
ara-slack<dmsimard> And then run your playbook04:40
ara-slack<dmsimard> After your playbook has finished, if you fire up "ara-manage runserver", you should see your playbook04:41
ara-slack<cab.abraham> Perhaps I'm missing something now, am I not suppose to see some homepage for ara without running a playbook?04:41
ara-slack<dmsimard> I'm not sure I follow04:42
ara-slack<cab.abraham> If I stand up the ara-manage server without running any playbook will it show anything when navigating to my `http://myserver:9191`?04:43
ara-slack<dmsimard> Well, there would be a default page that says youb don't have anything yet04:43
ara-slack<cab.abraham> Ok, then in that case I don't even see that04:44
ara-slack<cab.abraham> I'm running it on a headless virtual machine server04:44
ara-slack<cab.abraham> Would I have to pass in any extra options?04:45
ara-slack<dmsimard> Not really.. either it works or it doesn't. Maybe the port is blocked somewhere, maybe it is binding on 127.0.0.1 and you need to bind to 0.0.0.004:46
ara-slack<cab.abraham> By default it is binding to localhost04:46
ara-slack<cab.abraham> Atleast that is the behavior I have noticed04:46
ara-slack<cab.abraham> should I add the `--host` option?04:46
ara-slack<cab.abraham> I will try this: ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ ara-manage runserver --host ${HOSTNAME}  * Running on http://cfg-mgr-server-01:9191/ (Press CTRL+C to quit)  ```04:47
ara-slack<cab.abraham> yeah nothing still04:47
ara-slack<cab.abraham> ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ cat /home/muffinz/.ara/ara.log 2017-11-22 23:31:39,647 - ara - INFO - Initializing new DB from scratch ```04:48
ara-slack<cab.abraham> Got it now04:49
ara-slack<dmsimard> Bind to 0.0.0.0 instead and then navigate to http://(your host ip):919104:49
ara-slack<cab.abraham> ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ ara-manage runserver --host 0.0.0.0  * Running on http://0.0.0.0:9191/ (Press CTRL+C to quit) 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET / HTTP/1.1" 302 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /about/ HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/bootstrap/js/bootstrap.min.js HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET04:49
ara-slack/static/packaged/jquery/jquery.min.js HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/datatables/js/jquery.dataTables.min.js HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly/css/patternfly.min.css HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly/js/patternfly.min.js HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/js/ara04:49
ara-slackHTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly_bootstrap_treeview/js/bootstrap-treeview.min.js HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly/css/patternfly-additions.min.css HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly_bootstrap_treeview/css/bootstrap-treeview.min.css HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:1304:49
ara-slack"GET /static/css/pygments.css HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/css/ara.css HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/images/logo-header.svg HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/images/logo-main.svg HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly/fonts/OpenSans-Regular-webfont.woff2 HTTP/1.1" 200 - 192.168.1.230 - -04:49
ara-slack[22/Nov/2017 23:49:13] "GET /static/packaged/patternfly/fonts/OpenSans-Bold-webfont.woff2 HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/packaged/patternfly/fonts/OpenSans-Light-webfont.woff2 HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /favicon.ico HTTP/1.1" 404 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /static/images/favicon.ico HTTP/1.1" 200 - 192.168.1.230 - - [22/Nov/2017 23:49:13] "GET /favicon.ico04:49
ara-slackHTTP/1.1" 404 - ````04:49
ara-slack<dmsimard> Ok04:49
ara-slack<dmsimard> Now ctrl+c the web app and run a playbook04:50
ara-slack<cab.abraham> I guess since you recommended using the apache route and some reverse proxy it works with localhost04:50
ara-slack<cab.abraham> Unfortunately I've got no playbook atm, I'm trying to learn ansible and wanted some frontend gui for logging where I chose ara over awx.04:51
ara-slack<cab.abraham> But this is progress for me04:51
ara-slack<cab.abraham> thanks!04:51
ara-slack<cab.abraham> playbook is my next step04:51
ara-slack<dmsimard> Ah, apache is useful when you move beyond trying things out04:52
ara-slack<cab.abraham> I use nginx04:52
ara-slack<dmsimard> The integrated webserver runs fine until a certain scale04:52
ara-slack<cab.abraham> My use case is homelab04:53
ara-slack<cab.abraham> so I don't think I need to scale up to apache any time soon04:53
ara-slack<dmsimard> Also, earlier I saw a literal $ara_location in your ansible.cfg, be careful because it's an INI file so it doesn't parse bash variables04:53
ara-slack<dmsimard> I'm headed to sleep soon but hopefully you have enough to get you started and understand how the different pieces work!04:54
ara-slack<cab.abraham> Alright, thanks for your help!04:55
ara-slack<cab.abraham> I put that there as part of the readme04:55
ara-slack<dmsimard> If you notice in the readme, there's a "cat" command before which ends up expanding that variable :)04:56
ara-slack<cab.abraham> https://ara.readthedocs.io/en/latest/configuration.html04:56
ara-slack<cab.abraham> Ohhh04:56
ara-slack<cab.abraham> I was not using the cat04:56
ara-slack<cab.abraham> I forgot about the expanding04:56
ara-slack<dmsimard> No worries04:57
ara-slack<cab.abraham> That could explain why I was seeing the prior internal error04:57
ara-slack<cab.abraham> Anyways thanks again for you help, have a good nights sleep and happy thanks giving!04:58
ara-slack<dmsimard> All right, thanks for trying out ara and let me know how things work out :)04:59
ara-slack<dmsimard> See ya04:59
ara-slack<cab.abraham> will do!04:59
ara-slack<cab.abraham> File uploaded https://ara-community.slack.com/files/U7SCM74KU/F84KMVAAG/screen_shot_2017-11-23_at_12.43.16_am.png / https://slack-files.com/T6VAB05L7-F84KMVAAG-b12dc1138005:43
ara-slack<cab.abraham> Works, with a simple playbook05:44
ara-slack<cab.abraham> ``` (aravirt) muffinz@cfg-mgr-server-01:~/virtualenv$ cat ~/tmp.yaml --- - hosts: all   tasks:     - shell: echo "hello world" ```05:44
*** sshnaidm|off is now known as sshnaidm10:24
*** dmsimard|afk is now known as dmsimard12:55
*** dougbtv__ has quit IRC14:02
*** bcoca has joined #ara16:10
*** bcoca has joined #ara16:10
*** sshnaidm is now known as sshnaidm|off19:40
-openstackstatus- NOTICE: Zuul has been restarted due to an unexpected issue. We're able to re-enqueue changes from check and gate pipelines, please check http://zuulv3.openstack.org/ for more information.22:53
ara-slack<dmsimard> Oh hi @apevec :)23:44
dmsimardOhai bcoca23:45
dmsimardNice to see you here :)23:46

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