Appendix B. Importing Content ISO Images into a Disconnected Satellite

In high security environments where hosts are required to function in a closed network disconnected from the Internet, Satellite Server can provision systems with the latest security updates, errata, and packages. To accomplish this, download the Content ISOs for Red Hat Satellite from the Red Hat Customer Portal and import them into Satellite Server.

Important

This section is not required if your Satellite Server is connected to the Internet.

B.1. Importing Content ISO Images

Download the product ISO image from the Red Hat Customer Portal, as follows:

  1. Log on to the Red Hat Customer Portal.
  2. At the top of the screen, click Downloads and select Red Hat Satellite.
  3. Click the link for the product name, such as Red Hat Enterprise Linux 6 Server (x86_64) to download the ISO image.
  4. Copy all of Satellite Content ISO images to a directory Satellite can access. This example uses /root/isos.
  5. Copy all of Satellite Content ISOs to a directory that Satellite can access. This example uses /root/isos.
  6. Create a local directory that is shared through httpd on Satellite. This example uses /var/www/html/pub/sat-import/.

    # mkdir -p /var/www/html/pub/sat-import/
  7. Mount and recursively copy the contents of the first ISO image to the local directory:

    # mkdir /mnt/iso
    # mount -o loop /root/isos/first_iso /mnt/iso
    # cp -ruv /mnt/iso/* /var/www/html/pub/sat-import/
    # umount /mnt/iso
    # rmdir /mnt/iso
  8. Repeat the above step for each ISO image until you have copied all the data from the Content ISO images into /var/www/html/pub/sat-import/.
  9. Ensure the SELinux context for the directory is correct:

    # restorecon -rv /var/www/html/pub/sat-import/
  10. Satellite Server now contains the content from the Content ISO images. However, Satellite Server needs to point to this location as the CDN URL. In the Satellite Web UI, navigate to Content > Subscriptions.
  11. Click Manage Manifest.
  12. Edit the Red Hat CDN URL field to point to the Satellite host name with the newly created directory, for example:

    http://server.example.com/pub/sat-import/

  13. Click Update and then upload your manifest using Section 4.1, “Importing a Subscription Manifest into Satellite Server”.

Satellite is now acting as its own CDN with the files located in http://server.example.com/pub/sat-import/. 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 Satellite Server using HTTP.

If your environment changes from disconnected to connected, you can reconfigure a disconnected Satellite to pull content directly from Red Hat Customer Portal:

  1. In the Satellite Web UI, navigate to Content > Subscriptions.
  2. Click Manage Manifest.
  3. Edit the Red Hat CDN URL field to point to the Red Hat CDN URL:

    https://cdn.redhat.com

  4. Click Save

Satellite Server pulls content directly from Red Hat Customer Portal on the next synchronization.

B.2. Importing Kickstart Repositories

Kickstart repositories are not provided by the Content ISO image. To use Kickstart repositories in your disconnected Satellite, you must download a binary DVD ISO file for the version of Red Hat Enterprise Linux that you want to use and copy the Kickstart files to Satellite.

