SlideShare a Scribd company logo
1 of 28
Download to read offline
RQ
about me
☃ systems engineer @Logicea LLC

☃ I have broken development a few times

☃ I have broken production a few more
☃ I hate databases
about this
The Good Companions
Configuration management (CM) is a
field of management that focuses on
establishing and maintaining consistency of a
system. (Wikipedia)

Design your infrastructure
Systems integrity and consistency
Provision and automate 
Create proper processes
Cloud Management

Version Control

Automations and Remote Execution

Monitoring, Alerting, Logging
Configuration Management
Configuration Management
Configuration Management
Configuration Management
kk
YAML
So, SaltStack?
Saltstack delivers a dynamic infrastructure
communication bus used for orchestration,
remote execution, configuration management.

+ Python, YAML, Jinja2, ZeroMQ
+ Event driven
+ Master-agent, Masterless (ssh)
+ Multimaster for HA
+ Cloud/VM/Containers support
+ Orchestration
+ Reactors
+ Runners
+ Guaranteed execution order


	
  
So, SaltStack?
Saltstack delivers a dynamic infrastructure
communication bus used for orchestration,
remote execution, configuration management.

- Relatively young project

- Changes rapidly

- Its documentation is… challenging

- Needs some Python background

- Needs design background 

- If your saltmaster is compromised, LOL


	
  
Terminology
Master and Minion
The Master controls its Minions :p

State Modules
Code needed to enforce, set up or change the
configuration of a target system

Pillars
Custom data essential for state execution (e.g.
user accounts, lists of virtual hosts etc.)

Grains
Static minion information 

SLS Files (.sls)
Text files containing list of states to execute or,
simply pillar data
Terminology
Renderers
Render SLS files and pass information to
the state system

Templates

SaltMine

Top Files

Highstate
Architecture

•  Master-Minion Persistent TCP
connection 
•  Two listening ports on Master
(4505,4506)
•  No listening ports on Minions (yey)
•  ZeroMQ to send/recv messages
•  Encrypted transport (+custom protocol)
•  Minions wait for jobs from a remote
Master
•  Minions return job results back to Master
Architecture
Installation
# cat /etc/apt/sources.list.d/saltstack.conf:

deb http://debian.saltstack.com/debian jessie-saltstack main
# wget -q -O- "http://debian.saltstack.com/debian-salt-team-
joehealy.gpg.key" | apt-key add –
# apt-get update
Saltmaster
master# apt-get install salt-master
.
.
.
.
.
master# salt-key –L
Unaccepted Keys:
minion8
master# salt-key –A
Minion
minion8# apt-get install salt-minion
minion8# cat /etc/salt/minion
master: saltmaster
minion8# systemctl restart 
> salt-minion
Saltmaster
saltmaster:/etc/salt# tree
.
├── master
├── pillars
│   ├── defaults
│   │   └── init.sls
│   ├── top.sls
│   └── users
│   ├── init.sls
│   └── gary.sls
│   └── oliver.sls
└── states
├── defaults
│   ├── init.sls
│   ├── linux-debian.sls
│   ├── linux-centos.sls
│   └── sshd_config
├── top.sls
└── users
└── init.sls
	
  
Saltmaster
Config

# cat /etc/salt/master
file_roots:
base:
- /etc/salt/states
pillar_roots:
base:
- /etc/salt/pillars




