After you have installed and configured RHUA on a host, you can clone it to another host. This is useful if you want to have multiple environments, and is generally faster than installing and configuring it again because the database is copied to the new environment.
Before you begin
You need SSH access to the host where the Red Hat Update Infrastructure 5 RHUA is installed (that is, the source RHUA) as well as the host to which this RHUA will be cloned. The public SSH key matching the private SSH key used on the command line below must be authorized on the target host.
Note
Red Hat Update Infrastructure services on the source RHUA will be temporarily shut down during the cloning process. This may affect the ability to sync repositories, but does not prevent clients from downloading already synchronized content from CDS nodes.
Procedure
-
Stop Red Hat Update Infrastructure on the source RHUA host. This way, you can be sure the files do not change while the cloning is in progress. To do so, run:
[root@rhua ~]# systemctl stop rhui_rhua
-
Copy the remote share. This is the storage where all the content synchronized by the source RHUA as well as additional files used by Red Hat Update Infrastructure are stored. See options
remote_fs_server and remote_fs_mountpoint in /var/lib/Red Hat Update Infrastructure/config/rhua/rhui-tools.conf on the RHUA host. You can choose any method to copy the remote share, but typically you should replicate the NFS volume. The replica must be available on an NFS server that is possible to mount on the new RHUA, and is specified as <new-nfs-host:/path> on the command line below. Do not proceed until the remote share is fully copied.
-
To start cloning, run the Red Hat Update Infrastructure installer image on your control node with additional parameters that enable cloning, as indicated in Red Hat Update Infrastructure install types. The following command outlines the cloning process:
$ podman run -it --rm -v ~/.ssh/id_rsa:/ssh-keyfile:Z \
registry.redhat.io/rhui5/installer-rhel9 rhui-installer \
--rhua-container-registry registry.redhat.io \
--clone \
--source-host <source-rhua-hostname> \
--target-user <target-user> --target-host <new-rhua-hostname> \
--migration-fs-server <new-nfs-host:/path> \
--podman-username <registry_username> --podman-password '<registry_password>'
Important
Before running this command, make sure you are logged in to the Red Hat registry using your registry credentials and you have collected any other command line arguments and additional volumes as described in Installing, Updating, and Migrating Red Hat Update Infrastructure.
-
Start Red Hat Update Infrastructure on the source RHUA again:
[root@rhua ~]# systemctl start rhui_rhua
-
CDS and HAProxy nodes are not cloned because they are specific to each Red Hat Update Infrastructure environment. You must prepare new hosts for CDS and HAProxy nodes and install them separately. See the following chapters for further instructions:
-
Registering a new CDS
-
Registering a new HAProxy load-balancer