AAP 2.4 Change IP and/or Hostname w/Swing Migration

Mindwatering Incorporated

Author: Tripp W Black

Created: 07/29 at 03:41 PM

 

Category:
Linux
RH AAP

Task:
Steps to Change IP/Hostname of AAP Cluster:

A. Pre DNS/IP Change:
1. Perform backup or snapshot of AAP cluster.
a. Use setup -b on the primary controller
# mkdir /users/myadminid/aapinstall/aap2.4-1backup/
# ./setup.sh -e 'backup_dest=/users/myadminid/aapinstall/aap2.4-1backup/' -b
# exit

... and/or ...

b. Perform cold snapshots of the AAP cluster VMs.


B. Shutdown of Controller and Hub VMs:
1. Shutdown AAP Controller(s):
a. SSH to the primary controller and verify installation inventory files still present:
$ ssh myadminid@aap.mindwatering.net
$ sudo su -
# cd /users/myadminid/aapinstall/ansible-automation-platform-setup-bundle-2.4-1-x86_64/
# ls
<confirm installation and inventory files still located in install folder. Confirm the apitoken.>

b. Perform services stop:
# automation-controller-service stop
<verify controller(s) stopped>

2. Shutdown AAP Hub(s):
$ ssh myadminid@aaphub.mindwatering.net
$ sudo su -
# systemctl stop pulpcore.service pulpcore-api.service pulpcore-content.service pulpcore-worker@1.service pulpcore-worker@2.service nginx.service redis.service
<wait>

Verify:
# systemctl status --no-pager pulpcore.service pulpcore-api.service pulpcore-content.service pulpcore-worker@1.service pulpcore-worker@2.service nginx.service redis.service


C. Change IP and DNS of VM(s)
1. Perform IP change(s) on each VM changing IP(s):
$ ssh myadminid@aap.mindwatering.net
$ sudo nmcli device
<view output and confirm nic to update - e.g. enp0s3>
... or ...
$ sudo nmcli connection show
<view output e.g. enp0s3>

2. Update the IP to the new IP:
Note: Use nmtui for a graphical interface or nmcli to perform via terminal.
a1:
$ sudo nmtui
<perform update in the dialog, click <Edit...> on ethernet adapter (e.g. enp0s3), click OK to save. >
... or ...

a. Use nmcli to update via the command line:
$ sudo nmcli con modify 'enp0s3' ifname enp0s3 ipv4.method manual ipv4.addresses 192.168.99.101/24 gw4 192.168.99.1
$ sudo nmcli con modify 'enp0s3' ipv4.dns 192.168.99.1
$ sudo nmcli con down 'enp0s3'
$ sudo nmcli con up 'enp0s3'

b. Verify the IP was updated:
$ sudo ip addr show enp0s3
<confirm new IP>

c. Repeat on any other VMs changing IPs.

2. Perform DNS change(s) on internal DNS server.
<perform w/your internal DNS software


D. On the Primary Controller, Update the Inventory File, and Run Setup.sh:
1. Update the inventory file:
$ ssh myadminid@aap.mindwatering.net
$ sudo su -
# cd /users/myadminid/aapinstall/ansible-automation-platform-setup-bundle-2.4-1-x86_64/
# vi inventory
<edit the file updating the DNS names if any have changed>
<esc>:wq (to save)

2. Run setup.sh to perform the update:
# setup.sh
<watch results>

3. Verify and clean-up if old DNS name(s) still exist:
a. List AAP instances:
# awx-manage list_instances
<view output>

b. Remove any old DNS name/instance if still remaining:
# awx-manage deprovision_instance --hostname=olddnsentry.mindwatering.net


E. Verify AAP Cluster GUI working:
1. Bring up the AAP controller(s) and confirm login
web browser --> aap.mindwatering.net --> login

2. Bring up the AAP Hub(s) and confirm login
web browser --> aaphub.mindwatering.net --> login

3. Run a Job or view any scheduled job now running to confirm running okay.



previous page

×