- 4.0.0.299 -> 4.0.0.347
yum -y install ansible-awx
yum -y install rh-python36-ansible-tower-cli
yum install --disablerepo='*' --enablerepo='mrmeee-ansible-awx, base' -x *-debuginfo rh-python36*
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage makemigrations"
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage migrate"
If you have made custom settings to /etc/tower/settings.py, set:
AWX_PROOT_ENABLED = True
Setup Tower CLI:
scl enable rh-python36 "tower-cli config host http://<awxhost>:8052"
scl enable rh-python36 "tower-cli config username <adminuser>"
scl enable rh-python36 "tower-cli config password <adminpassword>"
Change Tower server to Isolated mode:
scl enable rh-python36 "tower-cli setting modify AWX_PROOT_ENABLED true"
Restart services
systemctl restart awx-cbreceiver.service awx-channels-worker.service awx-daphne.service awx-dispatcher.service awx-web.service
- 4.0.0.144 -> 4.0.0.227
yum -y remove rh-python36-python-wheel
yum -y install ansible-awx
yum install --disablerepo='*' --enablerepo='mrmeee-ansible-awx, base' -x *-debuginfo rh-python36*
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage makemigrations"
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage migrate"
Restart services
systemctl restart awx-cbreceiver.service awx-channels-worker.service awx-daphne.service awx-dispatcher.service awx-web.service
- 2.1.2.44 -> 3.0.0.0
yum install -y rh-postgresql10 rh-postgresql10-postgresql-devel
scl enable rh-postgresql10 "postgresql-setup initdb"
wget -O /etc/yum.repos.d/ansible-awx.repo https://copr.fedorainfracloud.org/coprs/mrmeee/ansible-awx/repo/epel-7/mrmeee-ansible-awx-epel-7.repo
rm -f /etc/yum.repos.d/awx-rpm.repo
CentOS:
yum -y install centos-release-scl-rh
RHEL:
rpm -ivh http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-rh-2-2.el7.centos.noarch.rpm
Install Dependencies and stop services:
yum -y install --disablerepo='*' --enablerepo='mrmeee-ansible-awx, base' -x rh-python36-azure* rh-python36*
systemctl stop awx-cbreceiver awx-channels-worker awx-daphne awx-dispatcher awx-web
If postgresql-9.6 is installed WITH software collections:
systemctl stop rh-postgresql96-postgresql
scl enable rh-postgresql10 "pg_upgrade -b /opt/rh/rh-postgresql96/root/usr/bin/ -B /opt/rh/rh-postgresql10/root/usr/bin/ -d /var/opt/rh/rh-postgresql96/lib/pgsql/data -D /var/opt/rh/rh-postgresql10/lib/pgsql/data"
If postgresql-9.6 is installed WITHOUT software collections:
systemctl stop postgresql-9.6
sudo -u postgres scl enable rh-postgresql10 "pg_upgrade -b /usr/pgsql-9.6/bin/ -B /opt/rh/rh-postgresql10/root/usr/bin/ -d /var/lib/pgsql/9.6/data/ -D /var/opt/rh/rh-postgresql10/lib/pgsql/data"
Upgrade to the new AWX-RPM:
yum -y install ansible-awx
Cleanup:
yum -y remove rh-postgresql96* postgresql96* awx
Start Services and upgrade db:
systemctl start rh-postgresql10-postgresql.service
systemctl enable rh-postgresql10-postgresql.service
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage makemigrations"
sudo -u awx scl enable rh-postgresql10 rh-python36 "awx-manage migrate"
systemctl start awx-cbreceiver awx-channels-worker awx-daphne awx-dispatcher awx-web
- 2.0.0 -> 2.1.0.74
systemctl enable awx-dispatcher.service
systemctl start awx-dispatcher.service
- 1.0.6.47 -> 1.0.7.3
sudo -u awx /opt/awx/bin/awx-manage makemigrations --merge
/opt/awx/embedded/lib/python2.7/site-packages/awx/main/migrations/0043_v330_oauth2accesstoken_modified.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-10 14:02
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0042_v330_org_member_role_deparent'),
]
operations = [
migrations.AddField(
model_name='oauth2accesstoken',
name='modified',
field=models.DateTimeField(editable=False,null=True),
),
]
Inserted "null=True"
sudo -u awx /opt/awx/bin/awx-manage migrate
su - postgres \c awx ALTER TABLE main_organization ADD COLUMN job_template_admin_role_id integer; ALTER TABLE main_organization ADD FOREIGN KEY (job_template_admin_role_id) REFERENCES main_rbac_roles(id) DEFERRABLE INITIALLY DEFERRED;
There is an issue with awx-celery-worker, which will be fixed with the next build, but for 1.0.7.3 change:
ExecStart=/opt/awx/bin/celery worker -A awx -B -l info --autoscale=50,4 -Ofair -s /var/lib/awx/beat.db -n celery@%(ENV_HOSTNAME)s to ExecStart=/opt/awx/bin/celery worker -A awx -B -l info --autoscale=50,4 -Ofair -s /var/lib/awx/beat.db -n celery@%H
in:
/usr/lib/systemd/system/awx-celery-worker.service
systemctl daemon-reload
systemctl restart awx-celery-worker awx-cbreceiver awx-celery-beat awx-channels-worker awx-daphne awx-web
REF: ansible/awx#2173
- 1.0.6.7 -> 1.0.6.8
Something in rabbitmq changed.. so we need to upgrade to newer RabbitMQ:
systemctl stop rabbitmq-server
yum -y remove erlang-erts-R16B-03.18.el7.x86_64
echo "[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq/rpm/erlang/20/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1" > /etc/yum.repos.d/rabbitmq-erlang.repo
yum -y install https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.5/rabbitmq-server-3.7.5-1.el7.noarch.rpm
rm -rf /var/lib/rabbitmq/mnesia/
systemctl start rabbitmq-server
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app
systemctl restart awx-celery-worker awx-cbreceiver awx-celery-beat awx-channels-worker awx-daphne awx-web
comment out these two lines in /etc/awx/settings.py: (will be fixed from version 1.0.6.9)
CELERY_ROUTES['awx.main.tasks.cluster_node_heartbeat'] = {'queue': CLUSTER_HOST_ID, 'routing_key': CLUSTER_HOST_ID}
CELERY_ROUTES['awx.main.tasks.purge_old_stdout_files'] = {'queue': CLUSTER_HOST_ID, 'routing_key': CLUSTER_HOST_ID}
and change a line in this file: (will be fixed from version 1.0.6.9) /usr/lib/systemd/system/awx-celery-worker.service
ExecStart=/opt/awx/bin/celery worker -A awx -l info --autoscale=4 -Ofair -Q tower_scheduler,tower_broadcast_all,tower,%H -n celery@%H
to
ExecStart=/opt/awx/bin/celery worker -A awx -B -l info --autoscale=50,4 -Ofair -s /var/lib/awx/beat.db -n celery@%(ENV_HOSTNAME)s