SlideShare a Scribd company logo
Introduction to
Systems Management
with SaltStack
Craig Sebenik
Infrastructure Engineer@Matterport
3 Oct 2015
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
What Is SaltStack?
• System and Configuration Management
• Encrypted communication channel
• Remote execution framework
• 100% open: one of the most active on github
• Scales to tens of thousands of nodes
• Built (and extended) with python
What Am I Covering?
• Simple/quick overview of salt
• Very simple examples
• Only a basic single master topology
• Only the core functionality
• Glossing over details: ask questions!
Who Am I?
• Degrees in Chemistry, Mathematics, Food
• Computational Chemist (lifetime ago)
• Abbott Labs, Eastman Kodak, Parke-Davis
• Sysadmin/SRE
• NetApp, LinkedIn, Matterport
One More Thing About Me…
Quick History Of Salt
• Initial release in March 2011
• States added a few months later
• Pillars added March 2012
• Salt SSH added Sept 2013
• Salt Cloud merged in Jan 2014
• Custom transport (RAET) added in Jul 2014
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
Minions and Master
• Master: central command and control
• Minion: paired with master
• Encrypted communication
• Communication over ZeroMQ using
MessagePack
• Target minions based on their attributes
Quick Example
What Does This Mean?
• Central management of many nodes
• Ensuring hosts match a “recipe”
• Easy to add more hosts that match a template
PUB-SUB
master minion1
minion2
4505
Returning Data
master minion1
minion2
4506
Targeting Minions
• List: “minion1,minion2
• Globs: “minion*”
• Regular expression: “minion([2|3])”
• Grains: “OS: Ubuntu”
• Combinations of the above
Set up Trust With salt-key
• Salt uses standard public key encryption
• Key exchange
• Master needs to verify identity of minions
• User needs to “accept” the minion’s key
• Minion’s public key stored on master
• Master’s public key stored on minion
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
Execution Modules
• Salt comes with over 100 modules
• Over 1000 functions
• Examples:
• pkg.install, pkg.remove
• file.copy, file.find, file.chown
• user.add, user.info
Minor Vocabulary
Clarification
• Modules contains functions
• Modules correspond to python files
• Functions correspond to methods
• There are some exceptions, but beyond today’s
scope
Add User To All Hosts
What’s Happening
• Master looks at target (‘*’) and determines hosts
• Puts message out on event bus
• Over ZeroMQ using messagepack
• Minion sees message and executes
• All execution is on minion, not master
• Minion returns data back to master
Master Maintains Job Data
• Job cache on master
• Contains history of jobs run and data returned
• Tools to query the job cache
• Default is to cache 24 hours of history
• Performance penalties when storing longer
Commands Sent In Parallel
• Command sent via event bus
• Minions see and execute
• Jobs are done asynchronously
Can Run Locally
• Command to run locally: salt-call
• No central coordination
• Data *IS* still returned to master
• Can bypass with “—local” flag
Documentation
• Function called “sys.doc”
• Uses python docstrings
• Important when writing your own custom
modules/functions
salt-call Example
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
States
• Recipe for how a host should be configured
• Default file format is YAML (with jinja)
• Write state files on the master
• Master will sync to minion automatically
• States use the remote execution framework
• But, they are not the same
State Example
Running State Example
Running highstate
• Running individual states can be tedious
• Collect all states for a host (or “template”) in a
single file: top.ls
• Called: top file
• Target just like running the “salt” command
Example Top File
Running highstate
Targeting Example
Running Targeting Example
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
Data: Minion and Master
• Grains: minion side data
• Example: host operating system
• Pillars: master side data
• Example: database passwords
Grains: Minion-Side Data
• Data gathered on the minion
• Master has a cache of minion grains
• Salt comes with a number of grains built in
• OS name (eg CentOS)
• number of CPUs
• kernel version
Viewing Grains
Targeting With Grains
Adding Grains
• Minion config
• /etc/salt/grains
• Via command
• sudo salt minion grains.setval foo bar
• Via python (will discuss later)
Pillars: Master-Side Data
• Data sent to a specific minion (from master)
• Typically used for sensitive data
• E.g. passwords
• Uses a “top file” (just like “states”)
Pillar Example
Running Pillar Example
Targeted Pillar Data
Running Targeted Pillars
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
Extending Salt
• Jinja
• Custom modules/functions (python)
• salt python API (LocalClient)
• Customizations are synced via salt command
• Easy to automate
Templates Using jinja
• Jinja is a widely used python templating
language
• Inspired by Django’s templates
• Default template for flask applications
• Gives basic control commands to flat files
Jinja Example
Running The ‘vim state’
Python Module/Function
Custom Modules are NOT
Automatically Synced
Running hello.world
Docstrings Are Important
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
Demo Minions
• minion1: development database server
• minion2: development application server
• minion3: production database server
• minion4: production application server
• Introduction
• Architecture Overview
• Execution Modules
• States
• Data - Minion and Master
• Extending Salt
• Demo
• Summary
Summary
• Master and minions encrypted communications
• Grains: minion-side data, Pillars: master-side data
• Execution functions run on the minions
• States are formulas/recipes to define a host
• Collect multiple states with highstate
• Lots of ways to extend salt functionality
Other Features
• Runners: master side orchestration
• Orchestrate Runner: master coordination of states
• Salt cloud: manage cloud virtual machines
• Salt ssh: like normal salt without minion process
• More advanced topologies
• multi-master
• master-less minions (with salt-call)
• GitFS
References
• https://docs.saltstack.com/en/latest/
• https://docs.saltstack.com/en/getstarted/
• https://github.com/saltstack/salt
Questions?
@craigs55
irc:chitown
https://www.linkedin.com/in/craigsebenik
Yes, we’re hiring!
http://matterport.com/positions/

