Clients Update Using Recurring Actions

This workflow shows how to automate updating the clients registered at SUSE Manager using recurring actions.

The workflow is applicable for Salt clients only.

1. Use Case / Situation

Automated update of clients is benefitial when:

  • update of a large number of clients is wanted

  • the workflow should not be re-done every execution

  • a dedicated maintenance window exists.

2. Outcome / Resolution

Successful completion of this workflow results in consistent and supportable state.

3. Preparation

Before you start, you should have a number of Salt clients onboarded. It may make sense to have them sorted into groups you want to update together. In this workflow we use a system group named infra-services.

4. Step-by-Step Workflow Instructions

To update a client two steps are required. A third step is optional but highly recommended to finalize the update process.

Procedure 1: Creating a Recurring Action to Update Salt Itself
  1. As an example, we create the action to update Salt itself as a recurring action for all systems in the organization. In the SUSE Manager Web UI, navigate to Home  My Organization  Recurring Actions and click Create.

  2. Select Action Type Custom State and enter a Schedule Name like update-salt.

  3. Select a schedule. For example, Weekly: Wednesday, 9:00 am .

  4. Assign the update-salt state by selecting the checkbox.

  5. Click Save Changes to save the action.

  6. You can edit the execution order of the states if needed. Click Confirm to confirm the order.

  7. Click Create Schedule to save the action.

Procedure 2: Creating a Recurring Action to Apply All Available Updates to the Systems
  1. As an example we create the action to apply all updates as a recurring action for a system group called "infra-services". In the SUSE Manager Web UI go to Systems  System Groups and click on infra-services.

  2. Now go to Recurring Actions and click Create.

  3. Select Action Type Custom State and enter a Schedule Name like full-system-update.

  4. Select a Schedule. For example, Weekly: Wednesday, 9:30 am . Keep enough time between this action and the update-salt action. The update-salt actions must be finished on all systems before this action should be executed.

  5. Assign the states util.syncall, certs, channels and `uptodate by selecting the checkboxes.

  6. Save the action by clicking Save Changes.

  7. You can edit the execution order of the states. The order should be util.syncall, certs, channels, and finally uptodate. Click Confirm to store the order.

  8. Click Create Schedule to save the action.

The `uptodate also performs a reboot, if an update requests it. This reboot be prevented if needed. For example, the systems which use live patching need to prevent the rebooting following the update.

Procedure 3: Configuring Systems to Not Reboot After the uptodate State is Applied
  1. In the SUSE Manager [web ui} go to Systems  Custom System Info and click Create Key.

  2. Enter "mgr_reboot_if_needed" as Key Label and set as Description. Define if the uptodate state should perform a reboot if needed. Set to False if this is not wanted.

  3. Click Create Key to store the new key.

  4. To assign values to multiple systems, navigate in the SUSE Manager Web UI to Systems  Overview and select the checkbox for all systems you want to modify. These system are not in the System Set Manager (SSM).

  5. Select in the left menu System Set Manager and select Misc  Custom Values in the tab bar.

  6. Click mgr_reboot_if_needed and enter False as Value.

  7. Click Set Values to save.

Procedure 4: Creating a Recurring Action to Run a Highstate After the Update
  1. As an example, we create the action to apply the highstate for the same group which was fully updated before. In the SUSE Manager Web UI, navigate to Systems  System Groups and click infra-services.

  2. Go to Recurring Actions and click Create.

  3. Select Action Type Highstate and enter a Schedule Name like highstate.

  4. Select a Schedule. For example, Weekly: Wednesday, 10:30 am . Again, keep enough time between this action and the full-system-update action.

  5. Click Create Schedule to save the action.