SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
Saltstack For DevOps
Extremely fast and simple IT automation and
configuration managment
Aymen El Amri - @eon01
This book is for sale at http://leanpub.com/saltstackfordevops
This version was published on 2015-02-21
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.
©2015 Aymen El Amri
Tweet This Book!
Please help Aymen El Amri - @eon01 by spreading the word about this book on Twitter!
The suggested tweet for this book is:
I just bought SaltStack For DevOps book. Check it out : https://leanpub.com/saltstackfordevops
The suggested hashtag for this book is ##Salt4DevOps.
Find out what other people are saying about the book by clicking on this link to search for this
hashtag on Twitter:
https://twitter.com/search?q=##Salt4DevOps
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Every Book Has A Story, This Story Has A Book . . . . . . . . . . . . . . . . . . . . . . . 1
To whom is this book addressed ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Conventions used in this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
How to properly enjoy this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
How to contribute to this book ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
About The Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 0 - Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Configuration Management And Data Center Automation . . . . . . . . . . . . . . . . . . 5
DevOps Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Chapter I - A Taste Of Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
A brief summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Expanding Salt Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Preface
1 o ^__^
2 o (oo)_______
3 (__) )/
4 ||----w |
5 || ||
Every Book Has A Story, This Story Has A Book
I wanted to quickly resign from that job, my suggestions about setting up a continuous delivery/de-
ployment have not been considered! I’m lazy and there are hundreds of configuration files and
thousands of variables to copy from an excel file and to reconfigure in some platforms, a huge
number of poorly-configured servers; hundreds of servers to manage. . I wanted to work on the
automation of procedures, I was aware that this is the solution, that was not the priority of the
customer.
It was a position within a team of ten people working on the integration of a number of heavy
applications. At the beginning, I was obliged to follow my colleagues and my boss in the methods
of work they have adopted which have one goal : satisfy the unceasing demands of the customer.
No, but .. wait, this is not good at all!
I spent almost two weeks searching and working on some solutions before I convinced my boss to
give me the time to set up what I am working on, so that it can ease the heavy load, accelerate
daily procedures and reduce human errors. Among other procedures I have set up, I found Saltstack
the perfect solution that meets the expectations of integration process, or rather, the continious
integration, deployments and tests.
I hesitated between several alternatives: puppet, CFEngine, Ansible .. etc. The choice was made based
on several criteria and I have never regretted.
In the beginning I wanted to resign from my job, just few days after of the discovery of Salt, I was
in love with my job, with what I was doing and with Saltstack.
Well, I tried SaltStack first time when I saw my team taking more than 3 days to configure hosted
platforms at each deployment. After using SaltStack, the same procedure was taking less than 1/2
hour.
Through this book, it’s your turn to discover Saltstack, I am your guide.
I wish you a pleasant reading.
Preface 2
To whom is this book addressed ?
To developers, system administrators and anyone faced to work in one of these environments in
collaboration with the other or simply in an environment that requires knowledge in development
and system administration.
The most common idea, is that developers think they are here to serve the machines by writing
code and applications, systems administrators think that machines should works for them, simply
by making them happy.
Moreover, within the same company there is generally some tension between the two teams:
System administrators accuse developers to write code that consumes memory, does not meet system
security standards or not adapted to the configuration of available machines.
Developers accuse system administrators to be lazy, to lack innovation and to be seriously uncool!
No more mutual accusations, now with the evolution of software development, infrastructure and
methodologies adopted (such as Agile / Scrum), the concept of Devops was born.
The DevOps is a concept and a job that seeks closer collaboration and a combination of different
roles involved in software development such as the role of developer, responsible for operations and
responsible of quality assurance. The software must be produced at a frenetic pace while at the same
time the developing in cascade seems to have reached its limits.
If you are a fan of this concept, if you are a system administrator working on software operations,
if you are a start up developer seeking to join the new movement this book is addressed to you.
Conventions used in this book
Basically, this is a technical book where you will find commands (Saltstack commands) and code
(Python, YAML, Jinja2 ..etc). Commands and code are written in different fonts.
Example :
1 python -c 'import urllib; print urllib.urlopen("https://bootstrap.saltstack.com"
2 ).read()' |  sudo sh -s -- git develop
• Some technical words are quoted Some others are using bold or italic font. The goal is to get
your attention when you’re reading and help you identify keywords.
• You will find two icons, I have tried to be as simple as possible so I have chosen not to use too
many symbols, you’ll only find:
To highlight useful and important information.
Preface 3
To highlight a warning or to prevent.
How to properly enjoy this book
This book contains technical explanations and shows in each case an example of a command or a
configuration to follow. The only explanation gives you a general idea and the code that follows
gives you convenience and help you to practice what you’re reading. Preferably, you should always
look both parts for a maximum of understanding. Like any new tool or programming language
you learned, it is normal to find difficulties and confusions in the beginning, perhaps even after. If
you’re not used to learn new technologies, you can even have a modest understanding while being
in an advanced stage of this book. Do not worry, everyone has passed at least once by this kind of
situations. At the beginning try to make a diagonal reading while focusing on the basic concepts,
then try the first practical manipulation on your server or just using your laptop and occasionally
come back to this book for further reading on a about a specefic subject or concept. This book is
not an encyclopedia, but sets out the most important parts to learn and even to master Saltstack, if
you find words or concepts that you are not comfortable with, just try take your time and do your
research. Learning can be serial so understanding a topic require the understandding of other topics.
Through this book, you will learn how to install configure and use Saltstack. Just before finishing
the book, you will go through a chapter where a good example of a practical use case is explained.
Through this chapter, try to showcase your acquired undrestanding, and no it will not hurt to go
back to previous chapters if you are unsure or in doubt. Finally, try to be pragmatic and have an
open mind if you encounter a problem. The resolution begins by asking the right questions.
How to contribute to this book ?
This work is in progress. I am an adopter of the lean philosophy, so the book will be continuously
improved in function of many criteria, but the most important one is your feedback. If you have any
suggestions please do not hesitate to contact me, you can find me on Twitter¹ or you can use my
blog contact page².
This book is not perfect, so you can find typo, punctuation errors or missing words, like in every book
but every line of the used code was tested before (I used mainly Redhat and Debian distributions).
About The Author
Aymen El Amri³ is a Linux/web engineer, he worked on development and system administration for
companies and co-founded some projects in connection with the community of free and open source
¹https://twitter.com/eon01
²http://eon01.com/blog/contact-me/
³http://eon01.com
Preface 4
software. He is more and more interested in the DevOps philosophy, the lean programming and the
tools/methodologies that comes with since his last experiences in this domain were successful.
Chapter 0 - Introduction
1 o ^__^
2 o (@@)_______
3 (__) )/
4 ||----w |
5 || ||
Configuration Management And Data Center
Automation
Configuration management and data center automation are mechanisms to manage the technical
description of a system, its components and all of the changes on the configuration during the life
cycle of a system or during its different processes.
Source code deployments on multiple environments requires a configuration management and
provisioning tool.
From the development, integration, test, deployment, to the production environment, configuration
management becomes a process of normalization of the configuration of the application according
to the state of the infrastructure and other requirements. The same process of normalization should
be ensured when changing the environment, the infrastructure or when the configuration itself
changes.
With the adoption of agile development methods, the process of development, test and deployment
of a software component has accelerated and therefore the methods of management have become
faster, more automated and more adapted to changes.
DevOps Evolution
Even if many specialists consider provisioning, change management and automation as a business
issue, not an IT issue but to make this happen some special technical skills are required. That’s
why new positions in the IT industry have emerged: DevOps. The illustration below (taken from
Wikipedia) shows the essence of the DevOps philosophy.
Chapter 0 - Introduction 6
DevOps as the intersection of development (software engineering), technology operations and quality assurance
(QA)
Automation is important to the success of critical IT processes that are part of the life cycle
of a product, including provision, change management, release management, patch management,
compliance and security. Therefore having the technical skills and the know-how are very important
to any “lazy but pragmatic sysadmin”. This book will help you to learn using one of the most
important IT automation configuration management and infrastructure automation/orchestration
tool: SaltStack.
DevOps Tool
Currently, several FOSS and proprietary automation and configuration management tools exists.
Choosing one of these tools could based on several criteria.
Choice Criteria
Performance : Between the memory consumption, the speed of execution and the adaptation to
increasingly complexes architectures, several performance criteria could help you decide on the
performance of a such tool.
License : You may choose between FOSS and proprietary software. Most of the existing softwares
are Open Source. It remains to be seen what FOSS license you should choose: GPL, BSD, Apache,
MIT..etc
Programming Language : A such tool is coded using a programming language, but it does not mean
that the a DevOps will manage and automate ops and servers using the same language. For example,
Chapter 0 - Introduction 7
SaltStack uses Jinja and YAML ..etc Most of those tools are written in Python, Ruby or Java, but one
can also find perl, C and C ++.
Authentication Methods : A configuration management or a data center automation tool is based
on a model, roughly consisting of clients and a server. The authentication between a client and a
server can be automatic, encrypted, secure, fast .. or not.
Agents : Some tools use agents that must be installed on the target servers (clients), some tools work
without agents and others offer both choices.
Scalability : A tool that grows and evolves with the enterprise must provide technical means and
capabilities to ensure scalability at several features and extended functional scopes.
Portability : Most if not all configuration management tools are compatible with *nix systems. Some
servers runs on BSD, AIX, HP-UX, Mac OS X, Solaris, Windows and other OSs. In this case you must
see this point: the compatibility.
Thanks to Wikipedia⁴ and its contributor for the next comparison concerning the portability of the
following tools.
AIX BSD HP-
UX
Linux Mac
OS X
Solaris WindowsOthers
Ansible Yes Yes Yes Yes Yes Yes Yes Yes
Bcfg Partial Yes No Yes Partial Yes No No
CFEngineYes Yes Yes Yes Yes Yes Yes Yes
cdist Yes Yes Yes No
Chef Yes Yes Yes Yes Yes Yes Yes Yes
ISconf Yes Yes Yes Yes Yes Yes No No
Juju Yes
LCFG No No No Partial Partial Partial No No
OCS
Inven-
tory
NG
Yes Yes Yes Yes Yes Yes Yes No
Opsi No No No Yes No No Yes No
PIKT Yes Yes Yes Yes Yes Yes No Yes
Puppet Yes Yes Yes Yes Partial Yes Yes Yes
Quattor No No No Yes Partial Yes No No
Radmind Yes Yes No Yes Yes Yes Yes No
Rex Yes Yes Yes Yes Yes No
Rudder Yes Partial No Yes Partial Partial Yes Yes
Rundeck Yes Yes Yes Yes Yes Yes Yes No
SmartFrogNo No Yes Yes Yes Yes Yes No
Salt Yes Yes Partial Yes Yes Yes Yes Partial
SpacewalkNo No No Yes No Yes No No
STAF Yes Yes Yes Yes Yes Yes Yes Yes
⁴http://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software
Chapter 0 - Introduction 8
AIX BSD HP-
UX
Linux Mac
OS X
Solaris WindowsOthers
Synctool Yes Yes Yes Yes Yes Yes Yes Yes
Vagrant Yes Yes Yes
Documentation, Support and Latest Stable Release: Keep in mind that the quantity and the quality
of official documentations, forums, groups, and paid support differs from a tool to another. A good
thing to do is to see the date of the latest stable release, some tools are just no more updated which
can cause security risks.
Popular tools
Among the best and the most popular tools we find : Ansible, CFEngine, Puppet, Saltstack.
Among the best and the most popular tools we find : Ansible, CFEngine, Puppet, Saltstack.
Ansible : Combines multi-node deployment and ad-hoc task execution. Manages the nodes with
SSH and requires Python (2.4 or later). Uses JSON and YAML modules and state as descriptions. It
is built on python but its modules can be written in any language. Ansible⁵ is one of the most used
softwares. It is used by Spotify, Twitter, NASA and evernote.
Puppet : Puppet⁶ is based on a custom declarative language to describe the system configuration,
⁵http://www.ansible.com/home
⁶http://puppetlabs.com/
Chapter 0 - Introduction 9
uses the distributed client-server paradigm, and a library for configuration tasks. Puppet requires
the installation of a master server and client agents on every system that is to be managed. It is used
by Vmware, Cisco, Paypal and SalesForce.
Saltstack : Salt⁷ is what the next chapter of this book will details.
⁷http://saltstack.com/
Chapter I - A Taste Of Salt
1 o ^__^
2 o (==)_______
3 (__) )/
4 ||----w |
5 || ||
Presentation
SaltStack is an Open Source project, you can read and modify its source code under the Apache
license.
Its source code is available on github⁸.
SALSTACK Inc. is the company behind SaltStack, it was founded by Thomas Hatch, the original
creator of SaltStack. SaltStack is used by Apple inc, Rackspace, Photobucket, NASA, LinkedIn, Hulu,
HP Cloud Services, Cloud Flare and other know companies.
SaltStack Logo
SaltStack fundamentally improves the way system administrators, integrators and DevOps use to
configure and manage all aspects of a modern data center infrastructure.
It provides a different approach to some existing alternatives such as speed and adaptation to the
size of the cloud. Several recognized businesses use SaltStack to orchestrate and control their cloud
servers and infrastructure and automate the “DevOps Toolchain”.
⁸http://girhub.com/salstack/salt
Chapter I - A Taste Of Salt 11
It is built on a platform running relatively fast while allowing remote control of distributed infras-
tructures, code and data. A layer of security is established while having two-way communications
between the different components of this platform.
The following chapters are conceived for new and experienced system administrators, DevOps and
full stack developers seeking to manage and configure multiple servers / application and software
platforms more easily.
The infrastructure to manage can be virtual machines, cloud (Amazon EC2 instances, Rackspace
..etc) or physical machines as well hosted applications and platforms that rely on configuration files.
All you need is a root access, a good understanding of the environment to manage and the basic
know-how for a sysadmin.
Even if it is possible to use a web access to manage SaltStack but the use of the command line
is always more adapted to our needs for several reasons such as speed and efficiency. If you are
familiar with the command line and programming, understanding Salt commands and its syntax
will be easier but this is not a requirement to start using SaltStack.
Salt is portable and works with these systems:
• Amazon Linux 2012.09
• Arch, CentOS 5/6
• Debian 6.x/7.x/8(git installations only)
• Fedora 17/18
• FreeBSD 9.1/9.2/10
• Gentoo
• Linaro
• Linux Mint 13/14
• OpenSUSE 12.x
• Oracle Linux 5/5
• Red Hat 5/6
• Red Hat Enterprise 5/6
• Scientific Linux 5/6
• SmartOS
• SuSE 11 SP1/11 SP2
• Ubuntu 10.x/11.x/12.x/13.04/13.10
• Elementary OS 0.2
According to the official website of Salt, other systems and distributions will be compatible in the
future. If you want to stay informed just follow the development branch.
In the following sections, the installation and the use of SaltStack will be in the context of Linux
server management. This could have some small differences for Windows, FreeBSD or Solaris..Etc.
Overall, principles are the same.
Chapter I - A Taste Of Salt 12
You can use Salt installed on an operating system to manage other systems (A Linux to manage a
Solaris or a BSD to manage a Windows … etc.). The installation part of this book will cover Redhat
and Debian. Be sure to check the documentation (docs.saltstack.com) for the installation and the
specific use with your particular operating system.
A brief summary
SaltStack is based on some special components:
• One or more “salt-master”, “salt-minion” and “salt-syndic”
• A key management system “salt-key” that allows the authentication of a “salt-minion” on a
“salt-master”
• A system of “states” to describe the configurations
• A “top.sls” that calls the “states”
• A system of “grain” on the minion to manage the configurations data
• A system of “pillars” to store other data on the master (such as confidential data)
• A transport and data management system called “ZeroMQ”
• An event management system called “reactors” “returners”, “outputters” ..etc
A master can manage configurations or execute remote commands on one or more minions. This
operations are based on “SLS” files, and these files are calling Salt modules, grains and/or pillars.
Salt could be used either from the command line or in executable scripts.
The various components of SaltStack will be explained in this book, some definitions appeal to
others, that’s why in the first order we need to have a global view on the functioning system of Salt.
Expanding Salt Use
Provisioning and testing tools based on Salt and its GUI will not be part of this documentation, but
they are interesting tools if you want to learn more about SaltStack.
Some of this tools are :
Salty Vagrant
Salty Vagrant is a Vagrant plugin that allows you to use Salt as a provisioning tool. You can use
“formulas” and existing configs for building development environments.
The simplest way to use Salty Vagrant is configuring it to work in “masterless” mode. Details are
explained in the official Vagrant documentation⁹.
⁹https://docs.vagrantup.com/v2/provisioning/salt.html
Chapter I - A Taste Of Salt 13
Salt Cloud
Salt Cloud¹⁰ is a public cloud provisioning tool created to integrate Salt to each of the major cloud
infrastructure providers (AWS, Rackspace, Parallels ..etc) in order to facilitate and accelerate the
supply process.
Salt Cloud allows managing a cloud infrastructure based on “maps” and “profiles” of virtual
machines. This means that many virtual machines in the cloud can be managed easier and faster.
Halite
Halite¹¹ is the client-side web interface (Salt GUI). It connects and operates a SaltStack infrastructure.
This tool is a graphical complement, but it is not indispensable for the functioning of Salt. For best
results, Halite works with Hydrogen and higher versions.
Conclusion
The general presentation of Salt is not enough to begin mastering the tool, but it is required if you
are not familiar with the concept of configuration management and data center automation.
¹⁰https://github.com/saltstack/salt-cloud
¹¹https://github.com/saltstack/halite

