Populating Content on Disconnected Satellite with Content Views

Solution Verified - Updated

Environment

Satellite 6.7, 6.8, 6.9

Issue

There are two methods for populating disconnected satellites with content, content ISOs and exporting/importing content from another satellite. Content ISO's are scheduled to be discontinued in the future. This solution will endeavor to elaborate on the directions provided in the Content Manager Guide.

For instructions on transferring content using repositories, please see this KCS:
Populating Content on Disconnected Satellite with Repositories

Resolution

To export Content View content from a connected satellite, a few conditions must be met:

  • The repositories to be exported must have a download policy of "immediate".
  • A Content View must contain the repositories to be export.
  • The default export location on the connected satellite is /var/lib/pulp/katello-export/ . Make sure it has enough space to hold the export.
  • You must use the export-legacy command if you need to enable the repositories on the disconnected Satellite. The export-legacy command export the cdn data needed to enable repositories on the satellite.*
  • Note: If you have already enabled the repositories (so that they show up under Products) you can use the regular import/export commands as detailed in the Content Management Guide.

Steps for Export:

1. Create a content view that contains the repositories you wish to export. In this example I will name it "exportcv". Publish the content view.

2. From the Satellite command line, run the following command. This will provide you with the ID of the content view version that you just created in Step 1.

# hammer content-view version list

3. From the command line, run the following command to export the content view to the export location. Replace $id with the id you found in the step above.

# hammer content-view version export-legacy --id $id

4. When the export is finished, you should have a new directory under /var/lib/pulp/katello-export/. In this example, the organization name is "Default Organization" and the content view was named exportcv. Version 1 of the content view was exported. So under the export location I have a new directory named Default_Organization-exportcv-v1.0. Inside this directory structure you will notice that each level has a file named listing. This file is what allows the disconnected Satellite to enable repositories from this content. Using the hammer content-view version export command does not export these files which is why you need to use export-legacy.

Create a tar file of the directory structure and move the tar file to the disconnected Satellite.

# tar -cf export.tar Default_Organization-exportcv-v1.0/

Steps for Import

1. On the disconnected Satellite, create the directory /var/www/html/pub/export/. Place the export tar in that folder and extract it using the following command.

# tar xf export.tar

2. Descend into the imported directory structure until you get to the version number of the content view you exported. Make a note of the path. In this example, this looks like /var/www/html/pub/export/Default_Organization-exportcv-v1.0/Default_Organization/content_views/exportcv/1.0 . In the disconnected Satellite UI, go to Content --> Subscriptions --> Manage Manifest. If you haven't uploaded a manifest to the Satellite, do so now. Also change the "Red Hat CDN URL" to point to the export contents. The url should be something like https://satellite.example.com/pub/export/Default_Organization-exportcv-v1.0/Default_Organization/content_views/exportcv/1.0/ . Click the update button.

3. You should now be able to go to Red Hat Repositories and enable the repos that were contained in the content view you exported. Once enabled, change the download policy to "immediate" and disable "Mirror on Sync" for each repository. After making the changes, you can now sync the repository. This will import the content from the exported files.

4. Once all repositories are synced, create a new content view with the same name as the view that was exported. Add the repositories to the content view and publish a new version. This will create a content view version that is identical to the content view that you exported. Now that the repositories are enabled, future content can be exported/imported using the new hammer content-view version export and hammer content-view version import commands instead of export-legacy.

For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues

SBR
Product(s)
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.