On Thu, Nov 28, 2019 at 8:50 PM Nathanaël Blanchet wrote:
> give a try to https://awx.wiki/ based on rpms and not docker if you want
> to test this feature, it rocks.
>
>
Thanks for the input. Interesting.
I would like to still try a little with containers though.
It seems I'm a bit closer.
I used your inputs and what in documentation:
https://docs.ansible.com/ansible-tower/latest/html/upgrade-migration-guide/virtualenv.html
And these below were my steps. In repo sync I now get an error of type:
"
File
"/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/management/commands/inventory_import.py",
line 101, in build_env
for version in os.listdir(venv_libdir):
FileNotFoundError: [Errno 2] No such file or directory:
'/opt/my-envs/ovirt/lib'
"
possibly I have to add something else to this virtualenv?
My steps inside awx container:
1) create directory structure for new custom virtual envs
bash-4.4# mkdir -p /opt/my-envs
bash-4.4# chmod 0755 /opt/my-envs
2) Configure new custom virtual env path
$ curl -k -X PATCH
'https://my_user:my_pwd@my_awx_domain/api/v2/settings/system/'
-d '{"CUSTOM_VENV_PATHS": ["/opt/my-envs/"]}' -H
'Content-Type:application/json'
{"ACTIVITY_STREAM_ENABLED":true,"ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC":false,"ORG_ADMINS_CAN_SEE_ALL_USERS":true,"MANAGE_ORGANIZATION_AUTH":true,"TOWER_URL_BASE":"
https://towerhost
","REMOTE_HOST_HEADERS":["REMOTE_ADDR","REMOTE_HOST"],"PROXY_IP_WHITELIST":[],"LICENSE":{},"REDHAT_USERNAME":"","REDHAT_PASSWORD":"","AUTOMATION_ANALYTICS_URL":"
https://example.com
","INSTALL_UUID":"63ee73ee-6346-4bce-b343-e03095238e35","CUSTOM_VENV_PATHS":["/opt/my-envs"],"INSIGHTS_TRACKING_STATE":false,"BROKER_DURABILITY":true}
3) create ovirt virtual env with python2 type
bash-4.4# virtualenv /opt/my-envs/ovirt -p python2
Running virtualenv with interpreter /usr/bin/python2
Already using interpreter /usr/bin/python2
No LICENSE.txt / LICENSE found in source
New python executable in /opt/my-envs/ovirt/bin/python2
Also creating executable in /opt/my-envs/ovirt/bin/python
Installing setuptools, pip, wheel...
done.
bash-4.4#
4) install packages in container to be able to pip install psutil
yum install gcc redhat-rpm-config python2-devel
5) pip install psutil
bash-4.4# /opt/my-envs/ovirt/bin/pip install psutil
DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 won't be maintained after
that date. A future version of pip will drop support for Python 2.7. More
details about Python 2 support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting psutil
Using cached
https://files.pythonhosted.org/packages/73/93/4f8213fbe66fc20cb904f35e6e04e20b47b85bee39845cc66a0bcf5ccdcb/psutil-5.6.7.tar.gz
Building wheels for collected packages: psutil
Building wheel for psutil (setup.py) ... done
Created wheel for psutil:
filename=psutil-5.6.7-cp27-cp27mu-linux_x86_64.whl size=274582
sha256=bad7ce395c12db2dce3df34ebaf44de8db3137f73363f70743e413c699f23fbe
Stored in directory:
/home/awx/.cache/pip/wheels/52/41/b0/bf50409fe2b1d3b79afa3eed71b54b3e30fe5b695db2c7ba2e
Successfully built psutil
Installing collected packages: psutil
Successfully installed psutil-5.6.7
bash-4.4#
6) install libcurl-devel in container as it is needed by the pycurl install
next step (curl-config program)
yum install libcurl-devel
7) pip install pycurl with nss
bash-4.4# source /opt/my-envs/ovirt/bin/activate
(ovirt) bash-4.4# export PYCURL_SSL_LIBRARY=nss; pip install pycurl
--compile --no-cache-dir
DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 won't be maintained after
that date. A future version of pip will drop support for Python 2.7. More
details about Python 2 support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pycurl
Downloading
https://files.pythonhosted.org/packages/ac/b3/0f3979633b7890bab6098d84c84467030b807a1e2b31f5d30103af5a71ca/pycurl-7.43.0.3.tar.gz
(215kB)
|| 215kB 359kB/s
Building wheels for collected packages: pycurl
Building wheel for pycurl (setup.py) ... done
Created wheel for pycurl:
filename=pycurl-7.43.0.3-cp27-cp27mu-linux_x86_64.whl size=282624
sha256=a0e86e85d3ccb614a5b4df9d228797ec48749b395090207281d5525b2b521cc0
Stored in directory:
/tmp/pip-ephem-wheel-cache-cidPtO/wheels/89/40/f5/7b4f2285aca871b5173887a6c69127210d92806c0d3a977e51
Successfully built pycurl
Installing collected packages: pycurl
Successfully installed pycurl-7.43.0.3
(ovirt) bash-4.4#
8) pip install ansible and python-memached
(ovirt) bash-4.4# pip install ansible python-memcached
DEPRECATION: Python 2.7 will reach the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 won't be maintained after
that date. A future version of pip will drop support for Python 2.7.