9.4. API を使用してロードバランサーにホストを登録する
ホスト登録用のロードバランサーを設定すると、負荷分散された Capsule にホストを登録できます。
手順
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 アクティベーションキーを使用すると、その環境を簡単に指定できます。詳細は、コンテンツの管理 の アクティベーションキーの管理 を参照してください。
{ "smart_proxy_id": My_Capsule_ID }を含めます。ホスト登録のロードバランシング用に設定した任意の Capsule Server の ID を使用できます。Satellite はロードバランサーを登録コマンドに自動的に適用します。以前に Capsule Server に登録されていたホストを登録するには、
{ "force": true }を追加します。コマンドライン引数としてパスワードを入力するには、
username:password構文を使用します。これにより、パスワードがシェル履歴に保存される可能性があることに注意してください。または、パスワードの代わりに一時的なパーソナルアクセストークンを使用することもできます。Satellite Web UI でトークンを生成するには、My Account > Personal Access Tokens に移動します。- SSH を使用してホストに接続し、登録コマンドを実行します。
-
/etc/yum.repos.d/redhat.repoファイルをチェックして、適切なリポジトリーが有効であることを確認します。