SlideShare a Scribd company logo
1 of 26
Download to read offline
MEETUP
SALTPRIMERANINTRODUCTIONTOSALT
ERWINEMBSEN&RICHARDWOUDENBERG18MARCH2014
SSC ID 0x57F37A53
ERWINEMBSEN
SENIORCONSULTANT
XEBIABV,EEMBSEN@XEBIA.COM,+31610901698
SSC id: 0xB5D844E6
RichardWoudenberg
!
SeniorConsultant/InnovationArchitect/Troublemaker
Xebia/rwoudenberg@xebia.com
Immutable
Servers
INTRODUCTIONS
SALT
OVERVIEW
HIGHSPEEDREMOTEEXECUTIONENGINE
CONFIGURATIONMANAGEMENTSYSTEM
MASTERANDMINIONS
Master Minions
SALT
SYNDIC
Master
Minions
Master Master
Minions
SALT
CLOUD
RACKSPACE
AMAZONAWS
MICROSOFTAZURE
DIGITALOCEAN
GOGRID
GOOGLECOMPUTEENGINE
OPENSTACK
HPCLOUD
OTHER
COMPONENTS
SALTVIRT
SALTMINE
RUNNERS
PROXYMINION
WINDOWSSOFTWAREREPO
REACTOR
EXERCISESETUP
SETUPSALTMASTER
SETUPSALTMINION
SETUPMASTER-MINIONS / PART1
EXERCISE#1
1. vagrant up master	
2. vagrant ssh master	
3. (Master) sudo su -	
4. (Master) service salt-master start	
5. (Master) salt-key -L	
6. (Master) service salt-minion start	
7. (Master) salt-key -L	
8. (Master) salt-key -a master	
9. (Master) salt-key -L
# Start the master	
# SSH into the master VM	
# Change to the root user	
# Start the Salt master	
# List keys	
# Start the Salt minion	
# List keys	
# Sign the key	
# List keys
(Master)-Executeonthemaster / (Minion)-Executeontheminion
SETUPMASTER-MINIONS / PART2
EXERCISE#1
1. Open a new terminal windows	
2. vagrant up minion	
3. vagrant ssh minion	
4. (Minion) sudo su -	
5. (Minion) service salt-minion start	
6. (Master) salt-key -L	
7. (Master) salt-key -a minion	
8. (Master) salt-key -L
# SSH into the minion VM	
# Change to the root user	
# Start the Salt minion	
# List keys	
# Sign the key	
# List keys
(Master)-Executeonthemaster / (Minion)-Executeontheminion
COMMAND
STRUCTURE
salt * pkg.install vim
InvokeSalt SpecifyTarget CallFunction PassArguments
REMOTEEXECUTION
EXERCISE#2
1. vagrant ssh master	
2. sudo su -	
3. salt * test.ping	
4. salt master sys.doc	
5. salt master sys.doc file	
6. salt * disk.usage	
7. salt * status.loadavg	
8. salt * pkg.version wget	
9. salt minion pkg.install lynx	
# SSH into the master VM	
# Change to the root user	
# Ping all minions	
# Output sys.doc	
# Output sys.doc for file	
# Return usage information	
# Return load averages	
# Get version of wget	
# Install lynx on minion
PROVIDESSAMESETOF COMMANDSAND
FUNCTIONALITYASSALT
NEEDSROSTERFILETOFUNCTION
SALT-SSH
SALTSSH
EXERCISE#3
1. vagrant ssh master	
2. sudo su -	
3. cat /etc/salt/roster	
4. salt-ssh minion-ssh pkg.version wget	
5. salt-ssh * test.ping
INFORMATIONOFTHEUNDERLYINGSYSTEM
AVAILABLETHROUGHTHEGRAINSINTERFACE
2PLACESONTHEMINIONTOSPECIFYTHEM
SALT
GRAINS
SALTGRAINS
EXERCISE#4
1. vagrant ssh master	
2. sudo su -	
3. salt minion grains.items	
4. salt minion grains.item cpuarch	
5. salt minion grains.setval meetup salt

6. (Minion) echo ‘salt: primer’ > /etc/salt/grains	
7. salt minion saltutil.sync_grains	
8. salt minion grains.item salt
RUNCOMMANDOREXECUTESTATEBYMATCHING:
hostnames,systeminformation,definedgroups
TARGETING
SALTTARGETING
EXERCISE#5
1. vagrant ssh master	
2. sudo su -	
3. salt minion grains.items	
4. salt -G ‘cpuarch:x86_64’ grains.item num_cpus
COREOFTHESALTSYSTEMISTHESALTSTATEFILE
REPRESENTSTHEDESIREDSTATEOFASYSTEM
STATES
apache:	
pkg:	
- installed	
service:	
- running
# Install package	
# apache http server	
# start the service	
# if it is stopped	
# Executed in the	
# order defined
STATES
TREE-LIKESTRUCTURES(YAML)OFDATADEFINED
ONTHEMASTERANDPASSEDTHROUGHTOMINIONS
PILLARS
BUILDATOMCATSTATE-PART#1
EXERCISE#6
1. Open file /srv/salt/states/tomcat/init.sls	
2. Alternative is salt/states/tomcat/init.sls	
3. Create runtime user tomcat in group tomcat	
4. Apply state: salt minion state.sls tomcat	
5. Validate that user and group are created
http://docs.saltstack.com/ref/states/all
BUILDATOMCATSTATE-PART#2
EXERCISE#6
Extend the tomcat state file with:



install tomcat6 package

configure tomcat

