Visitors: 17882477

Latest Articles

Blogs

ANSIBLE (2.9.1) for AIX PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Michael Felt   

As part of an ongoing project to have AIX support properly tagged wheels - and to support some requests for recent ANSIBLE on AIX - I am publishing my current state.

Before getting into the technical details - just a reminder about why wheels (aka bdist - for binary distrubtion) are important.

  1. No compiler needed
  2. Create as non-root, a virtualenv (virtual environment) and install stuff, such as "bdist" wheels!

ANSIBLE (currently version 2.9.1) for AIX with wheels.

Needed: PYTHON with wheel tagging support

See: http://www.aixtools.net/index.php/python3-3.6

PYTHON3-32bit : Will run on AIX 5.3 TL7 and later:

PYTHON3-64bit : Will run and AIX 6.1 TL6 and later:

Wheels are located in aixtools test area: See http://download.aixtools.net/test/wheels/*

Process - from nothing to ANSIBLE installed

Starting point - no python...

# lslpp -L | grep python
#

Install aixtools.python3


...
Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
aixtools.python3.rte        3.6.9.0         USR         APPLY       SUCCESS
aixtools.python3.man.en_US  3.6.9.0         USR         APPLY       SUCCESS
aixtools.python3.adt        3.6.9.0         USR         APPLY       SUCCESS

# pip3 list
Package    Version
---------- -------
pip        18.1
setuptools 40.6.2
You are using pip version 18.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Download the wheels from AIXTools


# ls -l
total 11344
-rw-r--r--   2 199      1954         125326 Oct 31 13:18 Jinja2-2.10.3-py2.py3-none-any.whl
-rw-r--r--   2 root     system        17081 Nov 15 15:02 MarkupSafe-1.1.1-cp36-cp36m-AIX_5307_0747_32.whl
-rw-r--r--   2 root     system        44107 Nov 15 14:49 PyYAML-5.1.2-cp36-cp36m-AIX_5307_0747_32.whl
-rw-r--r--   2 root     system       199034 Nov 15 14:24 cffi-1.13.2-cp36-cp36m-AIX_5307_0747_32.whl
-rw-r--r--   2 root     system       476864 Nov 15 14:30 cryptography-2.8-cp36-cp36m-AIX_5307_0747_32.whl
-rw-r--r--   2 199      1954        1415262 Nov 05 10:15 pip-19.3.1-py2.py3-none-any.whl
-rw-r--r--   2 199      1954         111029 Nov 15 10:12 pycparser-2.19-py2.py3-none-any.whl
-rw-r--r--   2 root     system        10747 Nov 15 14:33 six-1.13.0-py2.py3-none-any.whl
-rw-r--r--   2 204      staff       3351318 Nov 15 10:07 virtualenv-16.7.7-py2.py3-none-any.whl
-rw-r--r--   2 204      staff         21556 Nov 15 10:05 wheel-0.33.6-py2.py3-none-any.whl

You can just install them all using "pip install *.whl", or you can be a bit more experimental.

 

1. Upgrade pip ## Note you must use pip3 for the moment!

# pip3 install --upgrade pip-19.3.1-py2.py3-none-any.whl
...
      Successfully uninstalled pip-18.1
Successfully installed pip-19.3.1

2. Install wheel and virtualenv - to the system installation

# pip install wheel-0.33.6-py2.py3-none-any.whl virtualenv-16.7.7-py2.py3-none-any.whl
Processing ./wheel-0.33.6-py2.py3-none-any.whl
Processing ./virtualenv-16.7.7-py2.py3-none-any.whl
Installing collected packages: wheel, virtualenv
Successfully installed virtualenv-16.7.7 wheel-0.33.6

3. Now, switch to a regular user account and create a virtual environment

michael@x065:[/home/michael]virtualenv ansible
Using base prefix '/opt'
New python executable in /home/michael/ansible/bin/python3.6
Also creating executable in /home/michael/ansible/bin/python
Installing setuptools, pip, wheel...
done.

