Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

SystemLink

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced SystemLink States

This document is part of the SystemLink Portal.

 

Advanced SystemLink States

 

In SystemLink you can create and apply States to your systems.  By default, you apply a state to a target system to add the specified feeds and install a set of specific packages and versions on that target system.

 

However, advanced users can use states to do much more, such as running command-line commands, modifying registry keys, and modifying INI files on your target client system(s).

 

Background

To achieve remote job execution, SystemLink incorporates a popular remote execution engine known as Salt or Salt Open in its open-source variation. Salt is a Python-based framework that many large-scale data center providers use to manage configuration functions and task orchestration. Designed for scale and performance, Salt can help you manage thousands of nodes and thousands of jobs running simultaneously.

 

Learn more about Salt.

 

The architecture of Salt is similar to that of SystemLink in that it incorporates a master program on a central computer (“server”) to coordinate interactions among a group of connected nodes. On each node, Salt includes a minion service that manages local device processing. SystemLink users are not required to interface directly with Salt since SystemLink manages these interactions on the users’ behalf.

 

Developers interested in extending SystemLink’s remote execution capabilities can access Salt components for writing extensions and customizing automation.

 

Example of an Advanced State

In this example, I will walk you through how to create your own custom State in SystemLink that runs a command-line command when you apply the state on a system.

 

  1. In the SystemLink web UI, navigate to Systems Manager > System States.
  2. Set the Name to Command-Line Example.  Click the Create button.
  3. On the next screen, enable the Show Raw State checkbox.
  4. Copy the following text into the Raw view.
    • commandline_example:
      cmd.run:
      - name: '"c:\My Batch File.bat"'
    • Note Type your command-line command between the single quotes above in name: ''
  5. Save the state.
    allen_h_1-1591729287223.png
  6. Now, navigate to the Managed Systems page, select a Client system(s), go to the Software>States tab, and apply the "Command-Line Example" state.  This should execute the command-line command above on the target system(s).

 

More Examples

For more examples of other things you can do with Salt States, refer to this Advanced SystemLink State Examples GitHub page.

 

Contributors