Más contenido relacionado

Destacado

Fitness program and environmental health
Fitness program and environmental healthFitness program and environmental health
Fitness program and environmental health
Gosi ES Ges
 
ICT and e-Governance in Agriculture
ICT and e-Governance in AgricultureICT and e-Governance in Agriculture
ICT and e-Governance in Agriculture
Sharbendu Banerjee
 

Destacado (15)

1
11
1
 
Jaywantrao CV
Jaywantrao CVJaywantrao CV
Jaywantrao CV
 
Fitness program and environmental health
Fitness program and environmental healthFitness program and environmental health
Fitness program and environmental health
 
CV
CVCV
CV
 
resume & certificate yahoo
resume & certificate yahooresume & certificate yahoo
resume & certificate yahoo
 
Salt stack
Salt stackSalt stack
Salt stack
 
夏合宿
夏合宿夏合宿
夏合宿
 
Understanding salt modular sub-systems and customization
Understanding salt   modular sub-systems and customizationUnderstanding salt   modular sub-systems and customization
Understanding salt modular sub-systems and customization
 
Salt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration ManagementSalt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration Management
 
Introduction to SaltStack
Introduction to SaltStackIntroduction to SaltStack
Introduction to SaltStack
 
Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...
 
La ira
La iraLa ira
La ira
 
Orchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStackOrchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStack
 
ICT and e-Governance in Agriculture
ICT and e-Governance in AgricultureICT and e-Governance in Agriculture
ICT and e-Governance in Agriculture
 
Full Stack Automation with Katello & The Foreman
Full Stack Automation with Katello & The ForemanFull Stack Automation with Katello & The Foreman
Full Stack Automation with Katello & The Foreman
 

Similar a SaltStack For DevOps, Free Sample

(E book pdf) thinking in patterns with java
(E book   pdf) thinking in patterns with java(E book   pdf) thinking in patterns with java
(E book pdf) thinking in patterns with java
Raffaella D'angelo
 
Turning Passion Into Words
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into Words
Brian Hogan
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
michaelag1971
 
Speed Writing Guide - How To Increase Speed Writing
Speed Writing Guide - How To Increase Speed WritingSpeed Writing Guide - How To Increase Speed Writing
Speed Writing Guide - How To Increase Speed Writing
Ilya Bilbao
 
phonegapbydissection
phonegapbydissectionphonegapbydissection
phonegapbydissection
Daniel Rhodes
 
Working together
Working togetherWorking together
Working together
himaye
 

Similar a SaltStack For DevOps, Free Sample (20)

Smtb sample
Smtb sampleSmtb sample
Smtb sample
 
