第6章 Importing Custom Content

本章では、さまざまな種類のカスタムコンテンツを Satellite にインポートする方法を概説します。Satellite に ISO、Puppet モジュール、またはさまざまなコンテンツタイプをインポートする場合は、この章とほぼ同じ手順を実行します。

For example, you can use the following chapters for information on specific types of custom content but the underlying procedures are the same:

6.1. Using Custom Products in Satellite

Red Hat Satellite 6 の Red Hat コンテンツとカスタムコンテンツはいずれも、次の点が類似しています。

  • The relationship between a product and its repositories is the same and the repositories still require synchronization.
  • Custom products require a subscription for clients to access, similar to subscriptions to Red Hat Products. Red Hat Satellite 6 creates a subscription for each custom product you create.

RPM の作成およびパッケージングの詳細は、Red Hat Enterprise Linux ドキュメンテーションの RPM パッケージングガイドを参照してください。

6.2. Importing Custom SSL Certificates

Before you create custom content, ensure that you import any Custom SSL certificates that you require.

If you require SSL certificates and keys to download RPMs, you can add them to Satellite.

  1. In the Satellite web UI, navigate to Content > Content Credentials. In the Content Credentials window, click Create Content Credential.
  2. 名前 フィールドに、SSL 証明書の名前を入力します。
  3. タイプ の一覧から、SSL 証明書 を選択します。
  4. コンテンツの認証情報 フィールドに SSL 証明書を貼り付けるか、参照 をクリックして SSL 証明書をアップロードします。
  5. 保存をクリックします。

6.3. Importing a Custom GPG Key

Before you create custom content, ensure that you import any GPG keys that you require.

Prerequisites

  1. Download a copy of the version specific repository package to your client system.

    $ wget http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
  2. Extract the RPM file without installing it:

    $ rpm2cpio pgdg-redhat95-9.5-2.noarch.rpm | cpio -idmv

The GPG key is located relative to the extraction at etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95.

Procedure

To import a GPG key, complete the following procedure:

  1. In the Satellite web UI, navigate to Content > Content Credentials and in the upper-right of the window, click Create Content Credential.
  2. リポジトリーの名前を入力し、タイプ の一覧から GPG キー を選択します。
  3. GPG キーを Content Credential Contents フィールドに貼り付けるか、参照をクリックし、インポートする GPG キーファイルを選択します。
  4. 保存をクリックします。

For CLI Users

  1. Copy the GPG key to your Satellite Server:

    $ scp ~/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95 root@satellite.example.com:~/.
  2. Upload the GPG key to Satellite:

    # hammer gpg create \
    --key ~/RPM-GPG-KEY-PGDG-95 \
    --name "My_Repository" \
    --organization "My_Organization"

6.4. Creating a Custom Product

Use this procedure to create a custom product that you can then add repositories to.

Procedure

To create a custom product, complete the following procedure:

  1. In the Satellite web UI, navigate to Content > Products, click New Product.
  2. 名前 フィールドで、製品の名前を入力します。Red Hat Satellite 6 では、名前 に入力した内容に基づいて ラベル フィールドに自動的に入力されます。
  3. オプション: GPG キー の一覧から、製品の GPG キーを選択します。
  4. オプション: SSL CA 証明書 の一覧から、製品の SSL CA 証明書を選択します。
  5. オプション: SSL クライアント証明書 の一覧から、製品の SSL クライアント 証明書を選択します。
  6. オプション: SSL クライアントキー の一覧から、製品の SSL クライアントキーを選択します。
  7. オプション: 同期プラン の一覧から、既存の同期プランを選択するか、同期プランの作成 をクリックし、製品要件の同期プランを作成します。
  8. 説明フィールドには、製品の説明を入力します。
  9. 保存をクリックします。

For CLI Users

To create the product, enter the following command:

# hammer product create \
--name "My_Product" \
--sync-plan "Example Plan" \
--description "Content from My Repositories" \
--organization "My_Organization"

6.5. Adding a Custom RPM Repository

Use this procedure to add a custom RPM repository in Satellite.

The Products window in the Satellite web UI also provides a Repo Discovery function that finds all repositories from a URL and you can select which ones to add to your custom product. For example, you can use the Repo Discovery to search, for example, http://yum.postgresql.org/9.5/redhat/ and list all repositories for different Red Hat Enterprise Linux versions and architectures. This helps users save time importing multiple repositories from a single source.

カスタム RPM のサポート

Red Hat では、サードパーティーのサイトに、直接接続されているアップストリーム RPM はサポートしていません。これらの RPM は同期プロセスのデモに使用されます。これらの RPM について問題がある場合は、サードパーティーの開発者に連絡してください。

Procedure

  1. Satellite Web UI で、コンテンツ > 製品 に移動し、使用する製品を選択して、リポジトリーの作成 をクリックします。
  2. 名前 フィールドで、リポジトリーの名前を入力します。Red Hat Satellite 6 では、名前 に入力した内容に基づいて ラベル フィールドに値が自動的に入力されます。
  3. From the Type list, select the type of repository. You can select either a repository for RPM files (yum), Puppet modules (puppet), or Docker images (docker).
  4. In the URL field, enter the URL of the external repository to use as a source.
  5. From the Download Policy list, select the type of synchronization Satellite Server performs.
  6. 同期時のミラー チェックボックスが選択されていることを確認します。アップストリームのリポジトリーにないコンテンツが同期中に削除されるようにします。
  7. チェックサム の一覧から、リポジトリーのチェックサムタイプを選択します。
  8. オプション: 必要に応じて、HTTP 経由で公開 チェックボックスの選択を解除して、このリポジトリーの HTTP 経由での公開を無効にできます。
  9. オプション: GPG キー の一覧から、製品の GPG キーを選択します。
  10. 保存をクリックします。

製品のウィンドウで即時同期を実行する場合は、今すぐ同期 をクリックします。

For CLI Users

  1. Enter the following command to create the repository:

    # hammer repository create \
    --name "My_Repository" \
    --content-type "yum" \
    --publish-via-http true \
    --url http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/ \
    --gpg-key "My_Repository" \
    --product "My_Product" \
    --organization "My_Organization"
  2. Synchronize the repository:

    # hammer repository synchronize \
    --name "My_Repository" \
    --product "My Product" \
    --organization "My_Organization"