Salt stack orchestration

Orchestration is automated coordination and arrangement of systems. Orchestrate runner is used to perform the orchestration in saltstack.

Orchestrate Runner

Orchestrate Runner offers all the functionality of the overstate. It is originally called the state.sls runner. This orchestrate runner is used to generalizing the Salt state system to a Salt master context. The state.sls and the state. high state functions are executed on each Salt minion, but the state. orchestrate runner is executed on the master. The state. orchestrate runner allows you to manage your entire infrastructure as a state fully. Let us understand how to go through a simple execution process.

Simple Execution

The Orchestrate Runner command is the same as the state.sls function, but you can execute it with the “salt-run” instead of salt.

we have a sample.sls file located at /srv/salt/orch/sample.sls and add the following code in that file.

#cat sample.sls



      - tgt: 'web*'

      - sls:

         - nginx


The following command is used to run on the master and it will apply the states defined in that file.

#salt-run state.orchestrate orch.sample

Execute Function

To execute a function, we should use the salt.function. Consider a file data.sls located at /srv/salt/orch/data.sls. Now, add the following changes in that file.

#cat data.sls


      - tgt: '*'

      - arg:

         - rm -rf /tmp/data

The following command is used to execute the Salt function.

Recent Comments

No comments

Leave a Comment