...

Open source softwares - SaltStack

Back to Course

Lesson Description


Lession - #1526 SaltStack Job Management


What is SaltStack Job Management?

Salt has the perform of speedy correspondence with an extensive variety of systems. this methodology causes Salt to form a ground-breaking playacting multiple tasks system. Salt will run Jobs on in far more than one systems, thus Salt uses work the executives methodology to deal with every activity running on all of the systems. This half clarifies concerning job the board well.

What is employment ID?

Salt has store catalog, cachedir. within this, a catalog that minions continue is named because the proc index. it's set within the below catalog/var/store/salt/proc.

The proc registry is used to keep up all of the files. At the purpose once these Files area unit dead, they appoint with an extraordinary activity ID. This activity id distinguishes the current running jobs on the flunky and enable the roles to be gazed upward.

SALTUTIL Module

Salt presents another module that's referred to as because the Saltutil work the board procedure. This module contains distinctive capacities to manage Jobs. These capacities are used to manage jobs at the follower level. The capacities area unit depicted briefly as pursues −

  • running − Returns all the running jobs data that area unit found within the proc directory.
  • find_job − Returns specific knowledge about a certain job based on the job id.
  • signal_job − allows a given job id(jid>
    to be sent a signal.
  • term_job − Sends a termination signal for the specified job.
  • kill_job − Sends a kill signal for the specified job.

    Jobs Runner

    The jobs sprinter contains capacities to form seeing info less difficult and more clean. it's various capacities. offer us an opportunity to talk concerning all of those capacities well.

    Active perform

    The Active perform is used to distinguish that Jobs are thus far running and check what systems have finished an Job and what systems are thus far being looked out for. it's executed utilizing the below command,

    
    salt-run jobs.active
    ​


    LOOKUP_JID perform The lookup_jid sprinter can show the data for the current looking activity. These Jobs area unit organized by suggests that of the keep_jobs different within the ace configuration. it's dead utilizing the below command.

    
    salt-run jobs.lookup_jid
    


    LIST_JOBS perform

    The List_jobs work is used to rattle off the activity info for jobs. it's communicated by the below command −

    
    salt-run jobs.list_jobs
    ​


    Job planning

    The schedule system uncovered the execution of any execution work on minions or any sprinter on the ace.

    It is performed by the below techniques −

    Schedule − The schedule choice in either the master or the dependent config files.

    Minion pillar data knowledge It refreshes the dependent pillar data using the saltutil.refresh_pillar command.

    
    
    schedule:
    job1:
    function: saltstate.sls
    seconds: 3600
    args:
    - httpd
    kwargs:
    test: True