ブートストラップリポジトリ
ブートストラップリポジトリには、ブートストラップ中にクライアントを登録するために必要なパッケージが含まれています。製品を同期するとき、ブートストラップリポジトリは、自動的に作成され、SUSE Multi-Linux Managerサーバに再生成されます。
1. ブートストラップリポジトリの作成準備
同期する製品を選択するとき、ブートストラップリポジトリは、必須のチャンネルすべてが完全にミラーリングされるとすぐに自動的に作成されます。
In the SUSE Multi-Linux Manager Web UI, navigate to and select the
Productstab. This dialog displays a completion bar for each product when they are being synchronized.Alternatively, you can navigate to , then click the channel associated to the repository. Navigate to the
Repositoriestab, then clickSyncand checkSync Status.
tailを実行する前に利用可能なログを一覧表示するには、コンテナホストで次のコマンドを実行します。
mgrctl exec ls /var/log/rhn/reposync/SUSE Multi-Linux Managerコンテナホストのコマンドプロンプトで、rootとして、チャンネルログファイルの同期を確認します。
mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log同期の進行中に各子チャンネルは独自のログを生成します。 同期が完了したことを確認するには、ベースチャンネルと子チャンネルのログファイルをすべて確認する必要があります。
2. 自動モードのオプション
ブートストラップリポジトリの自動作成動作を変更できます。 このセクションでは、さまざまな設定を説明します。
- フラッシュモード
-
By default, existing repositories are updated only with the latest packages. You can configure it to always start with an empty repository instead. To enable this behavior, add or edit this value in
/etc/rhn/rhn.conf:server.susemanager.bootstrap_repo_flush = 1
- 自動モード
-
By default, automated regeneration of the bootstrap repositories is enabled. To disable it, add or edit this value in
/etc/rhn/rhn.conf:server.susemanager.auto_generate_bootstrap_repo = 0
2.1. ブートストラップデータファイルの設定
The tool uses a data file with information about which packages are required for each distribution. The data file is stored at /usr/share/susemanager/mgr_bootstrap_data.py. SUSE updates this file regularly. If you want to makes changes to this file, do not edit it directly. Instead, create a copy in persistent directory and edit your copy:
cp /usr/share/susemanager/mgr_bootstrap_data.py /srv/susemanager/my_data.py
When you have made your changes, configure SUSE Multi-Linux Manager to use the new file. Add or edit this value in /etc/rhn/rhn.conf:
server.susemanager.bootstrap_repo_datamodule = my_data
|
次の更新時、SUSEの新しいデータによって、新しいデータファイルではなく元のデータファイルが上書きされます。 SUSEによって行われた変更を使用して新しいファイルを最新に保つ必要があります。 |
3. ブートストラップリポジトリの手動生成
デフォルトでは、ブートストラップリポジトリは毎日再生成されます。 コマンドプロンプトからブートストラップリポジトリを手動で作成できます。
SUSE Multi-Linux Managerサーバのコマンドプロンプトで、rootとして、次のコマンド用のブートストラップリポジトリを作成するために使用できるディストリビューションをリストします。
mgr-create-bootstrap-repo -l製品ラベルとして適切なリポジトリ名を使用して、ブートストラップリポジトリを作成します。
mgr-create-bootstrap-repo -c SLE-version-x86_64または、利用可能なディストリビューション一覧のディストリビューション名の横に表示されている番号を使用します。
The client repository is located in /srv/www/htdocs/pub/repositories/.
複数の製品(SLESとSLES for SAPなど)をミラーリング済みの場合、またはカスタムチャンネルを使用している場合、ブートストラップリポジトリを作成するときに使用する親チャンネルを指定する必要が生じる場合があります。 これは、あらゆる状況で必須ではありません。 たとえば、SLES 15の一部のバージョンには共通のコードベースがあるため、親チャンネルを指定する必要はありません。 このプロシージャは、ご使用の環境で必要な場合のみ使用します。
利用できる親チャンネルを確認します。
mgr-create-bootstrap-repo -c SLE-15-x86_64 Multiple options for parent channel found.(親チャンネルの複数にオプションが表示されます。)Please use option --with-parent-channel <label> and choose one of:(オプション --with-parent-channel <label>を使用し、次のいずれかを選択してください。) - sle-product-sles15-pool-x86_64 - sle-product-sles_sap15-pool-x86_64 - sle-product-sled15-pool-x86_64適切な親チャンネルを指定します。
mgr-create-bootstrap-repo -c SLE-15-x86_64 --with-parent-channel sle-product-sled15-pool-x86_64
3.1. 複数アーキテクチャを含むリポジトリ
If you are creating bootstrap repositories that include multiple different architectures, you need to be careful that all architectures are updated correctly. For example, the x86-64 and IBM Z architectures for SLE use the same bootstrap repository URL at /srv/www/htdocs/pub/repositories/sle/15/2/bootstrap/.
When the flush option is enabled, and you attempt to generate the bootstrap repository for multiple architectures, only one architecture is generated. To avoid this, use the --no-flush option at the command prompt when creating additional architectures. For example:
mgr-create-bootstrap-repo -c SLE-15-SP2-x86_64 mgr-create-bootstrap-repo --no-flush -c SLE-15-SP2-s390x
4. ブートストラップとカスタムチャンネル
If you are using custom channels, you can use the --with-custom-channels option with the mgr-create-bootstrap-repo command. In this case, you also need to specify the parent channel to use.
カスタムチャンネルを使用すると、ブートストラップリポジトリの自動作成が失敗する場合があります。 この場合、リポジトリを手動で作成する必要があります。
カスタムチャンネルの詳細については、カスタムチャンネルを参照してください。