Pillars
# cat /etc/salt/pillars/top.sls
base:
'*':
- defaults
- users
# cat /etc/salt/pillars/defaults/init.sls
disabled_services:
- rpcbind
- nfs-common
States
# cat /etc/salt/states/top.sls
base:
'*':
- defaults
- users
# cat /etc/salt/states/defaults/
init.sls
basic_pkgs:
pkg.installed:
- install_recommends: False
- pkgs:
- screen:
- lsof:
- ngrep:
openssh-server:
pkg:
- installed
service:
- name: ssh
- running
- enable: True
- watch:
- file: /etc/ssh/sshd_config
file.managed:
- name: /etc/ssh/sshd_config
- source: salt://defaults/sshd_config
- require:
- pkg: openssh-server
{% if grains['os_family'] == "RedHat" %}
disable_selinux:
file.managed:
- name: /etc/selinux/config
- contents: "SELINUX=disabled"
{% endif %}
Saltmaster
Pillars and Grains
master:~# salt ‘minion8’ grains.items
minion8:
----------
admins:
- manji
- mehiel
biosversion:
Bochs
<snip>
id:
minion8
init:
systemd
ip4_interfaces:
----------
eth0:
- 10.10.1.115
lo:
- 127.0.0.1
os:
Debian
os_family:
Debian
<snip>
master:~# salt ‘minion8’ pillar.data
minion8:
----------
disabled_services:
- rpcbind
- nfs-common
users:
----------
manji:
----------
email:
e.mouzeli@logicea.com
enabled:
True
fullname:
effie mouzeli
home:
/home/manji
pub_keys:
- ssh-rsa AAAAB3NzaC1y
<snip>
master:~# salt ‘minion8’ state.highstate
minion8:
-------
ID: basic_pkgs
Function: pkg.installed
Result: True
Comment: 12 targeted packages were
installed/updated. The following packages
were already installed: less, bzip2, wget,
ngrep
Started: 18:25:18.805716
Duration: 61584.232 ms
Changes:
----------
curl:
----------
new:
7.38.0-4+deb8u3
old:
<snip>
Summary for minion8
-------------
Succeeded: 21 (changed=1)
Failed: 0
-------------
Total states run: 21
Salt Minion
Salt Messages
Publish job:
salt/job/20160414115046162293/new {
"_stamp":
"2016-04-14T08:50:46.166360",
"arg": [
"defaults"
],
"fun": "state.sls",
"jid": "20160414115046162293",
"minions": [
   "minion8"
],
"tgt":   "minion8",
"tgt_type": "glob",
"user": "root"
}
Return Result:
salt/job/20160414115046162293/ret/minion8 {
"_stamp": "2016-04-14T08:50:48.239998",
"cmd": "_return",
"fun": "state.sls",
"fun_args": [
"defaults"
],
"id":  "minion8",
"jid": "20160414115046162293",
"out": "highstate",
"retcode": 0,
"return": {
"pkg_|-basic_pkgs_|-basic_pkgs_|-
installed": {
"__run_num__": 5,
"changes": {},
"comment": "All specified packages
are already installed",
"duration": 6.319,
"name": "lsof",
"result": true,
"start_time": "11:50:47.161264"
},
<snip>
"success": true
}
Highstate Flow
Advanced Topics
Reactors

Runners

Orchestration 

Beer Communication

Custom salt modules
Do not Forget
•  You need some python and some coding
skills
•  Use a quick solution when requirements are
unknown/not clear
•  Refactor when possible
•  Try to make reusable states, don’t repeat
yourself (DRY)
•  Try to not over engineer (resist the
temptation)
•  Always write documentation
•  Be patient, this is NOT easy
•  Keep your #YOLO moments to a minimum
Sources - Useful Links 
•  Images from The World’s End (2013) and edgarwright @ flickr.com
•  https://docs.saltstack.com/
•  https://github.com/saltstack-formulas
•  https://github.com/ministryofjustice/salt-shaker
•  https://github.com/harkx/saltstack-cheatsheet
•  https://www.digitalocean.com/community/tutorials/an-introduction-to-saltstack-
terminology-and-concepts
•  http://bencane.com/2013/09/03/getting-started-with-saltstack-by-example-automatically-
installing-nginx/
•  http://leonardinius.galeoconsulting.com/2014/08/devops-101-on-saltstack-example/
•  https://puppet.com/blog/how-to-choose-right-tools-processes-for-devops
•  How sysadmins devalue themselves - https://queue.acm.org/detail.cfm?id=2891413
•  and of course, https://en.wikipedia.org 
Thanks to: kargig, kyriakos and andrew for their comments and feedback
Questions?
Thank You !

More Related Content

What's hot

SaltStack Configuration Management
SaltStack Configuration ManagementSaltStack Configuration Management
SaltStack Configuration ManagementNathan Sickler
 
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...SaltStack
 
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...SaltStack
 
Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...SaltStack
 
Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Yazz Atlas
 
SaltConf 2014: Safety with powertools
SaltConf 2014: Safety with powertoolsSaltConf 2014: Safety with powertools
SaltConf 2014: Safety with powertoolsThomas Jackson
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법Open Source Consulting
 
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Refactoring Katello Installer modules - Ewoud Kohl van WijngaardenRefactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Refactoring Katello Installer modules - Ewoud Kohl van WijngaardenNETWAYS
 
Salt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaSalt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaDevOpsBangalore
 
