Closed soonowman closed 4 years ago
well.. if they are using the same db, only one of them has to do the migration.. so, yeah.. it's looking correct to me...
So what should I do after modifying /etc/tower/settings.py in tower1.lab?
towerdb.lab will only be used for db purposes and will add more instances like tower1.lab.
If towerdb is only to be used as a db, then you shouldn't install the awx software on it.. only the postgres
So, in order for towerdb.lab to install only postgres, tower 1.lab to modify /etc/tower/settings.py, and then migration?
And can I add an instance other than tower1.lab in the same way as tower1.lab?
yes and yes.. but only one of the instances has to do the migrations...
So how do we know if multiple instances are pointing to a single postgres server?
There is no need to check it with a command. You have confirmed that your data is being shared normally. Thank you once again for evetything you've done.
servers info: tower1.lab, tower db.lab
Commonly installed steps : https://www.awx.wiki/installation/configuration - Create Postgres user and DB:
[towerdb.lab]
[root@towerdb ~]# sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git29 "GIT_PYTHON_REFRESH=quiet awx-manage migrate"
[root@towerdb ~]# echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'root@localhost', 'password')" | sudo -u awx scl enable rh-python36 rh-postgresql10 "GIT_PYTHON_REFRESH=quiet awx-manage shell" [root@towerdb ~]# sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git29 "GIT_PYTHON_REFRESH=quiet awx-manage create_preload_data" # Optional Sample Configuration [root@towerdb ~]# sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git29 "GIT_PYTHON_REFRESH=quiet awx-manage provision_instance --hostname=$(hostname)" [root@towerdb ~]# sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git29 "GIT_PYTHON_REFRESH=quiet awx-manage register_queue --queuename=tower --hostnames=$(hostname)"
[root@towerdb ~]# wget -O /etc/nginx/nginx.conf https://raw.githubusercontent.com/MrMEEE/awx-build/master/nginx.conf
[root@towerdb ~]# cat /var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf
[root@towerdb ~]# cat /var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf
[root@towerdb ~]# su - postgres -c 'scl enable rh-postgresql10 -- psql' =#ALTER user awx with password 'password';
[root@towerdb ~]# systemctl restart rh-postgresql10-postgresql.service
[ tower1.lab ] [root@tower1 ~]# cat /etc/tower/settings.py
[root@tower1 ~]# sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git29 "GIT_PYTHON_REFRESH=quiet awx-manage migrate"
Is it right that the result comes out like a tower1.lab? Shouldn't the result be like towerdb.lab?