4.3. Disconnected Satellite
katello-disconnected
utility and a synchronization host.
Figure 4.1. Disconnected Satellite
4.3.1. Configuring the Synchronization Host Copiar enlaceEnlace copiado en el portapapeles!
To import content from the Red Hat Content Distribution Network (CDN), the synchronization host requires:
- An Internet connection
- Valid Red Hat Network subscriptions
- A valid manifest (See Section 4.2.1.1, “Setting up a Manifest” for instructions on how to obtain one.)
Procedure 4.11. To Configure a Host to Synchronize and Export Content from the Red Hat CDN:
- Use Red Hat Subscription Manager to register the synchronization host to RHN.
- List all the available subscriptions to find the correct Red Hat Satellite product to allocate to your system:
subscription-manager list --available --all
# subscription-manager list --available --all
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command displays output similar to the following:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The SKU and Pool ID depend on the Red Hat Satellite product type that corresponds to your system version and product type. - Subscribe to the pool using the following command:
subscription-manager subscribe --pool=Red_Hat_Satellite_Pool_Id subscription-manager subscribe --pool=Red_Hat_Enterprise_Linux_Pool_Id subscription-manager subscribe --pool=Red_Hat_Enterprise_Linux_Software_Collections_Pool_Id
# subscription-manager subscribe --pool=Red_Hat_Satellite_Pool_Id # subscription-manager subscribe --pool=Red_Hat_Enterprise_Linux_Pool_Id # subscription-manager subscribe --pool=Red_Hat_Enterprise_Linux_Software_Collections_Pool_Id
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Disable all existing repositories:
subscription-manager repos --disable "*"
# subscription-manager repos --disable "*"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable the Red Hat Satellite and Red Hat Enterprise Linux and Red Hat Software Collections repositories. Ensure the Red Hat Enterprise Linux repository matches the specific version you are using.
subscription-manager repos --enable rhel-6-server-rpms \ --enable rhel-server-rhscl-6-rpms \ --enable rhel-6-server-satellite-6.0-rpms
# subscription-manager repos --enable rhel-6-server-rpms \ --enable rhel-server-rhscl-6-rpms \ --enable rhel-6-server-satellite-6.0-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The commands above are based on Red Hat Enterprise Linux 6. If you are using a different version of Red Hat Enterprise Linux, change the repository based on your specific version. - Install katello-utils and associated RPMs:
yum install python-qpid-qmf python-qpid qpid-cpp-server katello-utils
# yum install python-qpid-qmf python-qpid qpid-cpp-server katello-utils
Copy to Clipboard Copied! Toggle word wrap Toggle overflow katello-utils includes thekatello-disconnected
utility that is required to set up repositories for import while qpid related packages are necessary for pulp configuration. - Generate a secret 32-character alphanumeric string for the
oauth_secret
entry in the/etc/pulp/server.conf
file:tr -dc "[:alnum:]" < /dev/urandom | head -c 32
# tr -dc "[:alnum:]" < /dev/urandom | head -c 32 randomly_generated_value
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In the
/etc/pulp/server.conf
, uncomment the[oauth]
entry and add the randomly generated value from the previous step as theoauth_secret
value:[oauth] enabled: true oauth_key: katello oauth_secret: randomly_generated_value
[oauth] enabled: true oauth_key: katello oauth_secret: randomly_generated_value
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Disable authentication in
/etc/qpid/qpidd.conf
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow All incoming connections authenticate using the Satellite's default realm. - Configure the connection from
katello-disconnected
to Pulp with the previously generated value as your--oauth-secret
option:katello-disconnected setup --oauth-key=katello --oauth-secret=randomly_generated_value
# katello-disconnected setup --oauth-key=katello --oauth-secret=randomly_generated_value
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This places a configuration value in~/.katello-disconnected
. - Configure Pulp on the Synchronization Server:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Import the manifest:
katello-disconnected import -m ./manifest.zip
# katello-disconnected import -m ./manifest.zip
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Importing the manifest sets up the list of available repositories to synchronize to based on the subscriptions you selected.
4.3.2. Synchronizing Content Copiar enlaceEnlace copiado en el portapapeles!
katello-disconnected
enables all repositories that are included in the manifest for synchronization. Synchronization time is directly related to the amount of repositories to be synchronized. If the manifest has a large amount of repositories, the synchronization will take time and network resources.
katello-disconnected
allows for the synchronization of specific repositories. This section will set up Pulp for synchronizing content.
- Disable all repositories:
katello-disconnected disable --all
# katello-disconnected disable --all
Copy to Clipboard Copied! Toggle word wrap Toggle overflow katello-disconnected
enables all repositories by default. - Choose which repositories you wish to sync by listing all available repositories from the manifest:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable the chosen repositories for synchronization:
katello-disconnected enable -r rhel-6-server-sam-rpms-6_4-x86_64
# katello-disconnected enable -r rhel-6-server-sam-rpms-6_4-x86_64
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the repositories and push them to Pulp to allow synchronization:
katello-disconnected configure
# katello-disconnected configure
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The configure option forkatello-disconnected
reads the manifest, creates pulp repositories, and generates scripts before synchronization. It needs to be run each time a repository is enabled or disabled. - Synchronize the repositories:
katello-disconnected sync
# katello-disconnected sync
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can use thewatch
option to monitor the synchronization process.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3.3. Exporting Content Copiar enlaceEnlace copiado en el portapapeles!
An external export media such as a CD, DVD, or external hard drive.
- Export the synchronized repositories:
katello-disconnected export -t /var/tmp/export
# katello-disconnected export -t /var/tmp/export
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output will look similar to:Copy to Clipboard Copied! Toggle word wrap Toggle overflow This operation will create the following files in/var/tmp/export
:ls /var/tmp/export/
# ls /var/tmp/export/ content-export-00 content-export-01 content-export-02 expand_export.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the files from /var/tmp/export into the external media.
Note
If the files are too big for your external media, the files can be copied sequentially in a series of DVDs.
4.3.4. Importing Content to a Disconnected Satellite Server Copiar enlaceEnlace copiado en el portapapeles!
Ensure that the directory and file system containing the exports has enough space to contain the extracted archives. For example, if your export is 40 GB, the disconnected Satellite Server directory and file system where you are importing the content will need an extra 40 GB of space to expand it on the same file system.
- Copy ALL of the Satellite Content ISOs to a directory that the Satellite can access. This example uses
/root/isos
. - Create a local directory that will be shared via
httpd
on the Satellite. This example uses/var/www.html/sat-import/
.mkdir -p /var/www/html/sat-import/
# mkdir -p /var/www/html/sat-import/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Recursively copy the contents of the first ISO to the local directory:
mount -o loop /root/isos/first iso /mnt/iso cp -ruv /mnt/iso/* /var/www/html/sat-import/ umount /mnt/iso
# mount -o loop /root/isos/first iso /mnt/iso # cp -ruv /mnt/iso/* /var/www/html/sat-import/ # umount /mnt/iso
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Repeat the above step for each ISO until you have copied all the data from the series of ISOs into the local directory
/var/www/html/sat-import/
. - Ensure that the SELinux contexts is correct:
restorecon -rv /var/www/html/sat-import/
# restorecon -rv /var/www/html/sat-import/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Change the CDN URL to reference the loaction that the ISOs were copied to. This example uses the Satellite fully qualified domain name (FQDN)
server.example.com
, so the URL is:http //server.example.com/sat-import/
http //server.example.com/sat-import/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The Satellite is now acting as its own CDN with the files located inhttp://localhost/content
. This is not a requirement. The CDN can be hosted on a different machine inside the same disconnected network as long as it is accessible to the Satellite server via HTTP. - Add the CDN address to the Satellite web interface:
- Log in to the Satellite web interface.
- Click
and then click . - On the Subscription Manifest information screen, scroll to Red Hat Provider Details. Click the edit icon on the Repository URL entry and change the entry to the CDN's repository URL.
- Clickto choose the manifest file.
- Clickto import your manifest.
- Enable the repositories from the local CDN:
- Click
- Enable the repositories that were enabled and synchronized in the Synchronizing Content section.
- Click
. - Select the repositories you want to synchronize and click.