Foreman - Advanced use cases - Timo Goebel
Foreman - Advanced use cases - Timo GoebelForeman - Advanced use cases - Timo Goebel
Foreman - Advanced use cases - Timo GoebelNETWAYS
 
Salt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration ManagementSalt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration ManagementUmberto Nicoletti
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetMichael Lessard
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & LuaKit Chan
 
Continuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and SaltContinuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and SaltAnirban Saha
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...addame
 
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...OpenStack Korea Community
 
OpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooOpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooinovex GmbH
 
Terraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-TemplateTerraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-TemplateZane Williamson
 

What's hot (20)

SaltStack Configuration Management
SaltStack Configuration ManagementSaltStack Configuration Management
SaltStack Configuration Management
 
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
 
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
 
Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...Spot Trading - A case study in continuous delivery for mission critical finan...
Spot Trading - A case study in continuous delivery for mission critical finan...
 
Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02
 
SaltConf 2014: Safety with powertools
SaltConf 2014: Safety with powertoolsSaltConf 2014: Safety with powertools
SaltConf 2014: Safety with powertools
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Refactoring Katello Installer modules - Ewoud Kohl van WijngaardenRefactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
 
Salt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaSalt Stack - Subhankar Sengupta
Salt Stack - Subhankar Sengupta
 
Foreman - Advanced use cases - Timo Goebel
Foreman - Advanced use cases - Timo GoebelForeman - Advanced use cases - Timo Goebel
Foreman - Advanced use cases - Timo Goebel
 
Salt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration ManagementSalt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration Management
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & Lua
 
Continuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and SaltContinuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and Salt
 
Puppet fundamentals
Puppet fundamentalsPuppet fundamentals
Puppet fundamentals
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
 
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
 
OpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooOpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, too
 
Terraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-TemplateTerraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-Template
 

Viewers also liked

Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Joe Kuemerle
 
SaltStack - An open source software story
SaltStack - An open source software storySaltStack - An open source software story
SaltStack - An open source software storySaltStack
 
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, FasterSaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, FasterThomas Jackson
 
Saltconf 2016: Salt stack transport and concurrency
Saltconf 2016: Salt stack transport and concurrencySaltconf 2016: Salt stack transport and concurrency
Saltconf 2016: Salt stack transport and concurrencyThomas Jackson
 
Bitfusion Saltconf16 - Seamless Docker Orchestration with SaltStack
Bitfusion Saltconf16 - Seamless Docker Orchestration with SaltStackBitfusion Saltconf16 - Seamless Docker Orchestration with SaltStack
Bitfusion Saltconf16 - Seamless Docker Orchestration with SaltStackSubbu Rama
 
Utiliser salt pour tester son infrastructure sur open stack ou docker
Utiliser salt pour tester son infrastructure sur open stack ou dockerUtiliser salt pour tester son infrastructure sur open stack ou docker
Utiliser salt pour tester son infrastructure sur open stack ou dockerLogilab
 
Automations using Saltstack - SREcon16 Europe
Automations using Saltstack - SREcon16 EuropeAutomations using Saltstack - SREcon16 Europe
Automations using Saltstack - SREcon16 Europeeffie mouzeli
 
Initialiser des conteneurs Docker à partir de configurations Salt construites...
Initialiser des conteneurs Docker à partir de configurations Salt construites...Initialiser des conteneurs Docker à partir de configurations Salt construites...
Initialiser des conteneurs Docker à partir de configurations Salt construites...Logilab
 
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec Pascal Gagnon
 
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)SaltStack
 
Gestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de ShellshockGestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de ShellshockJohan Moreau
 
Automate your development environment with Jira and Saltstack
Automate your development environment with Jira and SaltstackAutomate your development environment with Jira and Saltstack
Automate your development environment with Jira and SaltstackNetworkedAssets
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsSaltStack
 
Integration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceIntegration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceSaltStack
 
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are SecureSecurity & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are SecurePuppet
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and CiscoCisco DevNet
 
Fall 2016 ats summit - Parent & Origin Selection
Fall 2016 ats summit  - Parent & Origin SelectionFall 2016 ats summit  - Parent & Origin Selection
Fall 2016 ats summit - Parent & Origin SelectionThomas Jackson
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesIvo Andreev
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...SlideShare
 

Viewers also liked (20)

Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010
 
SaltStack - An open source software story
SaltStack - An open source software storySaltStack - An open source software story
SaltStack - An open source software story
 
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, FasterSaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
SaltConf 2015: Salt stack at web scale: Better, Stronger, Faster
 