(E book pdf) thinking in patterns with java
(E book   pdf) thinking in patterns with java(E book   pdf) thinking in patterns with java
(E book pdf) thinking in patterns with java
 
Peeling design patterns
Peeling design patternsPeeling design patterns
Peeling design patterns
 
dkfsja
dkfsjadkfsja
dkfsja
 
Peeling Design Patterns
Peeling Design PatternsPeeling Design Patterns
Peeling Design Patterns
 
Turning Passion Into Words
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into Words
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
 
WORK SMARTER NOT HARDER EMERSON EDUARDO RODRIGUES.pdf
WORK SMARTER NOT HARDER EMERSON EDUARDO RODRIGUES.pdfWORK SMARTER NOT HARDER EMERSON EDUARDO RODRIGUES.pdf
WORK SMARTER NOT HARDER EMERSON EDUARDO RODRIGUES.pdf
 
Wait A Moment? How High Workload Kills Efficiency! - Roman Pickl
Wait A Moment? How High Workload Kills Efficiency! - Roman PicklWait A Moment? How High Workload Kills Efficiency! - Roman Pickl
Wait A Moment? How High Workload Kills Efficiency! - Roman Pickl
 
Surviving the technical interview
Surviving the technical interviewSurviving the technical interview
Surviving the technical interview
 
