Chapter 8. Disconnected installation
You can install containerized Ansible Automation Platform in an environment that does not have an active internet connection. To do this you need to obtain and configure the RPM source dependencies before performing the disconnected installation.
8.1. Obtaining and configuring RPM source dependencies Copy linkLink copied to clipboard!
The Ansible Automation Platform containerized setup bundle installation program does not include RPM source dependencies from the BaseOS and AppStream repositories. It relies on the host system’s package manager to resolve these dependencies.
To access these dependencies in a disconnected environment, you can use one of the following methods:
- Use Red Hat Satellite to synchronize repositories in your disconnected environment.
-
Use a local repository that you create with the
reposynccommand on a Red Hat Enterprise Linux host that has an active internet connection. - Use a local repository that you create from a mounted Red Hat Enterprise Linux Binary DVD ISO image.
8.1.1. Configuring a local repository using reposync Copy linkLink copied to clipboard!
With the reposync command you can to synchronize the BaseOS and AppStream repositories to a local directory on a Red Hat Enterprise Linux host with an active internet connection. You can then transfer the repositories to your disconnected environment.
Prerequisites
- A Red Hat Enterprise Linux host with an active internet connection.
Procedure
Attach the BaseOS and AppStream repositories using
subscription-manager, replacing<RHEL_VERSION>with your RHEL version number:$ sudo subscription-manager repos \ --enable rhel-<RHEL_VERSION>-baseos-rhui-rpms \ --enable rhel-<RHEL_VERSION>-appstream-rhui-rpmsInstall the
yum-utilspackage:$ sudo dnf install yum-utilsSynchronize the repositories with the
reposynccommand. Replace<path_to_download>with a suitable value.$ sudo reposync -m --download-metadata --gpgcheck \ -p <path_to_download>For example:
$ sudo reposync -m --download-metadata --gpgcheck \ -p rhel-repos-
Use reposync with the
--download-metadataoption and without the--newest-onlyoption for optimal download time.
-
Use reposync with the
After the
reposyncoperation is complete, compress the directory:$ tar czvf rhel-repos.tar.gz rhel-repos- Move the compressed archive to your disconnected environment.
On the disconnected environment, create a directory to store the repository files:
$ sudo mkdir /opt/rhel-reposExtract the archive into the
/opt/rhel-reposdirectory. The following command assumes the archive file is in your home directory:$ sudo tar xzvf ~/rhel-repos.tar.gz -C /optCreate a Yum repository file at
/etc/yum.repos.d/rhel.repowith the following content, replacing<RHEL_VERSION>with your RHEL version number:[RHEL-BaseOS] name=Red Hat Enterprise Linux BaseOS baseurl=file:///opt/rhel-repos/rhel-<RHEL_VERSION>-baseos-rhui-rpms enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [RHEL-AppStream] name=Red Hat Enterprise Linux AppStream baseurl=file:///opt/rhel-repos/rhel-<RHEL_VERSION>-appstream-rhui-rpms enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releaseImport the gpg key to allow the system to verify the packages, replacing
<RHEL_VERSION>with your RHEL version number:$ sudo rpm --import /opt/rhel-repos/rhel-<RHEL_VERSION>-baseos-rhui-rpms/RPM-GPG-KEY-redhat-releaseVerify the repository configuration:
$ sudo yum repolist
8.1.2. Configuring a local repository from a mounted ISO Copy linkLink copied to clipboard!
You can use a Red Hat Enterprise Linux Binary DVD image to access the necessary RPM source dependencies in a disconnected environment.
Prerequisites
- You have downloaded the Red Hat Enterprise Linux Binary DVD image from the Red Hat Enterprise Linux downloads page and moved it to your disconnected environment.
Procedure
In your disconnected environment, create a mount point directory to serve as the location for the ISO file:
$ sudo mkdir /media/rhelMount the ISO image to the mount point. Replace
<version_number>and<arch_name>with suitable values:$ sudo mount -o loop rhel-<version_number>-<arch_name>-dvd.iso /media/rhel- Note: The ISO is mounted in a read-only state.
Create a Yum repository file at
/etc/yum.repos.d/rhel.repowith the following content:[RHEL-BaseOS] name=Red Hat Enterprise Linux BaseOS baseurl=file:///media/rhel/BaseOS enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [RHEL-AppStream] name=Red Hat Enterprise Linux AppStream baseurl=file:///media/rhel/AppStream enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releaseImport the gpg key to allow the system to verify the packages:
$ sudo rpm --import /media/rhel/RPM-GPG-KEY-redhat-releaseVerify the repository configuration:
$ sudo yum repolist
8.2. Performing a disconnected installation Copy linkLink copied to clipboard!
A disconnected installation installs containerized Ansible Automation Platform without requiring network access to external registries.
Prerequisites
- You have prepared the Red Hat Enterprise Linux host
-
You have obtained and configured the RPM source dependencies. The installation program uses your host system’s
dnfpackage manager to resolve these dependencies. - You have prepared the managed nodes
- You have downloaded the containerized Ansible Automation Platform setup bundle from the Ansible Automation Platform download page.
Procedure
- Log in to the Red Hat Enterprise Linux host as your non-root user.
Update the inventory file by following the steps in Configuring the inventory file.
NoteDo not include
registry_usernameorregistry_passwordin your inventory file for disconnected installations. These variables are only required for online installations. All container images are pre-packaged in the setup bundle.Ensure you include the following variables in your inventory file under the
[all:vars]group:bundle_install=true # The bundle directory must include /bundle in the path bundle_dir='{{ lookup("ansible.builtin.env", "PWD") }}/bundle'- Follow the steps in Installing containerized Ansible Automation Platform to install containerized Ansible Automation Platform and verify your installation.