Hi,
I am trying to get AWX going with our Rackspace cloud. I already have Ansible & Tower scripts running for our cloud. At the moment I have two issues:
Larry Singer
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/63de1727-3471-68cb-709c-4e306ef8f51a%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
Hi Matthew,
Thank you for your reply.
I am happy to try to use the openstack inventory and Ansible modules. I can't find any doco on how to configure these. Are you able to point me in the right direction?
Larry Singer
I am getting stack traces when running the openstack plugin:
2017-09-29 03:44:25,668 INFO awx.main.commands.inventory_import
Updating inventory 2: Rackspace
2017-09-29 03:44:25,681 DEBUG awx.main.commands.inventory_import
Using system install of ansible-inventory CLI:
/usr/bin/ansible-inventory 2
017-09-29 03:44:25,681 INFO awx.main.commands.inventory_import
Reading Ansible inventory source:
/usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py
Traceback (most recent call last): File "/usr/bin/awx-manage",
line 9, in <module> load_entry_point('awx==1.0.0.561',
'console_scripts', 'awx-manage')()
File "/usr/lib/python2.7/site-packages/awx/__init__.py", line
107, in manage execute_from_command_line(sys.argv)
File
"/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/__init__.py",
line 354, in execute_from_command_line utility.execute()
File
"/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/__init__.py",
line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py",
line 394, in run_from_argv self.execute(*args, **cmd_options)
File
"/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py",
line 445, in execute output = self.handle(*args, **options)
File
"/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/base.py",
line 661, in handle return self.handle_noargs(**options)
File
"/usr/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py",
line 979, in handle_noargs self.is_custom)
File
"/usr/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py",
line 234, in load_inventory_source is_custom=is_custom).load()
File
"/usr/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py",
line 179, in load data = self.command_to_json(base_args +
['--list'])
File
"/usr/lib/python2.7/site-packages/awx/main/management/commands/inventory_import.py",
line 163, in command_to_json self.method, proc.returncode, stdout,
stderr))
RuntimeError: ansible-inventory failed (rc=4) with stdout:
stderr:
ERROR! Could not parse inventory source
/usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py
with available plugins:
Plugin script failed: Inventory script
(/usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py)
had an execution error: Error fetching server list on devstack::
Plugin ini failed:
/usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py:48:
Expected key=value host variable assignment, got: argparse
I think this is because the Openstack inventory plugin imports
packages os_client_config and shade and these are installed in the
Docker container. I am not having any success in adding these
either manually through the container shell, or via the install
script.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/8f949833-ad5f-e4a7-b1f3-b925c119bdb6%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/8f949833-ad5f-e4a7-b1f3-b925c119bdb6%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/1aed7e17-5903-74cb-937a-13dbf800acdd%40smarthealth.com.au.
Matthew,
I run sudo docker exec -it awx_task /bin/bash to get
into the container, then:
[root@awx awx]#
/usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py
Traceback (most recent call last):
File
"/usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py",
line 60, in <module>
import os_client_config
ImportError: No module named os_client_config
Is this running the wrong install of Python? I remember seeing something about running embedded python somewhere, but I can't find any doco on it.
Larry
Matthew,
I got the plugin running inside the container, but it is not running from the inventory. This appears to be related to Issue https://github.com/ansible/awx/issues/268 . This points me at the code I need to look at, which appears to only support devstack. I'll see what I can do to make this work.Matthew,
I have been trying to trace the execution of this by inserting
logger statements. This is my understanding so far:
The Inventory Source refresh in the UI calls class
AnsibleInventoryLoader in
/awx/main/management/commands/inventory_import.py. This runs the
command
/usr/bin/ansible-inventory -i /usr/lib/python2.7/site-packages/awx/plugins/inventory/openstack.py --list
An environment variable OS_CLIENT_CONFIG_FILE points to a
temporary file with the settings to get the inventory. (I need to
change the contents of this file to support Rackspace.)
The class RunInventoryUpdate in /awx/main/tasks.py prepares the temporary settings file.
I cannot see RunInventoryUpdate being called.
I have changed the data that is output by RunInventoryUpdate (/usr/lib/python2.7/site-packages/awx/main/tasks.py
in Docker container awx_task), but the temporary settings file is
not changing when I refresh the inventory.
Can you tell me where RunInventoryUpdate (or some other code) is
preparing the temporary settings file?
Larry
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/5923ee20-7f37-c211-9b21-c7960a1b33bc%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/5923ee20-7f37-c211-9b21-c7960a1b33bc%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/7935af0f-34cc-6cfc-90d4-4c4c8bd2f035%40smarthealth.com.au.
Matthew,
Thanks, restarting the container worked. I'll see if I can work out what needs be changed to support this in the codebase.
Larry
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/CAHaX%3DYrVaT-b-Lx%2BNLwUbpPPzeUZ5SmzhmTRMvf3zXKO5B2vMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
I would like some guidance on the best way to implement some
changes to support Rackspace inventories using the openstack
inventory plugin. This can be done without major changes to the
codebase. The method build_private_data() in RunInventoryUpdate in
awx/main/tasks.py needs to be changed to be able to generate a
file that supports Rackspace (and retain backward compatibility
for devstack). The file needs to contain the rax data as shown in
awx/plugins/inventory/openstack.yml rather than the devstack data.
To do this we need to be able to tell the difference between a devstack inventory and a Rackspace inventory. I have identified a few ways this could be done:
Thanks in advance.
Larry Singer
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/01345bd0-cad3-5ce9-6318-a3d01c271758%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/63de1727-3471-68cb-709c-4e306ef8f51a%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
--
Matt JonesPrincipal Software EngineerAnsible Tower
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/8f949833-ad5f-e4a7-b1f3-b925c119bdb6%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/1aed7e17-5903-74cb-937a-13dbf800acdd%40smarthealth.com.au.
--
Matt JonesPrincipal Software EngineerAnsible Tower
--
Matt JonesPrincipal Software EngineerAnsible Tower
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
Matt JonesPrincipal Software EngineerAnsible Tower
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/5923ee20-7f37-c211-9b21-c7960a1b33bc%40smarthealth.com.au.
For more options, visit https://groups.google.com/d/optout.
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
Christopher,
I am trying to use terms from the AWX UI, rather than from
Ansible Tower. The OpenStack inventory source (dynamic inventory)
can support Rackspace if different parameters are passed to the
inventory plugin. This is about the best way to get those
parameters to the OpenStack plugin.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/f06030b1-ba47-403a-896b-f2156e81590f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/f06030b1-ba47-403a-896b-f2156e81590f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Larry Singer Smart Health Solutions Pty Ltd http://www.smarthealth.com.au
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/b7371313-4a4a-f9df-5623-511183398216%40smarthealth.com.au.
Matthew,
The old Rackspace inventory (and the ansible modules) used a package pyrax. This has been deprecated by Rackspace. The openstack inventory plugin in AWX does allow access to Rackspace without any extra packages. So we should be able to support Rackspace without Pyrax.
I will have a go at a separate credential for Rackspace.
Larry
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/344e474c-e128-1767-f791-613f377691d1%40smarthealth.com.au.