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

Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy
 

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

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
Logilab
 
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
Puppet
 
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 The SaltStack Pub Crawl - Fosscomm 2016

Whitepaper MS SQL Server on Linux
Whitepaper MS SQL Server on LinuxWhitepaper MS SQL Server on Linux
Whitepaper MS SQL Server on Linux
Roger 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 rules
Freddy Buenaño
 

Similar to The SaltStack Pub Crawl - Fosscomm 2016 (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

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 

The SaltStack Pub Crawl - Fosscomm 2016

  • 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