4. Activate the virtualenv

michael@x065:[/home/michael]. ansible/bin/activate
(ansible) michael@x065:[/home/michael]

5. Go back to the collected wheels - now you can just install *.whl

into your virtual environment - and NOT as root!!!
(ansible) michael@x065:[/data/prj/python/wheels/AIX-5307]pip install *.whl
(ansible) michael@x065:[/data/prj/python/wheels/AIX-5307]pip install *.whl
Processing ./Jinja2-2.10.3-py2.py3-none-any.whl
Processing ./MarkupSafe-1.1.1-cp36-cp36m-AIX_5307_0747_32.whl
Processing ./PyYAML-5.1.2-cp36-cp36m-AIX_5307_0747_32.whl
Processing ./cffi-1.13.2-cp36-cp36m-AIX_5307_0747_32.whl
Processing ./cryptography-2.8-cp36-cp36m-AIX_5307_0747_32.whl
Requirement already satisfied: pip==19.3.1 from file:///data/prj/python/wheels/AIX-5307/pip-19.3.1-py2.py3-none-any.whl in /home/michael/ansible/lib/python3.6/site-packages (19.3.1)
Processing ./pycparser-2.19-py2.py3-none-any.whl
Processing ./six-1.13.0-py2.py3-none-any.whl
Processing ./virtualenv-16.7.7-py2.py3-none-any.whl
Requirement already satisfied: wheel==0.33.6 from file:///data/prj/python/wheels/AIX-5307/wheel-0.33.6-py2.py3-none-any.whl in /home/michael/ansible/lib/python3.6/site-packages (0.33.6)
Installing collected packages: MarkupSafe, Jinja2, PyYAML, pycparser, cffi, six, cryptography, virtualenv
Successfully installed Jinja2-2.10.3 MarkupSafe-1.1.1 PyYAML-5.1.2 cffi-1.13.2 cryptography-2.8 pycparser-2.19 six-1.13.0 virtualenv-16.7.7

6. And now ansible is installed - time to experiment

 

7. Later, when you are satisfied

as root, go back and install the wheels into the "SYSTEM" python libraries.

 

TROUBLESHOOTING:

I get the following error:
MarkupSafe-1.1.1-cp36-cp36m-AIX_5307_0747_32.whl is not a supported wheel on this platform.

Actions: make sure you have pip upgraded to at least 19.3.1, and run the command "pip3 debug"


In the output you will see something such as:
Compatible tags: 18
  cp36-cp36m-AIX_6106_1043_64

Note: here there is NO compatibility because the "5307" wheels are 32-bit (_32) while the
current version is 64-bit (ends in _64).

However, if the endings are both _32 or both _64 you can link or move the files to a name that pip
will accept.

Let's assume the message was:

MarkupSafe-1.1.1-cp36-cp36m-AIX_5307_0747_32.whl is not a supported wheel on this platform.

After linking the the file to a new name:

ln  MarkupSafe-1.1.1-cp36-cp36m-AIX_5307_0747_64.whl MarkupSafe-1.1.1-cp36-cp36m-AIX_6106_1043_64.whl

You can install MarkupSafe using:

root@x066:[/data/prj/python/wheels/AIX-5307]ln  MarkupSafe-1.1.1-cp36-cp36m-AIX_5307_0747_64.whl MarkupSafe-1.1.1-cp36-cp36m-AIX_6106_1043_64.whl
root@x066:[/data/prj/python/wheels/AIX-5307]pip install Mark*6106*whl
Processing ./MarkupSafe-1.1.1-cp36-cp36m-AIX_6106_1043_64.whl
Installing collected packages: MarkupSafe
Successfully installed MarkupSafe-1.1.1

## Important - pip install accetps a 32-bit wheel LABELED as a 64-bit wheel. The module will not work however, because only a 32-bit shared library is installed while a 64-bit is needed by the python3 binary.
 

 
Next >

Legacy PDFs

AIX 5.2
AIX 5.1