Saltconf 2016: Salt stack transport and concurrency
Saltconf 2016: Salt stack transport and concurrencySaltconf 2016: Salt stack transport and concurrency
Saltconf 2016: Salt stack transport and concurrency
 
Salt stack
Salt stackSalt stack
Salt stack
 
Bitfusion Saltconf16 - Seamless Docker Orchestration with SaltStack
Bitfusion Saltconf16 - Seamless Docker Orchestration with SaltStackBitfusion Saltconf16 - Seamless Docker Orchestration with SaltStack
Bitfusion Saltconf16 - Seamless Docker Orchestration with SaltStack
 
Utiliser salt pour tester son infrastructure sur open stack ou docker
Utiliser salt pour tester son infrastructure sur open stack ou dockerUtiliser salt pour tester son infrastructure sur open stack ou docker
Utiliser salt pour tester son infrastructure sur open stack ou docker
 
Automations using Saltstack - SREcon16 Europe
Automations using Saltstack - SREcon16 EuropeAutomations using Saltstack - SREcon16 Europe
Automations using Saltstack - SREcon16 Europe
 
Initialiser des conteneurs Docker à partir de configurations Salt construites...
Initialiser des conteneurs Docker à partir de configurations Salt construites...Initialiser des conteneurs Docker à partir de configurations Salt construites...
Initialiser des conteneurs Docker à partir de configurations Salt construites...
 
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
 
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
 
Gestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de ShellshockGestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de Shellshock
 
Automate your development environment with Jira and Saltstack
Automate your development environment with Jira and SaltstackAutomate your development environment with Jira and Saltstack
Automate your development environment with Jira and Saltstack
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
 
Integration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceIntegration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container service
 
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are SecureSecurity & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
Security & DevOps- Ways To Make Sure Your Apps & Infrastructure Are Secure
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
 
Fall 2016 ats summit - Parent & Origin Selection
Fall 2016 ats summit  - Parent & Origin SelectionFall 2016 ats summit  - Parent & Origin Selection
Fall 2016 ats summit - Parent & Origin Selection
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best Practices
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
 

Similar to Configuration Management with SaltStack

Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Puppet
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop AutomationRui Lapa
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)DECK36
 
Practice and challenges from building IaaS
Practice and challenges from building IaaSPractice and challenges from building IaaS
Practice and challenges from building IaaSShawn Zhu
 
Configuration Management with Saltstack
Configuration Management with SaltstackConfiguration Management with Saltstack
Configuration Management with Saltstackinovex GmbH
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Edwin Beekman
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018Xavier Mertens
 
Multitenancy: Kafka clusters for everyone at LINE
Multitenancy: Kafka clusters for everyone at LINEMultitenancy: Kafka clusters for everyone at LINE
Multitenancy: Kafka clusters for everyone at LINEkawamuray
 
Configuration Management and Salt
Configuration Management and SaltConfiguration Management and Salt
Configuration Management and Salt55020
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVROpenStack Korea Community
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Continuent
 
Saltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application DeploymentSaltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application Deploymentinovex GmbH
 
The post release technologies of Crysis 3 (Slides Only) - Stewart Needham
The post release technologies of Crysis 3 (Slides Only) - Stewart NeedhamThe post release technologies of Crysis 3 (Slides Only) - Stewart Needham
The post release technologies of Crysis 3 (Slides Only) - Stewart NeedhamStewart Needham
 
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15Remi Bergsma
 
Whitepaper MS SQL Server on Linux
Whitepaper MS SQL Server on LinuxWhitepaper MS SQL Server on Linux
Whitepaper MS SQL Server on LinuxRoger Eisentrager
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rulesFreddy Buenaño
 
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...Continuent
 
Spectre meltdown performance_tests - v0.3
Spectre meltdown performance_tests - v0.3Spectre meltdown performance_tests - v0.3
Spectre meltdown performance_tests - v0.3David Pasek
 
Islands: Puppet at Bulletproof Networks
Islands: Puppet at Bulletproof NetworksIslands: Puppet at Bulletproof Networks
Islands: Puppet at Bulletproof NetworksLindsay Holmwood
 

Similar to Configuration Management with SaltStack (20)

Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
 
Hacking the swisscom modem
Hacking the swisscom modemHacking the swisscom modem
Hacking the swisscom modem
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
Practice and challenges from building IaaS
Practice and challenges from building IaaSPractice and challenges from building IaaS
Practice and challenges from building IaaS
 
