コマンドラインでクライアントを登録する

1. 概要

ほとんどの場合、Saltクライアントは、デフォルトのブートストラップメソッドで正確に登録されます。

ただし、Saltを使用してクライアントをSUSE Multi-Linux Managerサーバに手動で登録できます。そのためには、クライアントでSalt minionファイルを編集し、サーバの完全修飾ドメイン名(FQDN)を指定します。

このメソッドでは:

  • サーバで受信するポート4505および4506を使用します。

  • SUSE Multi-Linux Managerサーバの設定は不要です。ただし、上記のポートを開いている必要があります。

  • requires that you have installed the venv-salt-minion (Salt bundle) or the salt-minion package on the Salt client before registration. Both use configuration files in different locations and filenames remain the same. The systemd service filename is different.

Bootstrapping this way will only work if you use the salt-minion being part of the client tools channels or of an official SUSE distributions.

2. Salt Bundleの設定

Salt Bundle (venv-salt-minion)
  • /etc/venv-salt-minion/

  • /etc/venv-salt-minion/minion

  • /etc/venv-salt-minion/minion.d/NAME.conf

  • systemd service file: venv-salt-minion.service

Salt bundleの詳細については、Salt Bundleを参照してください。

プロシージャ: Salt Bundle設定ファイルでクライアントを登録する
  1. On the Salt client, open the minion configuration file. The configuration file is either located at:

    Listing 1. 設定ファイル
    /etc/venv-salt-minion/minion

    または

    Listing 2. 設定ファイル
    /etc/venv-salt-minion/minion.d/NAME.conf
  2. ファイルで、SUSE Multi-Linux ManagerサーバまたはプロキシのFQDNと、アクティベーションキー(存在する場合)を追加または編集します。以下にリストされている他の設定パラメータも追加します。

    Listing 3. 設定パラメータ
    マスタ: SERVER.EXAMPLE.COM
    
    grains:
      susemanager:
        activation_key: "<Activation_Key_Name>"
    
    server_id_use_crc: adler32
    enable_legacy_startup_events: False
    enable_fqdns_grains: False
  3. Restart the venv-salt-minion service:

    systemctl restart venv-salt-minion
  4. On the SUSE Multi-Linux Manager Server, accept the new client key; replace <client> with the name of your client:

    salt-key -a '<client>'

3. クライアントの設定

Client (salt-minion)
  • /etc/salt/

  • /etc/salt/minion

  • /etc/salt/minion.d/NAME.conf

  • systemd service file: salt-minion.service

プロシージャ: Salt Minion設定ファイルでクライアントを登録する
  1. On the Salt client, open the minion configuration file. The configuration file is either located at:

    /etc/salt/minion

    または

    /etc/salt/minion.d/NAME.conf
  2. ファイルで、SUSE Multi-Linux ManagerサーバまたはプロキシのFQDNと、アクティベーションキー(存在する場合)を追加または編集します。以下にリストされている他の設定パラメータも追加します。

    マスタ: SERVER.EXAMPLE.COM
    
    grains:
      susemanager:
        activation_key: "<Activation_Key_Name>"
    
    server_id_use_crc: adler32
    enable_legacy_startup_events: False
    enable_fqdns_grains: False
  3. Restart the salt-minion service:

    systemctl restart salt-minion
  4. On the SUSE Multi-Linux Manager Server, accept the new client key; replace <client> with the name of your client:

    salt-key -a '<client>'

Salt minion設定ファイルの詳細については、Salt Minionの設定を参照してください。