5 Upgrading Private Automation Hub
The following chapter provides information about upgrading Private Automation Hub.
Upgrading 2.1 to 2.2
- Consider performing an OS backup. Backing up a system is good practice so that the system can be restored to its former state if the upgrade fails.
-
Create a backup of Private Automation Hub. For more information, see Backing up and Restoring Private Automation Hub.
- On the system running Private Automation Hub, stop all the Private Automation Hub
services:
sudo systemctl stop pulpcore
- Check the status to ensure all services are stopped:
sudo systemctl status pulpcore* -all
- On the local or remote database host, log in to the user account that controls the database.
sudo su - postgres
- Verify which version of
postgresql
is running.rpm -q postgresql
For example, the following response showspostgresql
version 10:postgresql-10.23-4.0.1.module+el8.9.0+90164+87901204.x86_64
- Do one of the following:
- If version 13 is installed, go to step 17.
- If version 10, 11, or 12 is installed, go to the next step.
- Export the database. Exporting the database creates a script file containing all the
necessary SQL commands and input data to restore the databases. For example, this command
creates the
hub.dump
file in the database home directory:pg_dumpall > hub.dump
- Exit the database user
account:
exit
- Stop the database
server:
sudo systemctl stop postgresql
- Remove ( and optionally backup ) existing database data directory. For example, the
following command removes and creates a backup file in the home
directory:
sudo mv /var/lib/pgsql/data/ ~/data.old
- Remove the current version of the
database:
sudo dnf remove postgresql
- Reinstall the Database as described in Setting Up a Remote Database and follow the procedure up to and including the step to restart the database and return to this step but ignore steps 9 to 11 create user and database pulp as these objects are already in the dump file.
- After the update completes, set up the database by importing the
hub.dump
file. Run the following commands:sudo su - postgres psql -d postgres -f hub.dump exit
- On the Private Automation Hub server, restart the private automation hub service and NGINX
processes:
sudo systemctl start pulpcore* -all sudo systemctl start nginx
- Test the Private Automation Hub functionality to ensure everything is working as expected.
- On the Private Automation Hub server, run the following command:
sudo dnf install oraclelinux-automation-manager-release-el8-2.2 sudo dnf config-manager --disable ol_automation2
- On the Private Automation Hub deployment server, run the following command:
sudo dnf install oraclelinux-automation-manager-release-el8-2.2 sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.OLD sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.rpmnew /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo
- Update the OS on the Private Automation Hub server and the deployment
server:
sudo dnf update -y --refresh
- On the Private Automation Hub server, run the collect static
command:
sudo PULP_SETTINGS=/etc/pulp/settings.py /usr/bin/pulpcore-manager collectstatic --clear --noinput
- On the deployment host, run the installer for Private Automation Hub with the same user account
originally used to install Private Automation Hub.
ansible-playbook -i hosts single-node-install.yml -e "olpah_admin_password=<admin_password> olpah_db_password=<db_password>"
Note:
If you used a parameters file when you first created the server, you must use it again when running this command. For example, add the following to the end of the command line-e "@single-node-vars.yml"
.
Upgrading Builder Utility 2.1 to 2.2
- On the host you installed the previous version of the Builder utility, run the following
commands:
sudo dnf install oraclelinux-automation-manager-release-el8-2.2 sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.OLD sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.rpmnew /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo sudo dnf update python39-ansible-builder
- Update any
execution-environment.yml
files to the 2.2 images ofolam-ee
andolam-builder
. For example, find the following entries:base_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:latest builder_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-builder:latest
And changelatest
to2.2
:images: base_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:2.2 builder_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-builder:2.2
- If using Private Automation Hub to store
olam-ee
orolam-builder
images then update the images to2.2
and point the images inexecution-environment.yml
to the new2.2
images. -
Ensure that any execution environments created in previous releases that are intended to be used in 2.2 are evaluated for changing dependencies. For example, if previous execution environments were created using older versions of
ansible-core
, confirm that collections or modules used in these older execution environments continue to function with later versions ofansible-core
running on Oracle Linux Automation Manager 2.2 nodes.