第9章 Synchronizing Content Between Satellite Servers

Red Hat Satellite 6.5 は Inter-Satellite Synchronization (ISS) を使用して、コンテンツの Satellite Server 間、または Satellite Server の組織間を同期します。

You can use ISS in the following scenarios:

  • If you have both connected and disconnected Satellite Servers, and want to copy content from the connected servers to the disconnected servers. For example, you require complete isolation of management infrastructure for security or other purposes.
  • Satellite Server の一部のコンテンツのみを他の Satellite Server にコピーする場合。たとえば、IT 部門が検証するコンテンツビューが Satellite Server であり、このコンテンツビューのコンテンツを他の Satellite Server へコピーする場合などです。
  • If you want to clone a Content View from one organization to another organization on Satellite Server.

ISS は、Satellite Server から Capsule Server へのコンテンツの同期には使用できません。Capsule Server はネイティブで同期をサポートします。詳細は、『Red Hat Satellite 6 のプランニング』の「Capsule Server の概要」を参照してください。

9.1. Exporting a Content View Version

コンテンツビューのバージョンを、Satellite Server からアーカイブファイルにエクスポートして、このアーカイブファイルを使用し、別の Satellite Server か、別の Satellite Server の組織に同じコンテンツビューバージョンを作成します。Satellite では、複合コンテンツビューはエクスポートされません。エクスポートしたアーカイブファイルには、以下のデータが含まれます。

  • A JSON file containing Content View version metadata
  • An archive file containing all the repositories included into the Content View version

Satellite Server は、コンテンツビューのバージョンに追加された RPM およびキックスタートファイルのみをエクスポートします。Satellite では、以下の内容はエクスポートされません。

  • Puppet content
  • Docker content
  • OSTree content
  • Content View definitions and metadata, such as package filters.

hammer content-view version export コマンドの変更

hammer content-view version export および hammer content-view version import の新しいコマンドは、以前の Satellite のバージョンのコマンドと機能の仕方が違います。以前の機能は、hammer content-view version export-legacy コマンドで利用でき、新しい機能には存在しない機能が、以前の機能には含まれています。

  1. オンラインの Satellite Server からオフラインの Satellite Server に直接パッチを適用できます。hammer content-view version export-legacy は、CDN の構造をエクスポートするので、Red Hat カスタマーポータルからの DVD ISO を使用する必要はありません。
  2. yum 以外のコンテンツを含むコンテンツビューをエクスポートする場合は、hammer content-view version export-legacy を使用すると、yum 以外のコンテンツをスキップしてコンテンツビューをエクスポートしますが、hammer content-view version export は、yum 以外のリポジトリーを削除するようにプロンプトを表示して失敗します。

以前の機能に関する詳細情報は、『Satellite 6.4 コンテンツ管理ガイド』の「Satellite Server 間のコンテンツの同期」を参照してください。

Prerequisites

To export a Content View, ensure that the Satellite Server where you want to export meets the following conditions:

  • Ensure that the export directory has free storage space to accommodate the export.
  • Ensure that the /var/lib/pulp/ directory has free storage space equivalent to the size of the repositories being exported for temporary files created during the export process.
  • /var/cache/pulp ディレクトリーに、エクスポートプロセス中に作成される一時ファイルに、エクスポートされるリポジトリーのサイズの 2 倍の空き容量があることを確認します。
  • エクスポートするコンテンツビュー内の全リポジトリーでダウンロードポリシーを即時 に設定していることを確認します。詳細については、「Download Policies Overview」を参照してください。
  • リポジトリー設定ページで、インポートするリポジトリーの Mirror on Sync チェックボックスの選択が解除されていることを確認します。
  • エクスポートする製品が、必要な日付に同期されることを確認します。

To Export a Content View Version:

  1. List Content Views to determine the ID of a Content View version you want to export:

    # hammer content-view version list \
    --organization "Default Organization"
  2. Export the version of a Content View. Specify the directory where to store the export with the --export-dir option and the ID of the Content View version that you export with the --id option. The pulp_export_destination setting does not work for this procedure.

    # hammer content-view version export --export-dir export_directory \
    --id content_view_version_ID
  3. エクスポートしたコンテンツビューバージョンが含まれるアーカイブが、エクスポートディレクトリーにあることを確認します。

    # ls export_directory
    export-1.tar

9.2. Importing a Content View Version

You can use the archive that the hammer content-view version export command outputs to create a version of a Content View with the same content as the exported Content View version. For more information about exporting a Content View version, see 「Exporting a Content View Version」.

コンテンツビューバージョンをインポートすると、メジャーバージョン番号、マイナーバージョン番号が同じで、同じパッケージ、エラータを含む同じリポジトリーが含まれます。エクスポートされたアーカイブ内の json ファイルの major および minor 設定を変更して、バージョン番号をカスタマイズできます。

Prerequisites

コンテンツビューをインポートするには、インポート先の Satellite Server が、以下の条件を満たしていることを確認します。

  • エクスポートしたコンテンツビューバージョンに含まれる同じ Yum コンテンツを追加することを確認します。
  • コンテンツビューをオフラインの Satellite にインポートする場合には、Red Hat カスタマーポータルからコンテンツ ISO をダウンロードして、Satellite Server にインポートする日宇町があります。詳細は付録B Importing Content ISOs into a Disconnected Satelliteを参照してください。
  • エクスポートする製品が、必要な日付に同期されることを確認します。
  • エクスポートするコンテンツビュー内の全リポジトリーでダウンロードポリシーを即時 に設定していることを確認します。詳細については、「Download Policies Overview」を参照してください。
  • リポジトリー設定ページで、インポートするリポジトリーの Mirror on Sync チェックボックスの選択が解除されていることを確認します。

Procedure

  1. インポート先の Satellite Server の /var/lib/pulp/katello-export ディレクトリーに、エクスポートしたコンテンツビューバージョンが含まれるアーカイブファイルをコピーします。
  2. インポート先の Satellite Server で、エクスポートしたコンテンツビューと、名前とラベルが同じコンテンツビューを作成します。
  3. エクスポートしたコンテンツビューバージョンのアーカイブを Satellite Server にインポートします。

    # hammer content-view version import \
    --export-tar /var/lib/pulp/katello-export/exported_CV_archive \
    --organization-id Your_Organization_ID
  4. List Content Views for your organization to verify that you import the Content View version successfully:

    # hammer content-view version list --organization "Your_Organization"