Configuration Management with Saltstack
Configuration Management with SaltstackConfiguration Management with Saltstack
Configuration Management with Saltstack
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018
 
Multitenancy: Kafka clusters for everyone at LINE
Multitenancy: Kafka clusters for everyone at LINEMultitenancy: Kafka clusters for everyone at LINE
Multitenancy: Kafka clusters for everyone at LINE
 
Configuration Management and Salt
Configuration Management and SaltConfiguration Management and Salt
Configuration Management and Salt
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
 
Saltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application DeploymentSaltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application Deployment
 
The post release technologies of Crysis 3 (Slides Only) - Stewart Needham
The post release technologies of Crysis 3 (Slides Only) - Stewart NeedhamThe post release technologies of Crysis 3 (Slides Only) - Stewart Needham
The post release technologies of Crysis 3 (Slides Only) - Stewart Needham
 
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
 
Whitepaper MS SQL Server on Linux
Whitepaper MS SQL Server on LinuxWhitepaper MS SQL Server on Linux
Whitepaper MS SQL Server on Linux
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
 
Spectre meltdown performance_tests - v0.3
Spectre meltdown performance_tests - v0.3Spectre meltdown performance_tests - v0.3
Spectre meltdown performance_tests - v0.3
 
Islands: Puppet at Bulletproof Networks
Islands: Puppet at Bulletproof NetworksIslands: Puppet at Bulletproof Networks
Islands: Puppet at Bulletproof Networks
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