More Related Content

What's hot (20)

PDF
SaltConf14 - Craig Sebenik, LinkedIn - SaltStack at Web Scale
SaltStack
 
PPT
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
SaltStack
 
PDF
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
SaltStack
 
PDF
Pulsarctl & Pulsar Manager
StreamNative
 
PDF
Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
Puppet
 
PDF
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
Puppet
 
PDF
Inside the Chef Push Jobs Service - ChefConf 2015
Chef
 
PPTX
Containerizing Network Services - Alon Harel - OpenStack Day Israel 2016
Cloud Native Day Tel Aviv
 
PPTX
Writing Custom Saltstack Execution Modules
Julian Pacheco
 
PPTX
What's new in chef 12
Charles Johnson
 
PPTX
Creating SaltStack State data with Pyobjects
Evan Borgstrom
 
PDF
Node.js 101 with Rami Sayar
FITC
 
PDF
PyCon India 2012: Celery Talk
Piyush Kumar
 
PDF
ZooKeeper - wait free protocol for coordinating processes
Julia Proskurnia
 
PPTX
Ansible MySQL MHA
Alkin Tezuysal
 
PDF
Jesse Olson - Nagios Log Server Architecture Overview
Nagios
 
PPTX
Infrastructure modeling with chef
Charles Johnson
 
ODP
Nagios Conference 2012 - Mike Weber - Failover
Nagios
 
PDF
Push jobs: an orchestration building block for private Chef
Chef Software, Inc.
 
PPTX
Saltconf 2016: Salt stack transport and concurrency
Thomas Jackson
 
SaltConf14 - Craig Sebenik, LinkedIn - SaltStack at Web Scale
SaltStack
 
SaltConf14 - Oz Akan, Rackspace - Deploying OpenStack Marconi with SaltStack
SaltStack
 
Salt Air 19 - Intro to SaltStack RAET (reliable asyncronous event transport)
SaltStack
 
Pulsarctl & Pulsar Manager
StreamNative
 
Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
Puppet
 
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
Puppet
 
Inside the Chef Push Jobs Service - ChefConf 2015
Chef
 
