3.7. Importing to Satellite 6

After the data exported from Satellite 5 is made available to the Satellite 6 system, it is ready to be imported. The import work flow is as follows:
  1. Import organizations. This includes importing a manifest if one exists.
  2. Import users.
  3. Import system groups as host collections.
  4. Enable and synchronize repositories. This is referred to as repository discovery.
  5. Import repositories.
  6. Import custom channels and cloned channels as content views.
  7. Import activation keys.
  8. Import kickstart snippets as template snippets.
  9. Import configuration files to puppet modules.
  10. Import system profiles as content hosts.

Important

The order in which you import entities is important. Entities are owned by organizations in Satellite 5; consequently, you need to import organizations before users, for example. You can use the hammer import all --dry-run command to list the available entities and the order in which they should be imported.
Options for Importing Entities

Satellite 6 gives you the option of importing entities separately or all together. This section describes these two approaches.

Assuming a set of Satellite 5 export files is available, a manual import session would appear as follows:
# hammer shell

hammer> import organization --csv-file=FILE
hammer> import user --csv-file=FILE
If the Satellite 5 data is stored in /tmp/exports (the result, for example, of unpacking the output of spacewalk-export), you can use the following command to import everything:
# hammer import all --directory=/tmp/exports

3.7.1. Importing Organizations

To transition organizations, use the users.csv file and recreate the Satellite 5.6 organizations listed within it. You can use the hammer import command on the command line or use the hammer interactive shell.
Run the following command to import organizations into Satellite 6:
# hammer import organization --csv-file /tmp/exports/users.csv
The following is an example of an interactive session. This example also demonstrates the --upload-manifests-from and --verbose options:

Example 3.2. Example of Interactive Import Session

# hammer shell
hammer> import organization --csv-file /tmp/exports/users.csv --upload-manifests-from /root/manifests --verbose

Importing from /tmp/exports/users.csv
Creating new organization: RED HAT SATELLITE ENGINEERING
Uploading manifest /root/manifests/RED_HAT_SATELLITE_ENGINEERING.zip to org-id 5
Waiting for the task [a231d19c-aee7-42b8-9566-07651ac029f4] ......
Organization [1->5] already imported.
Organization [1->5] already imported.
Organization [1->5] already imported.
Organization [1->5] already imported.
Creating new organization: SOE-ORG
Uploading manifest /root/manifests/SOE-ORG.zip to org-id 6
Waiting for the task [5da6dd16-0bf6-4ad0-924f-a9d5e1802565] ......
Organization [7->6] already imported.
Summary
  Found 5 organizations.
  Created 2 organizations.
  Uploaded 2 manifests.
Use the hammer organization list command to list the organizations within Satellite 6.
hammer> organization list

ID | NAME | LABEL | DESCRIPTION

1 | ACME_Corporation | ACME_Corporation | ACME_Corporation Organization
5 | QA | QA | Imported 'QA' organization from Red Hat Satellite 5
4 | Sec eng Dept. | Sec_eng_Dept_ | Imported 'Sec eng Dept.' organization from Red Hat Satelli..
6 | Security | Security | Imported 'Security' organization from Red Hat Satellite 5
hammer>
The import process creates organizations based on the organizations listed in the user.csv file. The Satellite 5 organization IDs are mapped to new Satellite 6 organization IDs. This is illustrated by the "[2->4]" and "[26->7]" entries in Example 3.2, “Example of Interactive Import Session”. Alternatively, you can use the hammer import organization --into-org-id org_id command to reduce all of the Satellite 5 organizations into a single, flat organization within Satellite 6. You can use the hammer organization list command to determine the correct organization ID.

Warning

All import data is stored in CSV files in the ~/.transition_data directory. This information is critical for any subsequent data imports. Do not modify the data in this directory.
A history of hammer commands is stored in the /root/.foreman/history file, and any errors from hammer commands are stored in the /root/.foreman/log/hammer.log file.
The hammer import command logs all output to the ~/import.log file. You can use the --logfile option to any hammer import subcommand to specify a different name and location for the log file.

3.7.1.1. Generating and Activating a Manifest

You need to activate a manifest for the organizations for which you want to populate content and other data. You can generate a manifest from within the Red Hat Customer Portal, and then activate that manifest for the imported organization.
The following procedure assumes you have already created a suitable manifest in the Red Hat Customer Portal.

Procedure 3.1. To Activate the Manifest for Satellite 6:

  1. Log in to the Satellite 6 WebUI as an administrative user.
  2. Select the required organization from the main menu at the upper left.
  3. Click ContentRed Hat Subscriptions
  4. On the Actions tab, under Upload New Manifest, click Browse, navigate to and select the manifest file that you downloaded.
  5. In the Satellite 6 WebUI, click Upload to upload the manifest to the Satellite 6 server.
Repeat this procedure for each required organization.