Saltstack is by it's design a event driven configuration management tool. In talk will do a deep dive into salt reactor, runners and beacon systems. Talk will also cover a demo of event driven application releases process.
2. SaltStack
SaltStack is extremely fast and scalable systems and
configura@on management soDware for predic@ve
orchestra@on, cloud and data center automa@on, server
provisioning, applica@on deployment and more.
3. Agenda
salt @ bloglovin
Terminology
Orchestrate
Reactor
Beacons
4. salt @ bloglovin
tens of millions of monthly unique visitors
hundred of millions requests per day
couple of million stories parsed per day
hybrid bare metal servers/cloud vm’s
2 salt masters
~90 salt minions
5. salt @ bloglovin
Parts we use!
States/Pillars/Grains
Orchestrate
Reactor
Salt Api
Salt Cloud
13. Grains
via state
root@mon1:/# salt minion_love grains.get ip_interfaces:eth0
minion_love:
- 172.17.0.9
within a state file
{%- set eth0 = salt['grains.get'](ip_interfaces:eth0, '') %}
20. # This script is to be called from the reactor system
{%- set application = data['data']['application'] %}
{%- set container = data['data']['container'] %}
{%- set node = data['data']['salt-node'] %}
{%- set tag = data['data']['tag'] %}
sync-states:
cmd.saltutil.sync_states:
- tgt: {{ node }}
deploy-containers:
cmd.state.sls:
- tgt: {{ node }}
- arg:
- containers.{{ container }}
- kwarg:
pillar:
containers:
imagetag:
{{ application }}: {{ tag }}
21. Salt Api
Yes! There’s an rest-‐api
curl -sS salt.jacksoncage.se/run
-H 'Accept: application/x-yaml'
-d client='local'
-d tgt='*'
-d fun='test.ping'
-d username='saltdev'
-d password='saltdev'
-d eauth='pam'
22. Salt Api
# Example start creation dev box via curl:
curl -H 'X-Salt-Key: Secret-Key-Here'
-H 'Content-Type: application/json'
-d '{"username":"love"}'
https://salt.jacksoncage.se/hook/api/devbox/create