Skip to main content

Minions

A minion is an agent application that is installed on managed nodes of a SaltStack topology and provides interaction with the SaltStack master.
The minion executes of commands sent by the master, collects information from the managed node, and manages its software configuration.

A managed node running the salt-minion service is also referred to as a minion.

The Windows® and GNU/Linux versions of the minion have similar functionality, but differ in the sets of methods of the execution modules and state modules.

When the minion is first launched, it establishes a connection with the master, the address of which is specified in the minion configuration file.
The minion initiates the handshake procedure and sends its public key to the master.
After the initial connection is established, the minion's public key is stored on the master.

The master then passes its public key to the minion, along with a rotating symmetric AES key used to encrypt and decrypt messages sent by the master.
The AES key is passed encrypted with the public key previously received from the minion.
All further communications between the master and minion are encrypted with AES keys.

The rotating AES key is used to encrypt commands sent by the master to the minion and to encrypt connections to the SaltStack master's file server.
The key is regenerated each time the master is restarted, and each time a minion's key is deleted with the salt-key command.
After the key is rotated, all minions must re-authenticate to receive the updated key.
This allows the AES key to be rotated without having to interrupt the connection to the minion.

The publication data between the master and minion is encrypted with the rotating AES key. When the master and minion interact directly, the data is encrypted with a unique AES key for each session.

Accepting a master to control the minions

The Salt.Box software suite supports the ability to work with multiple master servers.
Each master can only manage the minions registered on it (i.e. those who have successfully exchanged PKI keys with it).

To allow or prohibit a master from managing minions, do the following:

  1. In the main menu of the system, select the Masters item. You will be redirected to the master management page Fig. 1.

    Accepting a master to control the minions
    Figure 1. Accepting a master to control the minions
  2. To allow the management of the master's minions, click Accept in the corresponding table entry in the Actions field.

  3. To allow the management of the master's minions, click Reject in the corresponding table entry in the Actions field.

Minion collections

Displaying collections available to the user

Salt.Box users have permissions to view and manage specific sets of minions, called collections.
These permissions to access a collection (or set of collections) are granted to users by the administrator.

Salt.Box has a special role collections_admin that grants the user permission to view the root collection of minions, i.e. the set of ALL minions registered on ALL masters known to Salt.Box.

info

For information on adding users to the system and assigning roles, see the online documentation section Configuring KeyCloak.

This section covers examples for the user user who has been assigned the role of collections_admin.

To list the minions of a specific collection available to the user, follow these steps:

  1. In the main menu of the system, select Minions.
    The slide-out panel Fig. 2 will display all available collections.

    Selecting a collection
    Figure 2. Selecting a collection
  2. Select the desired collection.
    A list of minions of the selected collection will be displayed in the working area of ​​the browser window Fig. 3.

    List of minions of the selected collection
    Figure 3. List of minions of the selected collection

Collection filter

The set of minions in the collection is defined by the collection filter.
The user can apply an additional filter to the original collection displayed in the working window and save the resulting collection in Salt.Box.

A filter is a logical expression consisting of elementary "Rule" — comparison operations and predicates (depending on the argument types), combined by the logical operators AND and OR.
The priority of actions when calculating a logical expression is standard for Boolean algebra, grouping can also be used using the "Group" construction — a kind of "скобок" in the expression.

The figure Fig. 4 shows an example of an additional user filter.

  1. To apply the created filter to the original collection, click the 🔍Search button at the bottom left of the filter conditions set Fig. 4.

    Collection filter
    Figure 4. Collection filter
  2. To create a collection based on the applied filter, click the button 💾 at the bottom right of the filter conditions set Fig. 4.

  3. In the collection creation dialog box, fill in the title and slug fields Fig. 5.
    Pay attention to the hint with the requirements for the character set used in the slug field.
    Click the Create button.

    Creating a collection
    Figure 5. Creating a collection

    A new collection will be created and will be available for selection by the user on the sliding panel Fig. 2.

Minion Information

After some minion is connected to the master for the first time, the method of the grains.items execution module is automatically launched on this minion.
This method collects rarely changing (static) information about the minion's hardware and software.

After the specified method is executed, the minion card displays the collected information Fig. 6.
You can go to the minion card by clicking on the link in the MID field in the entry for the corresponding minion.

The figures Fig. 7Fig. 13 show examples of groups of grains data received from minions.

Minion card
Figure 6. Minion card



Group of grains "Basic configuration"
Figure 7. Group of grains "Basic configuration"



Group of grains "Operation system"
Figure 8. Group of grains "Operation system"



Group of grains "Environment"
Figure 9. Group of grains "Environment"



Group of grains "Storage"
Figure 10. Group of grains "Storage"



Group of grains "Network"
Figure 11. Group of grains "Network"



Group of additional grains
Figure 12. Group of additional grains



Other grains group
Figure 13. Other grains group

Creating jobs and tasks

Creating a job

A simple SaltStack command for a single minion can be created directly from the minion card:

  1. Click the Create Job button located in the upper left part of the card. A dialog box for creating a command will be displayed, with the necessary values ​​specified in the Target type and Target fields: targeting type and minion ID Fig. 6.

  2. Select the method called by the command and, if necessary, specify the arguments passed to the method.

    info

    The procedure for creating, managing, and monitoring the execution of SaltStack commands is described in detail in the online documentation section Jobs.

Creating a task

A task for a group of minions can be created from the minions page:

  1. In the list of minions of the displayed collection, check the desired minions. Fig. 3.

  2. Click the Create Task button located in the upper left part of the list.
    A dialog box for creating a task will be displayed.

  3. Specify the necessary parameters and create the task.

    info

    The procedure for creating, managing, and monitoring the execution of tasks is described in detail in the online documentation section Tasks.

Viewing the tasks performed on the minions of the displayed collection

To view a list of all tasks performed on the minions of the currently displayed collection, select the Tasks tab located at the top left of the minions page.
The task table is shown in the Fig. 14.

List of tasks performed on the minions
Figure 14. List of tasks performed on the minions


The Table 1 describes the task table fields.

Table 1. List of fields of the task table
FieldDescription
IDTask identifier
Task Template TitleTitle of the parent template
Task Template NameSystem name of the parent template
CollectionCollection that owns the task
UserUser who created the task
StatusTask completion status
CreatedCreation period

Statistics on the minions

To view statistical information on the minions' hardware and software, select the Statistics tab located at the top left of the minions page.

The statistical information blocks have a customizable view.
You can change the placement of the blocks on the page, choose a text view or a diagram view within the information block.

The view of the statistics page is shown in Fig. 15 and Fig. 16.

Minion statistics in text form only
Figure 15. Statistics on minions in text form only


Minion statistics including charts
Figure 16. Statistics on minions with charts