Configuration Management with SaltStack

  • 1. RQ
  • 2. about me ☃ systems engineer @Logicea LLC ☃ I have broken development a few times ☃ I have broken production a few more ☃ I hate databases
  • 4. The Good Companions Configuration management (CM) is a field of management that focuses on establishing and maintaining consistency of a system. (Wikipedia) Design your infrastructure Systems integrity and consistency Provision and automate Create proper processes Cloud Management Version Control Automations and Remote Execution Monitoring, Alerting, Logging
  • 10. So, SaltStack? Saltstack delivers a dynamic infrastructure communication bus used for orchestration, remote execution, configuration management. + Python, YAML, Jinja2, ZeroMQ + Event driven + Master-agent, Masterless (ssh) + Multimaster for HA + Cloud/VM/Containers support + Orchestration + Reactors + Runners + Guaranteed execution order  
  • 11. So, SaltStack? Saltstack delivers a dynamic infrastructure communication bus used for orchestration, remote execution, configuration management. - Relatively young project - Changes rapidly - Its documentation is… challenging - Needs some Python background - Needs design background - If your saltmaster is compromised, LOL  
  • 12. Terminology Master and Minion The Master controls its Minions :p State Modules Code needed to enforce, set up or change the configuration of a target system Pillars Custom data essential for state execution (e.g. user accounts, lists of virtual hosts etc.) Grains Static minion information SLS Files (.sls) Text files containing list of states to execute or, simply pillar data
  • 13. Terminology Renderers Render SLS files and pass information to the state system Templates SaltMine Top Files Highstate
  • 14. Architecture •  Master-Minion Persistent TCP connection •  Two listening ports on Master (4505,4506) •  No listening ports on Minions (yey) •  ZeroMQ to send/recv messages •  Encrypted transport (+custom protocol) •  Minions wait for jobs from a remote Master •  Minions return job results back to Master
  • 16. Installation # cat /etc/apt/sources.list.d/saltstack.conf: deb http://debian.saltstack.com/debian jessie-saltstack main # wget -q -O- "http://debian.saltstack.com/debian-salt-team- joehealy.gpg.key" | apt-key add – # apt-get update Saltmaster master# apt-get install salt-master . . . . . master# salt-key –L Unaccepted Keys: minion8 master# salt-key –A Minion minion8# apt-get install salt-minion minion8# cat /etc/salt/minion master: saltmaster minion8# systemctl restart > salt-minion
  • 17. Saltmaster saltmaster:/etc/salt# tree . ├── master ├── pillars │   ├── defaults │   │   └── init.sls │   ├── top.sls │   └── users │   ├── init.sls │   └── gary.sls │   └── oliver.sls └── states ├── defaults │   ├── init.sls │   ├── linux-debian.sls │   ├── linux-centos.sls │   └── sshd_config ├── top.sls └── users └── init.sls  
  • 18. Saltmaster Config # cat /etc/salt/master file_roots: base: - /etc/salt/states pillar_roots: base: - /etc/salt/pillars Pillars # cat /etc/salt/pillars/top.sls base: '*': - defaults - users # cat /etc/salt/pillars/defaults/init.sls disabled_services: - rpcbind - nfs-common
  • 19. States # cat /etc/salt/states/top.sls base: '*': - defaults - users # cat /etc/salt/states/defaults/ init.sls basic_pkgs: pkg.installed: - install_recommends: False - pkgs: - screen: - lsof: - ngrep: openssh-server: pkg: - installed service: - name: ssh - running - enable: True - watch: - file: /etc/ssh/sshd_config file.managed: - name: /etc/ssh/sshd_config - source: salt://defaults/sshd_config - require: - pkg: openssh-server {% if grains['os_family'] == "RedHat" %} disable_selinux: file.managed: - name: /etc/selinux/config - contents: "SELINUX=disabled" {% endif %} Saltmaster
  • 20. Pillars and Grains master:~# salt ‘minion8’ grains.items minion8: ---------- admins: - manji - mehiel biosversion: Bochs <snip> id: minion8 init: systemd ip4_interfaces: ---------- eth0: - 10.10.1.115 lo: - 127.0.0.1 os: Debian os_family: Debian <snip> master:~# salt ‘minion8’ pillar.data minion8: ---------- disabled_services: - rpcbind - nfs-common users: ---------- manji: ---------- email: e.mouzeli@logicea.com enabled: True fullname: effie mouzeli home: /home/manji pub_keys: - ssh-rsa AAAAB3NzaC1y <snip>
  • 21. master:~# salt ‘minion8’ state.highstate minion8: ------- ID: basic_pkgs Function: pkg.installed Result: True Comment: 12 targeted packages were installed/updated. The following packages were already installed: less, bzip2, wget, ngrep Started: 18:25:18.805716 Duration: 61584.232 ms Changes: ---------- curl: ---------- new: 7.38.0-4+deb8u3 old: <snip> Summary for minion8 ------------- Succeeded: 21 (changed=1) Failed: 0 ------------- Total states run: 21 Salt Minion
  • 22. Salt Messages Publish job: salt/job/20160414115046162293/new { "_stamp": "2016-04-14T08:50:46.166360", "arg": [ "defaults" ], "fun": "state.sls", "jid": "20160414115046162293", "minions": [    "minion8" ], "tgt":   "minion8", "tgt_type": "glob", "user": "root" } Return Result: salt/job/20160414115046162293/ret/minion8 { "_stamp": "2016-04-14T08:50:48.239998", "cmd": "_return", "fun": "state.sls", "fun_args": [ "defaults" ], "id":  "minion8", "jid": "20160414115046162293", "out": "highstate", "retcode": 0, "return": { "pkg_|-basic_pkgs_|-basic_pkgs_|- installed": { "__run_num__": 5, "changes": {}, "comment": "All specified packages are already installed", "duration": 6.319, "name": "lsof", "result": true, "start_time": "11:50:47.161264" }, <snip> "success": true }
  • 24. Advanced Topics Reactors Runners Orchestration Beer Communication Custom salt modules
  • 25. Do not Forget •  You need some python and some coding skills •  Use a quick solution when requirements are unknown/not clear •  Refactor when possible •  Try to make reusable states, don’t repeat yourself (DRY) •  Try to not over engineer (resist the temptation) •  Always write documentation •  Be patient, this is NOT easy •  Keep your #YOLO moments to a minimum
  • 26. Sources - Useful Links •  Images from The World’s End (2013) and edgarwright @ flickr.com •  https://docs.saltstack.com/ •  https://github.com/saltstack-formulas •  https://github.com/ministryofjustice/salt-shaker •  https://github.com/harkx/saltstack-cheatsheet •  https://www.digitalocean.com/community/tutorials/an-introduction-to-saltstack- terminology-and-concepts •  http://bencane.com/2013/09/03/getting-started-with-saltstack-by-example-automatically- installing-nginx/ •  http://leonardinius.galeoconsulting.com/2014/08/devops-101-on-saltstack-example/ •  https://puppet.com/blog/how-to-choose-right-tools-processes-for-devops •  How sysadmins devalue themselves - https://queue.acm.org/detail.cfm?id=2891413 •  and of course, https://en.wikipedia.org Thanks to: kargig, kyriakos and andrew for their comments and feedback