It is difficult
It is difficultIt is difficult
It is difficult
 
DevOps for Managers
DevOps for ManagersDevOps for Managers
DevOps for Managers
 
Tutor Py
Tutor PyTutor Py
Tutor Py
 
Speed Writing Guide - How To Increase Speed Writing
Speed Writing Guide - How To Increase Speed WritingSpeed Writing Guide - How To Increase Speed Writing
Speed Writing Guide - How To Increase Speed Writing
 
Joomla Tutorial
Joomla TutorialJoomla Tutorial
Joomla Tutorial
 
PhoneGap by Dissection
PhoneGap by DissectionPhoneGap by Dissection
PhoneGap by Dissection
 
phonegapbydissection
phonegapbydissectionphonegapbydissection
phonegapbydissection
 
Working together
Working togetherWorking together
Working together
 
Building resuable and customizable Vue components
Building resuable and customizable Vue componentsBuilding resuable and customizable Vue components
Building resuable and customizable Vue components
 

Más de Aymen EL Amri (6)

HLayer / DevOps REX
HLayer / DevOps REXHLayer / DevOps REX
HLayer / DevOps REX
 
HLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesHLayer / Cloud Native Best Practices
HLayer / Cloud Native Best Practices
 
HLayer / Docker and its ecosystem
HLayer / Docker and its ecosystemHLayer / Docker and its ecosystem
HLayer / Docker and its ecosystem
 
HLayer / Kubernetes for CI/CD
HLayer / Kubernetes for CI/CDHLayer / Kubernetes for CI/CD
HLayer / Kubernetes for CI/CD
 
Docker & son ecosystème
Docker & son ecosystèmeDocker & son ecosystème
Docker & son ecosystème
 
The Roadmap to Becoming a DevOps Professional
The Roadmap to Becoming a DevOps ProfessionalThe Roadmap to Becoming a DevOps Professional
The Roadmap to Becoming a DevOps Professional
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%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
 
%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
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%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
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 