Procedure

  1. Navigate to the Red Hat Customer Portal at https://access.redhat.com/ and log on.
  2. In the upper left of the window, click Downloads.
  3. Locate and click the version of Red Hat Enterprise Linux that you want to use, for example Red Hat Enterprise Linux 8.
  4. In the Download Red Hat Enterprise Linux window, locate the binary DVD version of the ISO image, for example, Red Hat Enterprise Linux 8.1 Binary DVD, and click Download Now.
  5. When the download completes, copy the ISO image to Satellite Server.
  6. On Satellite Server, create a mount point and temporarily mount the ISO image at that location:

    # mkdir /mnt/iso
    # mount -o loop rhel-8.1-x86_64-dvd.iso /mnt/iso
  7. Create Kickstart directories for AppStream and BaseOS:

    # mkdir /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart
    
    # mkdir /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart

    Note that if you use Red Hat Enterprise Linux 7, you must create and complete all the following steps in only one directory /var/www/html/pub/sat-import/content/dist/rhel/server/7/7.7/x86_64/kickstart/.

  8. To the listing files /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/appstream/listing and /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/baseos/listing, append kickstart with a new line:

    kickstart
  9. To the listing file /var/www/html/pub/sat-import/content/dist/rhel8/listing, append the version number of the operating system ISO that you use with a new line. For example, for the RHEL 8.1 binary ISO, add 8.1 with a new line:

    8.1
  10. Copy the kickstart files from the ISO image:

    # cp -a /mnt/iso/AppStream/* \
    /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart
    
    # cp -a /mnt/iso/BaseOS/* /mnt/iso/images/ \
    /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart

    Note that for BaseOS, you must also copy the contents of the /mnt/iso/images/ directory.

  11. Copy the .treeinfo files from the ISO image:

    # cp /mnt/iso/.treeinfo \
    /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo
    
    # cp /mnt/iso/.treeinfo \
    /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo
  12. Open the /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo file for editing.
  13. In the [general] section, make the following changes:

    • Change packagedir = AppStream/Packages to packagedir = Packages
    • Change repository = AppStream to repository = .
    • Change variant = AppStream to variant = BaseOS
    • Change variants = AppStream,BaseOS to variants = BaseOS
  14. In the [tree] section, change variants = AppStream,BaseOS to variants = BaseOS.
  15. In the [variant-BaseOS] section, make the following changes:

    • Change packages = BaseOS/Packages to packages = Packages
    • Change repository = BaseOS to repository = .
  16. Delete the [media] and [variant-AppStream] sections.
  17. Save and close the file.
  18. Verify that the /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo file has the following format:

    [checksums]
    images/efiboot.img = sha256:9ad9beee4c906cd05d227a1be7a499c8d2f20b3891c79831325844c845262bb6
    images/install.img = sha256:e246bf4aedfff3bb54ae9012f959597cdab7387aadb3a504f841bdc2c35fe75e
    images/pxeboot/initrd.img = sha256:a66e3c158f02840b19c372136a522177a2ab4bd91cb7269fb5bfdaaf7452efef
    images/pxeboot/vmlinuz = sha256:789028335b64ddad343f61f2abfdc9819ed8e9dfad4df43a2694c0a0ba780d16
    
    [general]
    ; WARNING.0 = This section provides compatibility with pre-productmd treeinfos.
    ; WARNING.1 = Read productmd documentation for details about new format.
    arch = x86_64
    family = Red Hat Enterprise Linux
    name = Red Hat Enterprise Linux 8.1.0
    packagedir = Packages
    platforms = x86_64,xen
    repository = .
    timestamp = 1571146127
    variant = BaseOS
    variants = BaseOS
    version = 8.1.0
    
    [header]
    type = productmd.treeinfo
    version = 1.2
    
    [images-x86_64]
    efiboot.img = images/efiboot.img
    initrd = images/pxeboot/initrd.img
    kernel = images/pxeboot/vmlinuz
    
    [images-xen]
    initrd = images/pxeboot/initrd.img
    kernel = images/pxeboot/vmlinuz
    
    [release]
    name = Red Hat Enterprise Linux
    short = RHEL
    version = 8.1.0
    
    [stage2]
    mainimage = images/install.img
    
    [tree]
    arch = x86_64
    build_timestamp = 1571146127
    platforms = x86_64,xen
    variants = BaseOS
    
    [variant-BaseOS]
    id = BaseOS
    name = BaseOS
    packages = Packages
    repository = .
    type = variant
    uid = BaseOS
  19. Open the /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo file for editing.
  20. In the [general] section, make the following changes:

    • Change packagedir = AppStream/Packages to packagedir = Packages
    • Change repository = AppStream to repository = .
    • Change variants = AppStream,BaseOS to variants = AppStream
  21. In the [tree] section, change variants = AppStream,BaseOS to variants = AppStream.
  22. In the [variant-AppStream] section, make the following changes:

    • Change packages = AppStream/Packages to packages = Packages
    • Change repository = AppStream to repository = .
  23. Delete the following sections from the file: [checksums], [images-x86_64], [images-xen], [media], [stage2], [variant-BaseOS].
  24. Save and close the file.
  25. Verify that the /var/www/html/pub/sat-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo file has the following format:

    [general]
    ; WARNING.0 = This section provides compatibility with pre-productmd treeinfos.
    ; WARNING.1 = Read productmd documentation for details about new format.
    arch = x86_64
    family = Red Hat Enterprise Linux
    name = Red Hat Enterprise Linux 8.1.0
    packagedir = Packages
    platforms = x86_64,xen
    repository = .
    timestamp = 1571146127
    variant = AppStream
    variants = AppStream
    version = 8.1.0
    
    [header]
    type = productmd.treeinfo
    version = 1.2
    
    [release]
    name = Red Hat Enterprise Linux
    short = RHEL
    version = 8.1.0
    
    [tree]
    arch = x86_64
    build_timestamp = 1571146127
    platforms = x86_64,xen
    variants = AppStream
    
    [variant-AppStream]
    id = AppStream
    name = AppStream
    packages = Packages
    repository = .
    type = variant
    uid = AppStream
  26. If you do not plan to use the mounted binary DVD ISO image, unmount and remove the directory:

    # umount /mnt/iso
    # rmdir /mnt/iso
  27. In the Satellite web UI, enable the Kickstart repositories. For more information, see Section 5.7, “Enabling Red Hat Repositories”.