[AWX][Kubernetes] Cannot install new python modules nor create a new virtualenv.

664 views
Skip to first unread message

nrk

unread,
Apr 26, 2018, 8:53:55 AM4/26/18
to AWX Project
Hi all,

I am working in the deployment of AWX using Kubernetes. Everything seems to works and I can create projects, associate playbooks, even run those playbooks on my servers.

One of my playbooks is using the f5 big ip module to enable and disable nodes on BigIP. The problem that I have is that there are some python modules missing, so I can't use the BigIP module.

{
   
"_ansible_parsed": true,
   
"deprecations": [],
   
"exception": "  File \"/tmp/ansible_o9NWnB/ansible_module_bigip_pool_member.py\", line 199, in <module>\n    from library.module_utils.network.f5.common import f5_argument_spec\n",
   
"changed": false,
   
"_ansible_no_log": false,
   
"_ansible_delegated_vars": {
       
"ansible_delegated_host": "localhost",
       
"ansible_host": "localhost"
   
},
   
"_ansible_item_result": true,
   
"item": {
       
"name": "server-patching-poc.domain.internal",
       
"port": "22"
   
},
   
"invocation": {
       
"module_args": {
           
"session_state": "disabled",
           
"ratio": null,
           
"description": null,
           
"transport": "rest",
           
"monitor_state": "disabled",
           
"partition": "Common",
           
"rate_limit": null,
           
"connection_limit": null,
           
"server": "bigip.domain.internal",
           
"state": "present",
           
"preserve_node": false,
           
"user": "myuser",
           
"server_port": 443,
           
"provider": {
               
"ssh_keyfile": null,
               
"server_port": 443,
               
"server": "bigip.domain.internal",
               
"user": "myuser",
               
"timeout": 10,
               
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
               
"validate_certs": false,
               
"transport": "rest"
           
},
           
"host": "server-patching-poc-2..domain.internal",
           
"priority_group": null,
           
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
           
"validate_certs": false,
           
"port": 22,
           
"pool": "server-patching-poc.domain.internal"
       
}
   
},
   
"_ansible_ignore_errors": null,
   
"msg": "the python bigsuds module is required"
}



I tried to install the module but I am getting a permission denied, I also tried to perform a 'su' to root but it seems that there is no root user in the kubernetes installation. I even tried to create a new virtualenv with the awx user, but I can't move it under /var/lib/awx due lack of permissions.

How can I solve this issue?

Thanks in advance.

Cheers,
nrk

Ryan Petrello

unread,
Apr 26, 2018, 9:17:33 AM4/26/18
to AWX Project
nrk,

To add additional Python dependencies to awx installs, you must a custom image that installs your additional dependencies.  Documentation on this process can be found at:


and:

nrk

unread,
Apr 26, 2018, 10:29:06 AM4/26/18
to AWX Project
Thanks!

In that case I will build my own images on the top of awx_web and awx_task.

Cheers,
nrk

nrk

unread,
Apr 27, 2018, 5:43:37 AM4/27/18
to AWX Project
Hello Ryan,

I am trying to build my own image but I am still getting errors creating the venv.

This is my docker Dockerfile.

FROM ${docker.image.from}

LABEL BIGSUDS
="${bigsuds.version}"

RUN
&& virtualenv --system-site-packages /var/lib/awx/venv/awx-extended-venv \
   
&& source /var/lib/awx/venv/awx-extended-venv/activate \

The path for virtual envs is owned by root and I can't write as awx in that path. The valeu for ${docker.image.from} is <docker.image.from>ansible/awx_task</docker.image.from>

And this is the error that I am getting

[INFO] F8: ---> Running in 802fcbc039e9
[INFO] F8: [91msudo: unknown uid 1000: who are you?

[INFO] F8: Removing intermediate container 802fcbc039e9
[ERROR] F8: I/O Error executing build for image [dev/docker-awx-task-venv-image:20180427094228]:io.fabric8.maven.docker.access.DockerAccessException: Unable to build image [dev/docker-awx-task-venv-image:20180427094228]

If I try to create the venv without sudo, I get a permission denied.

Thanks in advance

Cheers,
nrk

El jueves, 26 de abril de 2018, 15:17:33 (UTC+2), Ryan Petrello escribió:

nrk

unread,
May 3, 2018, 3:56:42 AM5/3/18
to AWX Project
I already solved the issue.

Thanks!

Ryan Petrello

unread,
May 7, 2018, 9:41:03 AM5/7/18
to AWX Project
Hey nrk,

Sorry for the delay - you caught me on vacation!  Glad to hear you worked it out.

mho...@peoplenetonline.com

unread,
Jul 6, 2018, 4:25:40 PM7/6/18
to AWX Project
would be nice to know 'How you solved it" as I have same issues to install some other tools within awx web.


On Thursday, May 3, 2018 at 3:56:42 AM UTC-4, nrk wrote:
Reply all
Reply to author
Forward
0 new messages