Last active
February 12, 2022 14:15
-
-
Save dasgoll/7073664f0f7f73f4aa3e7cf8c95a8dbc to your computer and use it in GitHub Desktop.
Install AWX on CentOS 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[https://computingforgeeks.com/install-ansible-awx-on-centos-7-fedora-with-nginx-reverse-proxy-letsencrypt/] | |
###Appendix: Let's Encrypt with Certbot on Amazon Linux | |
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-an-instance.html#letsencrypt | |
# Insall EPEL repository | |
yum -y install epel-release | |
# Disable firewall and SELinux | |
systemctl disable firewalld | |
systemctl stop firewalld | |
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config | |
setenforce 0 | |
reboot | |
# Enable continuous release (CR) repository if some paskage from EPEL are dependant on newer release | |
yum -y install git gettext ansible docker nodejs npm gcc-c++ bzip2 | |
yum -y install python-docker-py | |
# Start and enable docker service | |
systemctl start docker | |
systemctl enable docker | |
# Clone repository and deploy (it will take about 20 minutes) | |
git clone https://github.com/ansible/awx.git | |
cd awx/installer/ | |
ansible-playbook -i inventory install.yml | |
# Monitor migrations status (it will take about 10 minutes) | |
docker logs -f awx_task | |
Now you can access AWX web server http://my-awx.example.com. | |
The default administrator username is admin, and the password is password. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Dasgoll
Thanks for your valuable input, I have installed Python 3 with SCL to start the download and installation of ansible. now I see the containers in Docker and load the Ansible web page. but what happens is that it stays loading and never finishes updating. analyzing the log I see the following. I appreciate you can help me.
-Log:
[root@centos7 ~]# docker logs -f awx_task
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "main_instance" does not exist
LINE 1: SELECT (1) AS "a" FROM "main_instance" WHERE "main_instance"...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/awx-manage", line 8, in
sys.exit(manage())
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/init.py", line 154, in manage
execute_from_command_line(sys.argv)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/management/commands/run_dispatcher.py", line 55, in handle
reaper.reap()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/dispatch/reaper.py", line 38, in reap
(changed, me) = Instance.objects.get_or_register()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/managers.py", line 144, in get_or_register
return (False, self.me())
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/managers.py", line 100, in me
if node.exists():
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/query.py", line 766, in exists
return self.query.has_results(using=self.db)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/sql/query.py", line 522, in has_results
return compiler.has_results()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1110, in has_results
return bool(self.execute_sql(SINGLE))
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1140, in execute_sql
cursor.execute(sql, params)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/utils.py", line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "main_instance" does not exist
LINE 1: SELECT (1) AS "a" FROM "main_instance" WHERE "main_instance"...
^
2020-09-07 08:56:41,654 INFO exited: dispatcher (exit status 1; not expected)
2020-09-07 08:56:41,654 INFO exited: dispatcher (exit status 1; not expected)
2020-09-07 08:56:42,657 INFO spawned: 'dispatcher' with pid 15325
2020-09-07 08:56:42,657 INFO spawned: 'dispatcher' with pid 15325
2020-09-07 08:56:43,659 INFO success: dispatcher entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-09-07 08:56:43,659 INFO success: dispatcher entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-09-07 08:56:45,417 WARNING awx.main.dispatch.periodic periodic beat started
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "main_instance" does not exist
LINE 1: SELECT (1) AS "a" FROM "main_instance" WHERE "main_instance"...
^
The above exception was the direct cause of the following exception:
Thank you.