SaltStack For DevOps, Free Sample

  • 1.
  • 2. Saltstack For DevOps Extremely fast and simple IT automation and configuration managment Aymen El Amri - @eon01 This book is for sale at http://leanpub.com/saltstackfordevops This version was published on 2015-02-21 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. ©2015 Aymen El Amri
  • 3. Tweet This Book! Please help Aymen El Amri - @eon01 by spreading the word about this book on Twitter! The suggested tweet for this book is: I just bought SaltStack For DevOps book. Check it out : https://leanpub.com/saltstackfordevops The suggested hashtag for this book is ##Salt4DevOps. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=##Salt4DevOps
  • 4. Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Every Book Has A Story, This Story Has A Book . . . . . . . . . . . . . . . . . . . . . . . 1 To whom is this book addressed ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Conventions used in this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 How to properly enjoy this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 How to contribute to this book ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 About The Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 0 - Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Configuration Management And Data Center Automation . . . . . . . . . . . . . . . . . . 5 DevOps Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Chapter I - A Taste Of Salt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 A brief summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Expanding Salt Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  • 5. Preface 1 o ^__^ 2 o (oo)_______ 3 (__) )/ 4 ||----w | 5 || || Every Book Has A Story, This Story Has A Book I wanted to quickly resign from that job, my suggestions about setting up a continuous delivery/de- ployment have not been considered! I’m lazy and there are hundreds of configuration files and thousands of variables to copy from an excel file and to reconfigure in some platforms, a huge number of poorly-configured servers; hundreds of servers to manage. . I wanted to work on the automation of procedures, I was aware that this is the solution, that was not the priority of the customer. It was a position within a team of ten people working on the integration of a number of heavy applications. At the beginning, I was obliged to follow my colleagues and my boss in the methods of work they have adopted which have one goal : satisfy the unceasing demands of the customer. No, but .. wait, this is not good at all! I spent almost two weeks searching and working on some solutions before I convinced my boss to give me the time to set up what I am working on, so that it can ease the heavy load, accelerate daily procedures and reduce human errors. Among other procedures I have set up, I found Saltstack the perfect solution that meets the expectations of integration process, or rather, the continious integration, deployments and tests. I hesitated between several alternatives: puppet, CFEngine, Ansible .. etc. The choice was made based on several criteria and I have never regretted. In the beginning I wanted to resign from my job, just few days after of the discovery of Salt, I was in love with my job, with what I was doing and with Saltstack. Well, I tried SaltStack first time when I saw my team taking more than 3 days to configure hosted platforms at each deployment. After using SaltStack, the same procedure was taking less than 1/2 hour. Through this book, it’s your turn to discover Saltstack, I am your guide. I wish you a pleasant reading.
  • 6. Preface 2 To whom is this book addressed ? To developers, system administrators and anyone faced to work in one of these environments in collaboration with the other or simply in an environment that requires knowledge in development and system administration. The most common idea, is that developers think they are here to serve the machines by writing code and applications, systems administrators think that machines should works for them, simply by making them happy. Moreover, within the same company there is generally some tension between the two teams: System administrators accuse developers to write code that consumes memory, does not meet system security standards or not adapted to the configuration of available machines. Developers accuse system administrators to be lazy, to lack innovation and to be seriously uncool! No more mutual accusations, now with the evolution of software development, infrastructure and methodologies adopted (such as Agile / Scrum), the concept of Devops was born. The DevOps is a concept and a job that seeks closer collaboration and a combination of different roles involved in software development such as the role of developer, responsible for operations and responsible of quality assurance. The software must be produced at a frenetic pace while at the same time the developing in cascade seems to have reached its limits. If you are a fan of this concept, if you are a system administrator working on software operations, if you are a start up developer seeking to join the new movement this book is addressed to you. Conventions used in this book Basically, this is a technical book where you will find commands (Saltstack commands) and code (Python, YAML, Jinja2 ..etc). Commands and code are written in different fonts. Example : 1 python -c 'import urllib; print urllib.urlopen("https://bootstrap.saltstack.com" 2 ).read()' | sudo sh -s -- git develop • Some technical words are quoted Some others are using bold or italic font. The goal is to get your attention when you’re reading and help you identify keywords. • You will find two icons, I have tried to be as simple as possible so I have chosen not to use too many symbols, you’ll only find: To highlight useful and important information.
  • 7. Preface 3 To highlight a warning or to prevent. How to properly enjoy this book This book contains technical explanations and shows in each case an example of a command or a configuration to follow. The only explanation gives you a general idea and the code that follows gives you convenience and help you to practice what you’re reading. Preferably, you should always look both parts for a maximum of understanding. Like any new tool or programming language you learned, it is normal to find difficulties and confusions in the beginning, perhaps even after. If you’re not used to learn new technologies, you can even have a modest understanding while being in an advanced stage of this book. Do not worry, everyone has passed at least once by this kind of situations. At the beginning try to make a diagonal reading while focusing on the basic concepts, then try the first practical manipulation on your server or just using your laptop and occasionally come back to this book for further reading on a about a specefic subject or concept. This book is not an encyclopedia, but sets out the most important parts to learn and even to master Saltstack, if you find words or concepts that you are not comfortable with, just try take your time and do your research. Learning can be serial so understanding a topic require the understandding of other topics. Through this book, you will learn how to install configure and use Saltstack. Just before finishing the book, you will go through a chapter where a good example of a practical use case is explained. Through this chapter, try to showcase your acquired undrestanding, and no it will not hurt to go back to previous chapters if you are unsure or in doubt. Finally, try to be pragmatic and have an open mind if you encounter a problem. The resolution begins by asking the right questions. How to contribute to this book ? This work is in progress. I am an adopter of the lean philosophy, so the book will be continuously improved in function of many criteria, but the most important one is your feedback. If you have any suggestions please do not hesitate to contact me, you can find me on Twitter¹ or you can use my blog contact page². This book is not perfect, so you can find typo, punctuation errors or missing words, like in every book but every line of the used code was tested before (I used mainly Redhat and Debian distributions). About The Author Aymen El Amri³ is a Linux/web engineer, he worked on development and system administration for companies and co-founded some projects in connection with the community of free and open source ¹https://twitter.com/eon01 ²http://eon01.com/blog/contact-me/ ³http://eon01.com
  • 8. Preface 4 software. He is more and more interested in the DevOps philosophy, the lean programming and the tools/methodologies that comes with since his last experiences in this domain were successful.
  • 9. Chapter 0 - Introduction 1 o ^__^ 2 o (@@)_______ 3 (__) )/ 4 ||----w | 5 || || Configuration Management And Data Center Automation Configuration management and data center automation are mechanisms to manage the technical description of a system, its components and all of the changes on the configuration during the life cycle of a system or during its different processes. Source code deployments on multiple environments requires a configuration management and provisioning tool. From the development, integration, test, deployment, to the production environment, configuration management becomes a process of normalization of the configuration of the application according to the state of the infrastructure and other requirements. The same process of normalization should be ensured when changing the environment, the infrastructure or when the configuration itself changes. With the adoption of agile development methods, the process of development, test and deployment of a software component has accelerated and therefore the methods of management have become faster, more automated and more adapted to changes. DevOps Evolution Even if many specialists consider provisioning, change management and automation as a business issue, not an IT issue but to make this happen some special technical skills are required. That’s why new positions in the IT industry have emerged: DevOps. The illustration below (taken from Wikipedia) shows the essence of the DevOps philosophy.
  • 10. Chapter 0 - Introduction 6 DevOps as the intersection of development (software engineering), technology operations and quality assurance (QA) Automation is important to the success of critical IT processes that are part of the life cycle of a product, including provision, change management, release management, patch management, compliance and security. Therefore having the technical skills and the know-how are very important to any “lazy but pragmatic sysadmin”. This book will help you to learn using one of the most important IT automation configuration management and infrastructure automation/orchestration tool: SaltStack. DevOps Tool Currently, several FOSS and proprietary automation and configuration management tools exists. Choosing one of these tools could based on several criteria. Choice Criteria Performance : Between the memory consumption, the speed of execution and the adaptation to increasingly complexes architectures, several performance criteria could help you decide on the performance of a such tool. License : You may choose between FOSS and proprietary software. Most of the existing softwares are Open Source. It remains to be seen what FOSS license you should choose: GPL, BSD, Apache, MIT..etc Programming Language : A such tool is coded using a programming language, but it does not mean that the a DevOps will manage and automate ops and servers using the same language. For example,
  • 11. Chapter 0 - Introduction 7 SaltStack uses Jinja and YAML ..etc Most of those tools are written in Python, Ruby or Java, but one can also find perl, C and C ++. Authentication Methods : A configuration management or a data center automation tool is based on a model, roughly consisting of clients and a server. The authentication between a client and a server can be automatic, encrypted, secure, fast .. or not. Agents : Some tools use agents that must be installed on the target servers (clients), some tools work without agents and others offer both choices. Scalability : A tool that grows and evolves with the enterprise must provide technical means and capabilities to ensure scalability at several features and extended functional scopes. Portability : Most if not all configuration management tools are compatible with *nix systems. Some servers runs on BSD, AIX, HP-UX, Mac OS X, Solaris, Windows and other OSs. In this case you must see this point: the compatibility. Thanks to Wikipedia⁴ and its contributor for the next comparison concerning the portability of the following tools. AIX BSD HP- UX Linux Mac OS X Solaris WindowsOthers Ansible Yes Yes Yes Yes Yes Yes Yes Yes Bcfg Partial Yes No Yes Partial Yes No No CFEngineYes Yes Yes Yes Yes Yes Yes Yes cdist Yes Yes Yes No Chef Yes Yes Yes Yes Yes Yes Yes Yes ISconf Yes Yes Yes Yes Yes Yes No No Juju Yes LCFG No No No Partial Partial Partial No No OCS Inven- tory NG Yes Yes Yes Yes Yes Yes Yes No Opsi No No No Yes No No Yes No PIKT Yes Yes Yes Yes Yes Yes No Yes Puppet Yes Yes Yes Yes Partial Yes Yes Yes Quattor No No No Yes Partial Yes No No Radmind Yes Yes No Yes Yes Yes Yes No Rex Yes Yes Yes Yes Yes No Rudder Yes Partial No Yes Partial Partial Yes Yes Rundeck Yes Yes Yes Yes Yes Yes Yes No SmartFrogNo No Yes Yes Yes Yes Yes No Salt Yes Yes Partial Yes Yes Yes Yes Partial SpacewalkNo No No Yes No Yes No No STAF Yes Yes Yes Yes Yes Yes Yes Yes ⁴http://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software
  • 12. Chapter 0 - Introduction 8 AIX BSD HP- UX Linux Mac OS X Solaris WindowsOthers Synctool Yes Yes Yes Yes Yes Yes Yes Yes Vagrant Yes Yes Yes Documentation, Support and Latest Stable Release: Keep in mind that the quantity and the quality of official documentations, forums, groups, and paid support differs from a tool to another. A good thing to do is to see the date of the latest stable release, some tools are just no more updated which can cause security risks. Popular tools Among the best and the most popular tools we find : Ansible, CFEngine, Puppet, Saltstack. Among the best and the most popular tools we find : Ansible, CFEngine, Puppet, Saltstack. Ansible : Combines multi-node deployment and ad-hoc task execution. Manages the nodes with SSH and requires Python (2.4 or later). Uses JSON and YAML modules and state as descriptions. It is built on python but its modules can be written in any language. Ansible⁵ is one of the most used softwares. It is used by Spotify, Twitter, NASA and evernote. Puppet : Puppet⁶ is based on a custom declarative language to describe the system configuration, ⁵http://www.ansible.com/home ⁶http://puppetlabs.com/
  • 13. Chapter 0 - Introduction 9 uses the distributed client-server paradigm, and a library for configuration tasks. Puppet requires the installation of a master server and client agents on every system that is to be managed. It is used by Vmware, Cisco, Paypal and SalesForce. Saltstack : Salt⁷ is what the next chapter of this book will details. ⁷http://saltstack.com/
  • 14. Chapter I - A Taste Of Salt 1 o ^__^ 2 o (==)_______ 3 (__) )/ 4 ||----w | 5 || || Presentation SaltStack is an Open Source project, you can read and modify its source code under the Apache license. Its source code is available on github⁸. SALSTACK Inc. is the company behind SaltStack, it was founded by Thomas Hatch, the original creator of SaltStack. SaltStack is used by Apple inc, Rackspace, Photobucket, NASA, LinkedIn, Hulu, HP Cloud Services, Cloud Flare and other know companies. SaltStack Logo SaltStack fundamentally improves the way system administrators, integrators and DevOps use to configure and manage all aspects of a modern data center infrastructure. It provides a different approach to some existing alternatives such as speed and adaptation to the size of the cloud. Several recognized businesses use SaltStack to orchestrate and control their cloud servers and infrastructure and automate the “DevOps Toolchain”. ⁸http://girhub.com/salstack/salt
  • 15. Chapter I - A Taste Of Salt 11 It is built on a platform running relatively fast while allowing remote control of distributed infras- tructures, code and data. A layer of security is established while having two-way communications between the different components of this platform. The following chapters are conceived for new and experienced system administrators, DevOps and full stack developers seeking to manage and configure multiple servers / application and software platforms more easily. The infrastructure to manage can be virtual machines, cloud (Amazon EC2 instances, Rackspace ..etc) or physical machines as well hosted applications and platforms that rely on configuration files. All you need is a root access, a good understanding of the environment to manage and the basic know-how for a sysadmin. Even if it is possible to use a web access to manage SaltStack but the use of the command line is always more adapted to our needs for several reasons such as speed and efficiency. If you are familiar with the command line and programming, understanding Salt commands and its syntax will be easier but this is not a requirement to start using SaltStack. Salt is portable and works with these systems: • Amazon Linux 2012.09 • Arch, CentOS 5/6 • Debian 6.x/7.x/8(git installations only) • Fedora 17/18 • FreeBSD 9.1/9.2/10 • Gentoo • Linaro • Linux Mint 13/14 • OpenSUSE 12.x • Oracle Linux 5/5 • Red Hat 5/6 • Red Hat Enterprise 5/6 • Scientific Linux 5/6 • SmartOS • SuSE 11 SP1/11 SP2 • Ubuntu 10.x/11.x/12.x/13.04/13.10 • Elementary OS 0.2 According to the official website of Salt, other systems and distributions will be compatible in the future. If you want to stay informed just follow the development branch. In the following sections, the installation and the use of SaltStack will be in the context of Linux server management. This could have some small differences for Windows, FreeBSD or Solaris..Etc. Overall, principles are the same.
  • 16. Chapter I - A Taste Of Salt 12 You can use Salt installed on an operating system to manage other systems (A Linux to manage a Solaris or a BSD to manage a Windows … etc.). The installation part of this book will cover Redhat and Debian. Be sure to check the documentation (docs.saltstack.com) for the installation and the specific use with your particular operating system. A brief summary SaltStack is based on some special components: • One or more “salt-master”, “salt-minion” and “salt-syndic” • A key management system “salt-key” that allows the authentication of a “salt-minion” on a “salt-master” • A system of “states” to describe the configurations • A “top.sls” that calls the “states” • A system of “grain” on the minion to manage the configurations data • A system of “pillars” to store other data on the master (such as confidential data) • A transport and data management system called “ZeroMQ” • An event management system called “reactors” “returners”, “outputters” ..etc A master can manage configurations or execute remote commands on one or more minions. This operations are based on “SLS” files, and these files are calling Salt modules, grains and/or pillars. Salt could be used either from the command line or in executable scripts. The various components of SaltStack will be explained in this book, some definitions appeal to others, that’s why in the first order we need to have a global view on the functioning system of Salt. Expanding Salt Use Provisioning and testing tools based on Salt and its GUI will not be part of this documentation, but they are interesting tools if you want to learn more about SaltStack. Some of this tools are : Salty Vagrant Salty Vagrant is a Vagrant plugin that allows you to use Salt as a provisioning tool. You can use “formulas” and existing configs for building development environments. The simplest way to use Salty Vagrant is configuring it to work in “masterless” mode. Details are explained in the official Vagrant documentation⁹. ⁹https://docs.vagrantup.com/v2/provisioning/salt.html
  • 17. Chapter I - A Taste Of Salt 13 Salt Cloud Salt Cloud¹⁰ is a public cloud provisioning tool created to integrate Salt to each of the major cloud infrastructure providers (AWS, Rackspace, Parallels ..etc) in order to facilitate and accelerate the supply process. Salt Cloud allows managing a cloud infrastructure based on “maps” and “profiles” of virtual machines. This means that many virtual machines in the cloud can be managed easier and faster. Halite Halite¹¹ is the client-side web interface (Salt GUI). It connects and operates a SaltStack infrastructure. This tool is a graphical complement, but it is not indispensable for the functioning of Salt. For best results, Halite works with Hydrogen and higher versions. Conclusion The general presentation of Salt is not enough to begin mastering the tool, but it is required if you are not familiar with the concept of configuration management and data center automation. ¹⁰https://github.com/saltstack/salt-cloud ¹¹https://github.com/saltstack/halite