Python for AIX

New to Ansible. I understand that Ansible requires Python to be installed on target machines.This is not standard on IBM’s Power AIX machines.
I am looking for advice and experience regading AIX i.e. is there a known version of Python for AIX that has proven to work reliably with Ansible?

Did you try the packaged python from IBM ?

http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/date.html

Regards,

JY

The old Linux Toolbox version didn't work (it was too old) but the new version should work.

I haven't tried it yet to be honest. Given that we are using NIM for AIX install we haven't spent too much time on it here. I need to get back to that, particularly once I have finished rebuilding out Linux builds again.

The other issue that you will face is that fewer people use Ansible with AIX so some modules just don't work. Cron was one I came across (now fixed). I know that there is no pinstall package management. Be prepared to do some troubleshooting and patching.

Having said that, I would like to see better AIX support and when (if) I get back to working on it I will be submitting more updates as I need them.

A few of us on the core team have been discussing that- the biggest issue with “officially” supporting it is that we don’t have easy access to AIX to test against. Ideally, we’d have it in a virtualized environment where we could be running tests constantly against PRs and merges, but the couple of cloud AIX providers we’ve found were prohibitively expensive. We’re also trying to avoid the “buy an old box on eBay and throw it in a closet somewhere” option (as we don’t really want to be maintaining hardware, keeping the OS up to date, etc). We’re playing with different options there for things like OSX as well, so if you’ve got any ideas, we’re all ears.

Matt Davis
Ansible Core Engineering

Thank you both. My requirement is not for AIX deployment. Thus using NIM is not the right solution for my use case. Rather, my requirement is for DR orchestration and automation across a mixture of IBM P series AIX 7.1 servers and RHEL 6 IBM X series. For AIX I have now been looking, based on advice, at http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/date.html and ActiveState. Unfortunatley for ActiveState there is no free version for AIX evaluation. Don’t know if either of them fit the bill.

The requirement is to remotely failover over specialised apps including ones running under PowerHA. Requirement also includes failover of WAS apps, MQ, IBM Storage DS8800. There are cross component and cross site dependencies. Expecting to create custom scripts per component and then orchestrate/automate using Ansible/Tower across the whole solution.

I am familiar with raw mode just using ssh which is discouraged. Is it possible to remove the requirment for a remote Python and replace with Perl through custom modules?

Yes you can use custom perl modules...

http://marcus.nordaaker.com/building-ansible-modules-with-perl-and-mojolicious/

http://docs.ansible.com/ansible/developing_modules.html

Naturally if it is to be released (preferable if you are adding new AIX functionality in my opinion) then Python would be a requirement.

I assume that the reason you want to use Perl is that it is standard on AIX and that you have more familiarity with it. Otherwise I would think that you could use the copy and rpm modules to install the linux toolbox Python module.

The IBM toolbox python should work, but as I said I have not tested it yet. I am currently more interested in standardising (and automating) our server builds so that they are identical across all of our engineers (I am still having issues with the guy who insists he NEEDS a full X install on every server.)

The Rhel 6 (I manage 6 and 7) will work. AIX will mostly work, but not all functionality is there. Software installation isn't. User management is. Cron entries work. I don't think I tested starting or stopping services but I doubt that SRC support is there.

As for where to get a development AIX box I would love to be able to offer you an LPAR but there is no way I can do that.

The cheapest virtual offering I found was $169 a month from lparbox.com, but that seems a bit higher than I personally would want to pay.

Yep, that was the best deal we found too- a little more reasonable than some, but for the volume we’d likely pump through it, one probably wouldn’t cut it unless they allow nested virt of some sort (is that even a thing on AIX?). We’d want to be running full integration tests on every pull request and merge (the only way we can tell if someone broke something before we merge it). Given the low number of AIX users, it’s tough for us to justify putting a lot of effort and $$$ into fully supporting it, which kinda leaves us where we are today: we have to wait for users to submit fixes when stuff is busted on AIX… :frowning:

-Matt

Hmm, I did just trip over https://www-356.ibm.com/partnerworld/wps/servlet/ContentHandler/stg_com_sys_power-development-platform

Your best option would probably be workload partitions if you wanted to run multiple instances on one lpar. The PDP link included wpars on the power7+ reservation, so that might be something to look at.

I am not surprised that IBM are willing to provide LPARs for functional testing and development work. After all the more apps that run on AIX the more likely they are to be able to keep selling it.

From memory LPARs are more like VMs, completely separate... while workload partitions are more like containers. Although you can run a different OS version in a WPAR.

https://www.ibm.com/developerworks/aix/library/au-wpar61aix/

This one works for me: http://www.aixtools.net/index.php/python
Also, I wouldn’t recommend porting modules (or writing new ones) in Perl for AIX.
Python’s where it’s at; certainly for Ansible anyway.

Although you can run a different OS version in a WPAR

FYI you can run different OS versions in containers too.
E.g. on a Centos7 host I can run rhel7, centos5 & Ubuntu 14.4 each beside each other in Docker containers.

​You can run ‘mostly’ diff OS in container, but you share a kernel and an most times a ‘special’ init ​process, this is fine for many tests but not all tests.

There are Python 2.7 rpm’s for AIX available at http://www.perzl.org/aix/.