-
Notifications
You must be signed in to change notification settings - Fork 3
Salt
Term | meaning |
---|---|
minion | slave, managed host |
sls | salt state file, representation of the state the system should end up in |
pillar | sensitive data, tree like structure, targeted and securely send to selected minions |
grain | minion data, information for state to behave differently (minion os information) |
Each state is enforced on targeted minion. State during its execution uses modules. The difference between the two:
State | Module |
---|---|
Assert/enforce certain state on minion. They map to nice sls files |
Executes a task |
Master configuration: /etc/salt/master
Master configuration overrides: /etc/salt/master.d/myoverrides.conf
Minion configuration: /etc/salt/minion
Pillar subsystem can be extended to fetch data from various sources, use ext-pillar
to achieve this.
ext pillar: file_tree
File becomes the value of key
Under the root_dir
you must have either hosts/minion_id
folder or nodegroups/nodegroup
folder
Data is available to matching hosts.
Example configuration:
ext_pillar:
- file_tree:
root_dir: /path/to/root/directory
keep_newline:
- files/testdir/*
Jinja -> YAML -> highstate -> low state -> execution
Execute states from given environment: salt '*' state.highstate saltenv=base
Execute state: salt '*' state.apply <statename> [saltenv=<env>]
Using curl to communicate with API: curl -sSk https://salt.local:9191/login -H 'Accept: application/x-yaml' -d username=saltuser -d password=saltpassword -d eauth=auto
- https://repo.saltstack.com/
- https://docs.saltstack.com/en/getstarted/config/functions.html
- https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html
- https://docs.saltstack.com/en/latest/ref/states/highstate.html
- https://github.com/saltstack/salt-bootstrap
- https://docs.saltstack.com/en/latest/ref/configuration/master.html
- https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
- General
- OS
- Networks
- Configuration
- Protocols
- Link layer
- Sockets
- Routing
- Tunneling
- Debugging
- LoRa
- Virtualization
- Infrastructure as a code
- Desktop environments
- Monitoring
- Benchmarking