在命令行上注册客户端
1. 简介
在大多数情况下,使用默认的引导方法即可正确注册 Salt 客户端。
不过,您可以使用 Salt 手动将客户端注册到 SUSE Multi-Linux Manager 服务器,方法是编辑客户端上的 Salt 受控端文件,并提供服务器的完全限定域名 (FQDN)。
使用此方法需满足以下要求:
-
使用服务器的入站端口 4505 和 4506。
-
除了确保这些端口是开放的之外,不需要在 SUSE Multi-Linux Manager 服务器上进行任何配置。
-
requires that you have installed the
venv-salt-minion(Salt bundle) or thesalt-minionpackage on the Salt client before registration. Both use configuration files in different locations and filenames remain the same. Thesystemdservice filename is different.
|
Bootstrapping this way will only work if you use the |
2. Salt 捆绑包配置
- 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 捆绑包的详细信息,请参见 Salt 捆绑包。
-
-
On the Salt client, open the
minionconfiguration 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 -
在文件中添加或编辑 SUSE Multi-Linux Manager 服务器或代理的 FQDN 以及激活密钥(如果有)。另外请添加以下其他配置参数。
Listing 3. 配置参数master: SERVER.EXAMPLE.COM grains: susemanager: activation_key: "<Activation_Key_Name>" server_id_use_crc: adler32 enable_legacy_startup_events: False enable_fqdns_grains: False -
Restart the
venv-salt-minionservice:systemctl restart venv-salt-minion -
On the SUSE Multi-Linux Manager Server, accept the new client key; replace
<client>with the name of your client:salt-key -a '<客户端>'
3. 客户端配置
- Client (
salt-minion) -
-
/etc/salt/ -
/etc/salt/minion -
/etc/salt/minion.d/NAME.conf -
systemd service file:
salt-minion.service
-
-
On the Salt client, open the
minionconfiguration file. The configuration file is either located at:/etc/salt/minion或:
/etc/salt/minion.d/NAME.conf -
在文件中添加或编辑 SUSE Multi-Linux Manager 服务器或代理的 FQDN 以及激活密钥(如果有)。另请添加下列其他配置参数。
master: SERVER.EXAMPLE.COM grains: susemanager: activation_key: "<Activation_Key_Name>" server_id_use_crc: adler32 enable_legacy_startup_events: False enable_fqdns_grains: False -
Restart the
salt-minionservice:systemctl restart salt-minion -
On the SUSE Multi-Linux Manager Server, accept the new client key; replace
<client>with the name of your client:salt-key -a '<客户端>'
有关 Salt 受控端配置文件的详细信息,请参见 配置 Salt 受控端。