操作
您可以通过多种不同的方式管理对客户端执行的操作:
-
可以安排自动重复性操作,以按照指定的日程安排将 Highstate 或任意一组自定义状态应用于客户端。
-
可以将重复性操作应用于单个客户端、系统组中的所有客户端或整个组织。
-
可以通过创建操作链来设置要按特定顺序执行的操作。
-
可以提前创建和编辑操作链,并将其安排为在适当的时间运行。
-
-
还可以在一个或多个客户端上执行远程命令。
-
使用远程命令可以向单个客户端或者与搜索词匹配的所有客户端发出命令。
-
1. 重复性操作
可以对单个客户端、系统组、组织中的所有客户端应用重复性操作。
SUSE Multi-Linux Manager 目前支持将以下操作类型作为重复性操作:
-
Highstate:Execute the highstate. -
Custom state:Execute a set of custom states. A custom state can be either an internal state provided by SUSE Multi-Linux Manager, or a configuration channel created by a user.
有关配置通道的详细信息,请参见 配置管理。
-
To apply a recurring action to an individual client, navigate to
Systems, click the client to configure schedules for, and navigate to theRecurring Actionstab. -
To apply a recurring action to a system group, navigate to , select the group to configure schedules for, and navigate to
Recurring Actionstab. -
单击 创建。
-
Select an action type from the
Action Typedropdown. -
键入新日程安排的名称。
-
选择重复性操作的频率:
-
Hourly:Type the minute of each hour. For example,15runs the action at fifteen minutes past every hour. -
Daily:Select the time of each day. For example,01:00runs the action at 0100 every day, in the timezone of the SUSE Multi-Linux Manager Server. -
Weekly:Select the day of the week and the time of the day, to execute the action every week at the specified time. -
Monthly:Select the day of the month and the time of the day, to execute the action every month at the specified time. -
Custom Quartz format:For more detailed options, enter a custom quartz string. 例如,要在每个月的每个星期六 02:15 运行重复性操作,请输入:0 15 2 ? * 7
-
-
OPTIONAL: Toggle the
Test modeswitch on to run the schedule in test mode. -
For actions of type
Custom state, select the states from the list of available states and click Save Changes. This will only save the current state selection and not the schedule. -
在下一个窗格中,拖放所选状态使其按执行顺序排列,然后单击 确认。
-
单击 创建日程安排 保存设置,并查看现有日程安排的完整列表。
组织管理员可为组织中的所有客户端设置和编辑重复性操作。导航到,即可看到适用于整个组织的所有重复性操作。
SUSE Multi-Linux Manager 管理员可为所有组织中的所有客户端设置和编辑重复性操作。导航到,选择要管理的组织,然后导航到选项卡。
2. 操作链
如果您需要对客户端执行多个有序操作,可以创建一个操作链以确保遵循该顺序。
默认情况下,大多数客户端会在发出命令后立即执行操作。在某些情况下,操作需要很长时间,这可能意味着之后发出的操作会失败。例如,如果您指示客户端重引导,然后发出第二个命令,则第二个操作可能会失败,因为重引导仍在进行。为确保操作按正确的顺序进行,请使用操作链。
|
对于事务更新系统,操作链会在单个快照内执行,直到进行重引导操作。这可能会产生某些限制。 有关详细信息,请参见 注册 SLE Micro 客户端。 |
可以在所有客户端上使用操作链。操作链可以包含任意数量、采用任意顺序的以下操作:
|
操作链因用户而异。要在 Web UI 中查看操作链,您必须以创建相应操作链的用户身份登录。 |
-
In the SUSE Multi-Linux Manager Web UI, navigate to the first action you want to perform in the action chain. For example, navigate to
System Detailsfor a client, and click Schedule System Reboot. -
Check the
Add tofield and select the action chain you want to add to:-
If this is your first action chain, select
new action chain. -
如果该操作链已存在,请从列表中选择它。
-
如果您已有操作链,但想要创建一个新操作链,请键入新操作链的名称以创建该操作链。
-
-
确认操作。 该操作不会立即执行,而是创建新的操作链,并在屏幕顶部显示一个确认此行为的蓝色条。
-
Continue adding actions to your action chain by checking the
Add tofield and selecting the name of the action chain to add them to. -
添加完操作后,导航到并从列表中选择操作链。
-
通过将操作拖放到正确的位置来重新排列操作顺序。 单击蓝色加号查看要对其执行操作的客户端。单击 保存 以保存更改。
-
安排操作链的运行时间,然后单击 保存并安排。 如果您在不单击 保存 或 保存并安排 的情况下离开页面,将丢弃所有未保存的更改。
|
如果操作链中的某个操作失败,操作链将会停止,且不再执行其他操作。 |
可以通过导航到来查看操作链中已安排的操作。
3. 远程命令
请按照此过程通过 Salt 运行远程命令。
在开始之前,请确保您的客户端已订阅适用于其中所安装操作系统的工具子通道。有关订阅软件通道的详细信息,请参见 软件通道。
|
-
导航到 。
-
In the first field, before the
@symbol, type the command you want to issue. -
In the second field, after the
@symbol, type the client you want to issue the command on. You can type theminion-idof an individual client, or you can use wildcards to target a range of clients. -
单击 查找目标 查看指定为目标的客户端,并确认使用了正确的细节。
-
单击 运行命令 向目标客户端发出命令。