Chapter 3. 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.
3.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
reposync
command 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.
3.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-rpms
$ sudo subscription-manager repos \ --enable rhel-<RHEL_VERSION>-baseos-rhui-rpms \ --enable rhel-<RHEL_VERSION>-appstream-rhui-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the
yum-utils
package:sudo dnf install yum-utils
$ sudo dnf install yum-utils
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Synchronize the repositories with the
reposync
command. Replace<path_to_download>
with a suitable value.sudo reposync -m --download-metadata --gpgcheck \ -p <path_to_download>
$ sudo reposync -m --download-metadata --gpgcheck \ -p <path_to_download>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
sudo reposync -m --download-metadata --gpgcheck \ -p rhel-repos
$ sudo reposync -m --download-metadata --gpgcheck \ -p rhel-repos
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Use reposync with the
--download-metadata
option and without the--newest-only
option for optimal download time.
-
Use reposync with the
After the
reposync
operation is complete, compress the directory:tar czvf rhel-repos.tar.gz rhel-repos
$ tar czvf rhel-repos.tar.gz rhel-repos
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Move the compressed archive to your disconnected environment.
On the disconnected environment, create a directory to store the repository files:
sudo mkdir /opt/rhel-repos
$ sudo mkdir /opt/rhel-repos
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the archive into the
/opt/rhel-repos
directory. The following command assumes the archive file is in your home directory:sudo tar xzvf ~/rhel-repos.tar.gz -C /opt
$ sudo tar xzvf ~/rhel-repos.tar.gz -C /opt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Yum repository file at
/etc/yum.repos.d/rhel.repo
with the following content, replacing<RHEL_VERSION>
with your RHEL version number:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Import 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-release
$ sudo rpm --import /opt/rhel-repos/rhel-<RHEL_VERSION>-baseos-rhui-rpms/RPM-GPG-KEY-redhat-release
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the repository configuration:
sudo yum repolist
$ sudo yum repolist
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.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/rhel
$ sudo mkdir /media/rhel
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mount 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
$ sudo mount -o loop rhel-<version_number>-<arch_name>-dvd.iso /media/rhel
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Note: The ISO is mounted in a read-only state.
Create a Yum repository file at
/etc/yum.repos.d/rhel.repo
with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Import the gpg key to allow the system to verify the packages:
sudo rpm --import /media/rhel/RPM-GPG-KEY-redhat-release
$ sudo rpm --import /media/rhel/RPM-GPG-KEY-redhat-release
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the repository configuration:
sudo yum repolist
$ sudo yum repolist
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Performing a disconnected installation Copy linkLink copied to clipboard!
Use the following steps to perform a disconnected installation of containerized Ansible Automation Platform.
Prerequisites
You have done the following:
- Prepared the Red Hat Enterprise Linux host
-
Obtained and configured the RPM source dependencies. The installation program uses your host system’s
dnf
package manager to resolve these dependencies. - Prepared the managed nodes
- 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.
Ensure the following variables are included 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'
bundle_install=true # The bundle directory must include /bundle in the path bundle_dir='{{ lookup("ansible.builtin.env", "PWD") }}/bundle'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Follow the steps in Installing containerized Ansible Automation Platform to install containerized Ansible Automation Platform and verify your installation.