第6章 クライアントの登録
Red Hat Enterprise Linux 6、7、または 8 オペレーティングシステムを実行しているクライアントを、ロードバランシング用に設定する Capsule Server に登録できます。クライアントを登録して Puppet を使用するように設定する方法の詳細は、ホストの管理 ガイドの ホストの登録 を参照してください。
クライアントを登録するには、次のいずれかの手順に進みます。
6.1. Red Hat Satellite ホストの登録 リンクのコピーリンクがクリップボードにコピーされました!
ホスト登録機能、Satellite API、または Hammer CLI を使用して、ホストを Satellite に登録できます。
手順
- Satellite Web UI で、ホスト > ホストの登録 に移動します。
- Generate をクリックして登録コマンドを作成します。
- ファイル アイコンをクリックして、コマンドをクリップボードにコピーします。
- 登録するホストにログインして、以前に作成したコマンドを実行します。
rhsm.baseurlおよびserver.hostnameのサブスクリプションマネージャーの設定を更新します。subscription-manager config \ --rhsm.baseurl=https://loadbalancer.example.com/pulp/content \ --server.hostname=loadbalancer.example.com
# subscription-manager config \ --rhsm.baseurl=https://loadbalancer.example.com/pulp/content \ --server.hostname=loadbalancer.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
/etc/yum.repos.d/redhat.repoファイルをチェックして、適切なリポジトリーが有効であることを確認します。
CLI 手順
Hammer CLI を使用してホスト登録コマンドを生成します。
hammer host-registration generate-command \ --activation-keys "My_Activation_Key"
# hammer host-registration generate-command \ --activation-keys "My_Activation_Key"Copy to Clipboard Copied! Toggle word wrap Toggle overflow ホストが Satellite Server の SSL 証明書を信頼しない場合は、登録コマンドに
--insecureフラグを追加して SSL 検証を無効にすることができます。hammer host-registration generate-command \ --activation-keys "My_Activation_Key" \ --insecure true
# hammer host-registration generate-command \ --activation-keys "My_Activation_Key" \ --insecure trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 登録するホストにログインして、以前に作成したコマンドを実行します。
rhsm.baseurlおよびserver.hostnameのサブスクリプションマネージャーの設定を更新します。subscription-manager config \ --rhsm.baseurl=https://loadbalancer.example.com/pulp/content \ --server.hostname=loadbalancer.example.com
# subscription-manager config \ --rhsm.baseurl=https://loadbalancer.example.com/pulp/content \ --server.hostname=loadbalancer.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
/etc/yum.repos.d/redhat.repoファイルをチェックして、適切なリポジトリーが有効であることを確認します。
API の手順
Satellite API を使用してホスト登録コマンドを生成します。
curl -X POST https://satellite.example.com/api/registration_commands \ --user "My_User_Name" \ -H 'Content-Type: application/json' \ -d '{ "registration_command": { "activation_keys": ["My_Activation_Key_1, My_Activation_Key_2"] }}'# curl -X POST https://satellite.example.com/api/registration_commands \ --user "My_User_Name" \ -H 'Content-Type: application/json' \ -d '{ "registration_command": { "activation_keys": ["My_Activation_Key_1, My_Activation_Key_2"] }}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow ホストが Satellite Server の SSL 証明書を信頼しない場合は、登録コマンドに
--insecureフラグを追加して SSL 検証を無効にすることができます。curl -X POST https://satellite.example.com/api/registration_commands \ --user "My_User_Name" \ -H 'Content-Type: application/json' \ -d '{ "registration_command": { "activation_keys": ["My_Activation_Key_1, My_Activation_Key_2"], "insecure": true }}'# curl -X POST https://satellite.example.com/api/registration_commands \ --user "My_User_Name" \ -H 'Content-Type: application/json' \ -d '{ "registration_command": { "activation_keys": ["My_Activation_Key_1, My_Activation_Key_2"], "insecure": true }}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow アクティベーションキーを使用すると、その環境を簡単に指定できます。詳細は、コンテンツ管理ガイド の アクティベーションキーの管理 を参照してください。
コマンドライン引数としてパスワードを入力するには、
username:password構文を使用します。これにより、パスワードがシェル履歴に保存される可能性があることに注意してください。ホストの登録に関する情報は ホストの管理 の Red Hat Satellite へのホストの登録 を参照してください。
- 登録するホストにログインして、以前に作成したコマンドを実行します。
rhsm.baseurlおよびserver.hostnameのサブスクリプションマネージャーの設定を更新します。subscription-manager config \ --rhsm.baseurl=https://loadbalancer.example.com/pulp/content \ --server.hostname=loadbalancer.example.com
# subscription-manager config \ --rhsm.baseurl=https://loadbalancer.example.com/pulp/content \ --server.hostname=loadbalancer.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
/etc/yum.repos.d/redhat.repoファイルをチェックして、適切なリポジトリーが有効であることを確認します。