It took me a lot of time to port Ansible AWX to ppc64le Linux. The most amazing thing - it works after all! Here I will describe some steps you need to start AWX on CentOS 7 or Red Hat Enterprise Linux 7 and the differencies between them.
You can see the whole process of the installation on Youtube.
First of all you need a fresh installed CentOS7 or RHEL7. On RHEL7 you must enable the following repositories:
subscription-manager repos --enable rhel-7-server-for-power-le-rhscl-rpms
and install EPEL:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
You must do the same on CentOS7, but with different commands:
yum -y install epel-release centos-release-scl-rh
CentOS 7 is missing one of the required packages - postgresql10-runtime. It is present in the RHEL 7 repository and in CentOS 7 x86_64 repository, but not in CentOS 7 ppc64le repo. You can download it from my site:
yum -y install https://dl.power-devops.com/repo/el7/rh-postgresql10-runtime-3.1-1.el7.ppc64le.rpm
At this step we are ready to install Ansible AWX. The installation and configuraiton are the same on CentOS7 and RHEL7. First install the package:
yum install https://dl.power-devops.com/ansible-awx-12.0.0-1.el7.ppc64le.rpm
The installation takes some time because of many dependencies, AWX has. After the installation is finished, we can configure the system to start AWX.
I switch off the firewall and SELinux. As for firewall it is up to you, if you want to switch it off, but I highly recommend to switch off SELinux. I don't have any SELinux policies in the package and if you turn it on, you have to write a policy on your own.
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
Edit /etc/selinux/config and change SELINUX variable to disabled.
Ansible AWX works with redis through UNIX socket. That's why we must enable UNIX socket in Redis configuration and set the correct permissions on it. Open the file /etc/redis.conf, find the following two lines and change them accordingly.
unixsocket /var/run/redis/redis.sock
unixsocketperm 775
We also have to set permissions on supervisord runtime directory:
chmod 0755 /var/run/supervisor
and add nginx user to awx group, in order nginx web server can serve awx pages:
usermod -G awx nginx
Now let's initialize PostgreSQL.
scl enable rh-postgresql10 bash
postgresql-setup initdb
After the initialization we start it and look if it works.
systemctl start rh-postgresql10-postgresql
systemctl enable rh-postgresql10-postgresql
systemctl status rh-postgresql10-postgresql
PostgreSQL works and we can create the database. First create the awx user and the awx database, owned by the user.
su - postgres
scl enable rh-postgresql10 bash
createuser -S awx
createdb -O awx awx
As we have the database, we can create the tables now.
su - awx
awx-manage migrate
It takes some time, almost as long as the installation of AWX. When it is finished, we create our AWX administrator:
awx-manage createsuperuser --username admin --email root@localhost
The final steps are to load some sample data and provision the AWX instance:
awx-manage create_preload_data
awx-manage provision_instance --hostname=$(hostname)
awx-manage register_queue --queuename=tower --hostnames=$(hostname)
We also must change CLUSTER_HOST_ID in /etc/tower/settings.py to our hostname. Otherwise ansible doesn't work.
Now we are ready to start AWX.
systemctl enable ansible-awx
systemctl start ansible-awx
Check that all services are up and running:
systemctl status rh-postgresql10-postgresql
systemctl status redis
systemctl status nginx
systemctl status supervisord
If all of them are up and running, you are ready to go to your browser and enjoy your new AWX installation!
Hi, I try to install on RHEL8. Of course all the download link are different, I've seen that there is a link for AWX on RHEL 8 : https://dl.power-devops.com/ansible-awx-15.0.0-1.el8.ppc64le.rpm . But PostgreSQL doesn't come with the same rh-postgresql10 . Do you have an update of this procedure for RHEL 8, please :-)🤤 ? Thanks
Hi Thierry,
first of all you MUST have EPEL, otherwise you will have dependencies problems and AWX won't install.
second, if you see such message, it means, that you have something else installed on the Linux box prior to AWX and nginx. Something like apache httpd. If everything worked fine, you should see either AWX login screen or an nginx error.
Cheers
Andrey
Hi,
I try to install AWX on a red hat server 7.6 on ppc64le and didn't succeed.
I have to replace this command "yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm" by "yum install https://dl.power-devops.com/ansible-awx-12.0.0-1.el7.ppc64le.rpm" as it is red Hat 7.6
Everything works fine but I cannot access the AWX dashboard, when I connect with my browser to "https://My-IP", I'm redirected to a red hat screen"
"Red Hat® Enterprise Linux® 7
Introducing Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7 showcases the latest features in an enterprise operating system"