start tomcat
ErwinEmbsen
eembsen@xebia.com
RichardWoudenberg
rwoudenberg@xebia.com
THANK
YOU

More Related Content

What's hot

How we found a firewall vendor bug using Teleport as a bastion jump host
How we found a firewall vendor bug using Teleport as a bastion jump hostHow we found a firewall vendor bug using Teleport as a bastion jump host
How we found a firewall vendor bug using Teleport as a bastion jump host
Faelix Ltd
 
Software Development kits
Software Development kitsSoftware Development kits
Software Development kits
Everett Toews
 
Linux security cookbook
Linux security cookbookLinux security cookbook
Linux security cookbook
fernandao777
 

What's hot (20)

Running Ansible within Salt: Get the best from both worlds
Running Ansible within Salt: Get the best from both worldsRunning Ansible within Salt: Get the best from both worlds
Running Ansible within Salt: Get the best from both worlds
 
Pxosys Webinar Amplify your Security
Pxosys Webinar Amplify your SecurityPxosys Webinar Amplify your Security
Pxosys Webinar Amplify your Security
 
Install dev stack
Install dev stackInstall dev stack
Install dev stack
 
DevOps Sydney: Chef Automate
DevOps Sydney: Chef AutomateDevOps Sydney: Chef Automate
DevOps Sydney: Chef Automate
 
Setting up Cisco WSA Proxy in Transparent and Explicit Mode
Setting up Cisco WSA Proxy in Transparent and Explicit ModeSetting up Cisco WSA Proxy in Transparent and Explicit Mode
Setting up Cisco WSA Proxy in Transparent and Explicit Mode
 
How we found a firewall vendor bug using Teleport as a bastion jump host
How we found a firewall vendor bug using Teleport as a bastion jump hostHow we found a firewall vendor bug using Teleport as a bastion jump host
How we found a firewall vendor bug using Teleport as a bastion jump host
 
Software Development kits
Software Development kitsSoftware Development kits
Software Development kits
 
All about open stack
All about open stackAll about open stack
All about open stack
 
Linux security cookbook
Linux security cookbookLinux security cookbook
Linux security cookbook
 
Improve App Performance & Reliability with NGINX Amplify
Improve App Performance & Reliability with NGINX AmplifyImprove App Performance & Reliability with NGINX Amplify
Improve App Performance & Reliability with NGINX Amplify
 
Rdo mitaka
Rdo mitakaRdo mitaka
Rdo mitaka
 
Devstack
DevstackDevstack
Devstack
 
OVHcloud and Microsoft for the public sector
OVHcloud and Microsoft for the public sectorOVHcloud and Microsoft for the public sector
OVHcloud and Microsoft for the public sector
 
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
 
Nagios En
Nagios EnNagios En
Nagios En
 
Rundeck Open Source Workflow Automation
Rundeck Open Source Workflow AutomationRundeck Open Source Workflow Automation
Rundeck Open Source Workflow Automation
 
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web ApplicationNull bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web Application
 
Site to Site VPN CISCO ASA
Site to Site VPN CISCO ASASite to Site VPN CISCO ASA
Site to Site VPN CISCO ASA
 
Apereo CAS 2020 - ESUP Days #31
Apereo CAS 2020 - ESUP Days #31Apereo CAS 2020 - ESUP Days #31
Apereo CAS 2020 - ESUP Days #31
 
RuSIEM IT assets
RuSIEM IT assetsRuSIEM IT assets
RuSIEM IT assets
 

Similar to Meetup - An introduction to Salt

SnortReport Presentation
SnortReport PresentationSnortReport Presentation
SnortReport Presentation
webhostingguy
 

Similar to Meetup - An introduction to Salt (20)

Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
 
Capistrano与jenkins(hudson)在java web项目中的实践
Capistrano与jenkins(hudson)在java web项目中的实践Capistrano与jenkins(hudson)在java web项目中的实践
Capistrano与jenkins(hudson)在java web项目中的实践
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource MonitoringAn Express Guide ~ SNMP for Secure Rremote Resource Monitoring
An Express Guide ~ SNMP for Secure Rremote Resource Monitoring
 
Metasploitable
MetasploitableMetasploitable
Metasploitable
 
Swing when you're winning - an introduction to Ruby and Sinatra
Swing when you're winning - an introduction to Ruby and SinatraSwing when you're winning - an introduction to Ruby and Sinatra
Swing when you're winning - an introduction to Ruby and Sinatra
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep dive
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOps
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps Toolchains
 
PagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure TestingPagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure Testing
 
Configuration Management with Saltstack
Configuration Management with SaltstackConfiguration Management with Saltstack
Configuration Management with Saltstack
 
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
 
SnortReport Presentation
SnortReport PresentationSnortReport Presentation
SnortReport Presentation
 
Introduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmmIntroduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmm
 
Putting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps ToolchainPutting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps Toolchain
 
AusNOG 2018 - The Robots are Coming!
AusNOG 2018 - The Robots are Coming!AusNOG 2018 - The Robots are Coming!
AusNOG 2018 - The Robots are Coming!
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Capistrano and SystemD
Capistrano and SystemDCapistrano and SystemD
Capistrano and SystemD
 
Capistrano && SystemD
Capistrano && SystemDCapistrano && SystemD
Capistrano && SystemD
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Recently uploaded (20)

Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Navigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi DaparthiNavigating the Large Language Model choices_Ravi Daparthi
Navigating the Large Language Model choices_Ravi Daparthi
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 

Meetup - An introduction to Salt