Containerizing Network Services - Alon Harel - OpenStack Day Israel 2016
Cloud Native Day Tel Aviv
 
Writing Custom Saltstack Execution Modules
Julian Pacheco
 
What's new in chef 12
Charles Johnson
 
Creating SaltStack State data with Pyobjects
Evan Borgstrom
 
Node.js 101 with Rami Sayar
FITC
 
PyCon India 2012: Celery Talk
Piyush Kumar
 
ZooKeeper - wait free protocol for coordinating processes
Julia Proskurnia
 
Ansible MySQL MHA
Alkin Tezuysal
 
Jesse Olson - Nagios Log Server Architecture Overview
Nagios
 
Infrastructure modeling with chef
Charles Johnson
 
Nagios Conference 2012 - Mike Weber - Failover
Nagios
 
Push jobs: an orchestration building block for private Chef
Chef Software, Inc.
 
Saltconf 2016: Salt stack transport and concurrency
Thomas Jackson
 

Similar to Introduction to Systems Management with SaltStack (20)

PPTX
SaltStack Configuration Management
Nathan Sickler
 
PDF
Salt Stack - Subhankar Sengupta
DevOpsBangalore
 
PDF
Sweetening Systems Management with Salt
mchesnut
 
PDF
A user's perspective on SaltStack and other configuration management tools
SaltStack
 
PDF
Event driven architecture with SaltStack
BharatNailwal2
 
ODP
Configuration Management and Salt
55020
 
PDF
The SaltStack Pub Crawl - Fosscomm 2016
effie mouzeli
 
PDF
Why SaltStack ?
SUSE
 
PDF
OpenWest 2014-05-10 Where's the Waldo, SaltStack Proxy Minions
croldham
 
PDF
[TechTalks] Learning Configuration Management with SaltStack (Advanced Concepts)
Blazeclan Technologies Private Limited
 
PPTX
SaltStack Advanced Concepts
Vishal Biyani
 
PDF
Salt at school
Flavio Castelli
 
PDF
Configuration management and orchestration with Salt
Anirban Saha
 
PDF
Intelligent infrastructure with SaltStack
Love Nyberg
 
PDF
Getting started with salt stack
Suresh Paulraj
 
PDF
Getting started with salt stack
Suresh Paulraj
 
PDF
Orchestrate Event-Driven Infrastructure with SaltStack
Love Nyberg
 
PDF
Automated Application Management with SaltStack
inovex GmbH
 
PPTX
Configuration management
Luca De Vitis
 
PDF
Salt stack
Jose Galarza
 
SaltStack Configuration Management
Nathan Sickler
 
Salt Stack - Subhankar Sengupta
DevOpsBangalore
 
Sweetening Systems Management with Salt
mchesnut
 
A user's perspective on SaltStack and other configuration management tools
SaltStack
 
Event driven architecture with SaltStack
BharatNailwal2
 
Configuration Management and Salt
55020
 
The SaltStack Pub Crawl - Fosscomm 2016
effie mouzeli
 
Why SaltStack ?
SUSE
 
OpenWest 2014-05-10 Where's the Waldo, SaltStack Proxy Minions
croldham
 
[TechTalks] Learning Configuration Management with SaltStack (Advanced Concepts)
Blazeclan Technologies Private Limited
 
SaltStack Advanced Concepts
Vishal Biyani
 
Salt at school
Flavio Castelli
 
Configuration management and orchestration with Salt
Anirban Saha
 
Intelligent infrastructure with SaltStack
Love Nyberg
 
Getting started with salt stack
Suresh Paulraj
 
Getting started with salt stack
Suresh Paulraj
 
Orchestrate Event-Driven Infrastructure with SaltStack
Love Nyberg
 
Automated Application Management with SaltStack
inovex GmbH
 
Configuration management
Luca De Vitis
 
Salt stack
Jose Galarza
 
Ad

Recently uploaded (20)

PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
PDF
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Top Managed Service Providers in Los Angeles
Captain IT
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Ad

Introduction to Systems Management with SaltStack