此内容没有您所选择的语言版本。
Chapter 5. Importing Subscriptions and Synchronizing Content
5.1. Enabling Red Hat Repositories 复制链接链接已复制到粘贴板!
You must enable the required Red Hat repositories to support provisioning a Red Hat Enterprise Linux host.
You should select the appropriate release for your environment. This task enables the following repositories:
- Red Hat Enterprise Linux Server (Kickstart): This allows Satellite to kickstart a host.
- Red Hat Enterprise Linux Server (RPMs): This provides ongoing content and errata.
- Red Hat Enterprise Linux Server - Satellite Tools (RPMs): This provides supporting software, such as Puppet and katello-agent.
Enabling Red Hat Enterprise Linux 7 Server Repositories Using the Web UI
-
Select Content
Red Hat Repositories. -
On the Kickstarts tab, go to Red Hat Enterprise Linux Server
Red Hat Enterprise Linux 7 Server (Kickstart) and select the Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2 repository. -
On the RPMs tab, go to Red Hat Enterprise Linux Server
Red Hat Enterprise Linux 7 Server (RPMs) and select the Red Hat Enterprise Linux 7 Server RPMs x86_64 7 Server repository. -
Navigate to Red Hat Enterprise Linux Server
Red Hat Enterprise Linux 7 Server - Satellite Tools (RPMs) - Satellite Tools (RPMs) and select the Red Hat Enterprise Linux 7 Server - Satellite Tools RPMs x86_64 repository.
Enabling Red Hat Enterprise Linux 7 Server Repositories Using Hammer CLI
Enable your Kickstart repository.
hammer repository-set enable --organization-label "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --basearch='x86_64' \ --releasever='7Server' \ --name 'Red Hat Enterprise Linux 7 Server (Kickstart)'
# hammer repository-set enable --organization-label "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --basearch='x86_64' \ --releasever='7Server' \ --name 'Red Hat Enterprise Linux 7 Server (Kickstart)'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable your RPMs repository.
hammer repository-set enable --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --basearch='x86_64' \ --releasever='7Server' \ --name 'Red Hat Enterprise Linux 7 Server (RPMs)'
# hammer repository-set enable --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --basearch='x86_64' \ --releasever='7Server' \ --name 'Red Hat Enterprise Linux 7 Server (RPMs)'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable your Satellite Tools repository.
hammer repository-set enable --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --basearch='x86_64' \ --name 'Red Hat Satellite Tools 6 (for RHEL 7 Server) (RPMs)'
# hammer repository-set enable --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --basearch='x86_64' \ --name 'Red Hat Satellite Tools 6 (for RHEL 7 Server) (RPMs)'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Creating a Custom Product 复制链接链接已复制到粘贴板!
You can enable a repository with custom packages, but you must first manually create a Product for the repository.
Creating Custom Products Using the Web UI
-
Click Content
Products and then click New Product. - Enter a name for your custom Product.
- Click Save.
- After the screen refreshes, click Create Repository.
- Enter Puppet Modules in the Name field.
- In the Type field, Puppet. Leave the URL field blank.
- Click Save.
Uploading Puppet Modules to the Repository Using the Web UI
You can now upload a Puppet Module to the Puppet Module repository. You can also use the https://forge.puppetlabs.com as the URL to mirror Puppet Forge locally. All of the content from Puppet Forge is available on your Satellite Server. However, this requires downloading over 2700 modules and can take considerable time, depending on available bandwidth. This example uses the motd module because it is simple, and has no dependencies on other modules. If you want to upload packages with large files, use the Hammer CLI.
- Download the motd Puppet module from https://forge.puppetlabs.com/jeffmccune/motd. The file that you download will have a .tar.gz extension.
-
Click Content
Products and click Custom Products in the Name field. - On the Repositories tab, click Puppet Modules to modify the Puppet Modules repository.
- In the Upload Package section, click Choose Files, and navigate to the motd module that you downloaded.
- Click Upload.
Creating Custom Products and Enabling Repositories Using Hammer CLI
Create a custom Product.
hammer product create --name "product_name" --organization-label org_label
$ hammer product create --name "product_name" --organization-label org_labelCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new repository under the custom Product.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Content type specifies whether you want Yum, Puppet, or Docker content.
Upload packages to the custom repository.
hammer repository upload-content --product "product_name" \ --organization-label org_label \ --id "repo_id" \ --path path_to_dir
$ hammer repository upload-content --product "product_name" \ --organization-label org_label \ --id "repo_id" \ --path path_to_dirCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Synchronizing Content 复制链接链接已复制到粘贴板!
You can synchronize repositories from the Red Hat Content Delivery Network to your Satellite, which also applies to synchronizing custom repositories (such as Yum or Puppet) that contain a repository URL.
Synchronizing Content Using Red Hat Enterprise Linux 7 Server Using the Web UI
-
Click Content
Sync Status to display the list of available Products. -
Navigate to Red Hat Enterprise Linux Server
7Server x86_64. Select the following Products:
- Red Hat Enterprise Linux 7 Server RPMs x86_64 6Server.
- Red Hat Enterprise Linux 7 Server - Satellite Tools RPMs x86_64.
-
Navigate to Red Hat Enterprise Linux Server
7.2 x86_64 and select Red Hat Enterprise Linux 7 Server Kickstart x86_64 6.6. Click Synchronize Now.
The synchronization could take several hours, depending on available bandwidth.
Synchronizing Content Using Hammer CLI
Synchronize your Kickstart repository.
hammer repository synchronize --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --name 'Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2' \ --async
$ hammer repository synchronize --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --name 'Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2' \ --asyncCopy to Clipboard Copied! Toggle word wrap Toggle overflow Synchronize your RPMs repository.
hammer repository synchronize --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --name 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server' \ --async
$ hammer repository synchronize --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --name 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server' \ --asyncCopy to Clipboard Copied! Toggle word wrap Toggle overflow Synchronize your Satellite Tools repository.
hammer repository synchronize --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --name 'Red Hat Satellite Tools 6 for RHEL 7 Server RPMs x86_64' \ --async
$ hammer repository synchronize --organization "$ORG" \ --product 'Red Hat Enterprise Linux Server' \ --name 'Red Hat Satellite Tools 6 for RHEL 7 Server RPMs x86_64' \ --asyncCopy to Clipboard Copied! Toggle word wrap Toggle overflow