Appendix C. Importing Content ISOs into a Connected Satellite
Even if Satellite Server can connect directly to the Red Hat Customer Portal, you can perform the initial synchronization from locally mounted content ISOs. When the initial synchronization is completed from the content ISOs, you can switch back to downloading content through the network connection. To accomplish this, download the Content ISOs for Red Hat Satellite from the Red Hat Customer Portal and import them into Satellite Server. For locations with bandwidth limitations, using an On Demand or Background download policy might be more efficient than downloading and importing Content ISOs.
This section is not required if your Satellite Server is connected to the Internet.
This example shows how to perform the first synchronization of the Red Hat Enterprise Linux 6 repository from content ISOs. At the time of writing there are 21 DVD size ISO files.
Downloading the content ISOs from the Red Hat Customer Portal
- In your browser, navigate to Red Hat Customer Portal and log in.
- Click DOWNLOADS.
- Select Red Hat Satellite.
- Select the Content ISOs tab. All products in your subscription are listed there.
- Search for the section required, in this example Red Hat Enterprise Linux 6.
-
Click the link for the product name, such as
RHEL 6 Server (x86_64)(2017-04-14T01:27:00)to reveal the ISO files. -
Using your browser, download the required ISOs to a location accessible by your browser. For example, to your workstation’s
Downloadsdirectory.
Importing the Content ISOs
In a terminal connected to Satellite Server, create a directory to act as a temporary store for all of the required Satellite Content ISOs. This example uses
/tmp/isos/rhel6:mkdir -p /tmp/isos/rhel6
# mkdir -p /tmp/isos/rhel6Copy to Clipboard Copied! Toggle word wrap Toggle overflow On your workstation, copy the ISO files to Satellite Server:
scp ~/Downloads/iso_file root@satellite.example.com:/tmp/isos/rhel6
$ scp ~/Downloads/iso_file root@satellite.example.com:/tmp/isos/rhel6Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, create a directory to serve as a mount point for the ISOs:
mkdir /mnt/iso
# mkdir /mnt/isoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a working directory to hold the contents of all the ISOs:
mkdir /mnt/rhel6
# mkdir /mnt/rhel6Copy to Clipboard Copied! Toggle word wrap Toggle overflow Mount and recursively copy the contents of the first ISO to the working directory:
mount -o loop /tmp/isos/iso_file /mnt/iso cp -ruv /mnt/iso/* /mnt/rhel6/ umount /mnt/iso
# mount -o loop /tmp/isos/iso_file /mnt/iso # cp -ruv /mnt/iso/* /mnt/rhel6/ # umount /mnt/isoCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Repeat the above step for each ISO until you have copied all the data from the Content ISOs into
/mnt/rhel6. If required, remove the empty directory used as the mount point:
rmdir /mnt/iso
# rmdir /mnt/isoCopy to Clipboard Copied! Toggle word wrap Toggle overflow If required, remove the temporary working directory and its contents to regain the space:
rm -rf /tmp/isos/
# rm -rf /tmp/isos/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Performing the Initial Synchronization
Set the owner and the SELinux context for the directory and its contents to be the same as
/var/lib/pulp:chcon -R --reference /var/lib/pulp /mnt/rhel6/ chown -R apache:apache /mnt/rhel6/
# chcon -R --reference /var/lib/pulp /mnt/rhel6/ # chown -R apache:apache /mnt/rhel6/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create or edit the
/etc/pulp/content/sources/conf.d/local.conffile. Insert the following text into the file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
base_urlpath might differ in your content ISO. The directory specified inbase_urlmust contain therepodatadirectory, otherwise the synchronization fails. To synchronize multiple repositories, create a separate entry for each of them in the configuration file/etc/pulp/content/sources/conf.d/local.conf.- In the Satellite web UI, navigate to Content > Red Hat Repositories and select the repository to be enabled, in this example Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server.
- Under Content > Sync Status select the repository to be synchronized and click Synchronize Now.
Note that there is no indication in the Satellite web UI of which source is being used. In case of problems with a local source, Satellite pulls content through the network. To monitor the process, enter the following command in a terminal (limited to Red Hat Enterprise Linux 7 base systems):
journalctl -f -l SYSLOG_IDENTIFIER=pulp | grep -v worker[\-,\.]heartbeat
# journalctl -f -l SYSLOG_IDENTIFIER=pulp | grep -v worker[\-,\.]heartbeat
The above command displays interactive logs. First, Satellite Server connects to the Red Hat Customer Portal to download and process repository metadata. Then, the local repository is loaded. In case of any errors, cancel the synchronization in the Satellite web UI and verify your configuration.
After successful synchronization you can detach the local source by removing its entry from /etc/pulp/content/sources/conf.d/local.conf.