Getting started with salt stack
-
Upload
suresh-paulraj -
Category
Technology
-
view
114 -
download
1
Transcript of Getting started with salt stack
PR OBLEM | O P P O RTUNITY | CO M PANY | PR O JECT | COMPETITION | TEAM | RECOGNITION | CUSTOMERS 1
Getting Started with SaltStack
© 2015 SALTSTACK
John Tsai | Area Director | @johnstsaiCharles C. Ruffino | Sales Engineer | @CharlesCRuffino
PR OBLEM | O P P O RTUNITY | CO M PANY | PR O JECT | COMPETITION | TEAM | RECOGNITION | CUSTOMERS 2CONFIDENTIALITY STATEMENT
The information in this document is confidential to the person to whom it is addressed and should not be disclosed to any other person. It may not be reproduced in whole, or in part, nor may any of the information contained therein be disclosed without the prior consent of the directors of SaltStack, Inc. (‘the Company’). A recipient may not solicit, directly or indirectly (whether through an agent or otherwise) the participation of another institution or person without the prior approval of the directors of the Company.
The contents of this document have not been independently verified and they do not purport to be comprehensive, or to contain all the information that a prospective investor may need. No representation, warranty or undertaking, expressed or implied is or will be made or given and no responsibility or liability is or will be accepted by the Company or by any of its directors, employees or advisors in relation to the accuracy or completeness of this document or any other written or oral information made available in connection with the Company.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and or publication of this material is strictly prohibited.
© 2015 SALTSTACK
3
Agenda
Introductions
Why do I need it
Remote Execution 101
SaltStack Basics
Where did SaltStack come from
Let there be work, bread, water and salt for all -Nelson Mandela
4
5
IntroductionsSalt is what makes things taste bad when it isn’t in them
Who are we
Background
Why SaltStack
6
Where Did SaltStack Come From
© 2015 SALTSTACK
8
Why do I need it?Mmm Tasty!
SaltStack is systems management software built for cloud, Web scale, complex data center infrastructure and enterprise IT.
SaltStack software provides predictive infrastructure orchestration, combined with native configuration management, to address a massive market opportunity.
9
Why do I need it?
•Extremely flexible•Extremely extensible•Highly modular•Easy to customize•Scalable•Secure•Remote Execution Framework
SaltStack… because robots should have all the crap jobs by now!
Remote Execution 101Make it go!
Basic Remote Execution:
$ ssh charles@myhost “ls /home/charles” some_file.txt
Multiple hosts:
$ for h in myhost1 myhost2 myhost3;> do ssh charles@myhost “ls /home/charles”;> done
Remote Execution 101Make it do!
What about hundreds of hosts?
And I need to do this many times?
With different login credentials on some?
What if I need to do something with the output?
Remote Execution 101and going…
How about a script?
#!/bin/bash# Make sure your SSH config (~/.ssh/config) is setup!
command=$1host_list=$2for h in host_list; do ssh “$h” “$command”done
# FIXME: Add output handling# FIXME: Add error handling# FIXME: Add logging# TODO: FIND A BETTER WAY TO DO THIS!!!
Remote Execution 101and doing…
We need a script that can handle:
Executing arbitrary commands… on one or more remote hosts… with a sane way to get the output (STDOUT? Write a file? Text Output? JSON? YAML???)… and graceful error handling… and logging… and authentication… everything else I haven’t thought of yet!
Remote Execution 101The Realization Sets In…
We only want to run a command if the host is in a particular state…
The command is different for some hosts because they have a different OS
We need to configure host X before we configure host Y
We want to generate a file from a template, using data from an external database
We need to keep that external data secret
Say What?
You want me to maintain a 5,000 line BASH script?
Syndic
Public Cloud
DevOps
Code
Apps
CloudOps
ITOps
3rd PartyIntegrations
CMDB
Reactor
Config &State
Command& Control
Multi-master
Abstraction layer
Master
AES
SSL
Curve
ØMQSSH
RAET
Physical
Containers
OS
Virtual
Grains
Beacons
Pillars
Minions
File server
SaltStack Basics
SaltStack BasicsProvisioning
SaltStack BasicsInfrastructure Automation
SaltStack BasicsBusiness/Cloud/Code/Dev/Infrastructure Orchestration
SaltStack BasicsITSM Empowered!
SaltStack BasicsSaltStack automation for: CloudOps, ITOps, DevOps
SaltStack BasicsSaltStack automation for: CloudOps, ITOps, DevOps
Extreme flexibility:• Master and minion architecture, or masterless;• Agent (minion) or agentless (Salt SSH);• Permanent, encrypted and authenticated connection (ZeroMQ / AES);• Open API for third-party cloud and software integration;• Asynchronous data collection and command execution;• Push or pull;• Lightweight and efficient;
SaltStack BasicsSaltStack automation for: CloudOps, ITOps, DevOps
Master (controls minions):• Pub / sub and reply channel;• Two open ports on master;• Multi-master for SaltStack high availability.
Minions (do all the work, self aware):• Listen and receive commands from a remote Salt master;• No open ports;• Not chatty;• Command feedback;• Peer system - live data sharing between minions;• Salt mine - only the most recent minion data, cached data is visible to other minions;• Returners - historical minion data;• Syndic (a special minion that passes commands from a higher master);
More InformationSaltStack Meetup: Los Angeles Thursday May 7, 6:00pm
http://www.meetup.com/SaltStack-Los-Angeles-Meetup/
More Informationhttp://saltstack.com/training/
More Information
http://saltstack.com/training/https://www.youtube.com/user/SaltStackhttp://salt.readthedocs.org/en/latest/http://salt.readthedocs.org/en/latest/ref/modules/all/index.htmlhttp://salt.readthedocs.org/en/latest/ref/states/all/index.htmlhttps://github.com/saltstack
Link all the Things
801.207.7440
www.saltstack.com
3400 N. Ashton Blvd. Suite 110 Lehi, UT 84043
@SaltStackInc
Thank You!