3.7. Satellite CV をコンテンツソースとして設定および使用する
RHEL Image Builder を使用してイメージをビルドするためのリポジトリーとして、Satellite のコンテンツビュー (CV) を使用できます。これを行うには、Satellite に登録されているホストで、Red Hat Content Delivery Network (CDN) の公式リポジトリーではなく、Satellite リポジトリーから取得できるようにリポジトリー参照を手動で設定します。
前提条件
- Satellite 6 に登録されたホストで RHEL Image Builder を使用している。
手順
現在設定されているリポジトリーからリポジトリー URL を見つけます。
$ sudo yum -v repolist rhel-8-for-x86_64-baseos-rpms | grep repo-baseurl Repo-baseurl :
次の出力は例です。
https://satellite6.example.com/pulp/content/YourOrg/YourEnv/YourCV/content/dist/rhel8/8/x86_64/baseos/os
ハードコードされたリポジトリーを Satellite Server に変更します。
0755
権限を持つリポジトリーディレクトリーを作成します。$ sudo mkdir -pvm 0755 /etc/osbuild-composer/repositories
/usr/share/osbuild-composer/repositories/*.json
の内容を、作成したディレクトリーにコピーします。$ sudo cp /usr/share/osbuild-composer/repositories/*.json /etc/osbuild-composer/repositories/
/content/dist/*
行を通じて Satellite URL とファイルの内容を更新します。$ sudo sed -i -e 's|cdn.redhat.com|satellite6.example.com/pulp/content/YourOrg/YourEnv/YourCV|' /etc/osbuild-composer/repositories/*.json
設定が正しく置き換えられたことを確認します。
$ sudo vi /etc/osbuild-composer/repositories/rhel-8.json
サービスを再起動します。
$ sudo systemctl restart osbuild-worker@1.service osbuild-composer.service
- Red Hat Image Builder 設定で必要なシステムリポジトリーをオーバーライドし、Satellite リポジトリーの URL をベース URL として使用します。システムリポジトリーのオーバーライド を参照してください。