Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Getting started with salt stack

1,234 views

Published on

  • Be the first to comment

Getting started with salt stack

  1. 1. PROBLEM | OPPORTUNITY | CO M PANY | PROJECT | COMPETITION | TEAM | RECOGNITION | CUSTOMERS 1 Getting Started with SaltStack © 2015 SALTSTACK John Tsai | Area Director | @johnstsai Charles C. Ruffino | Sales Engineer | @CharlesCRuffino
  2. 2. PROBLEM | OPPORTUNITY | CO M PANY | PROJECT | COMPETITION | TEAM | RECOGNITION | CUSTOMERS 2 CONFIDENTIALITY 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. 3. 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. 4. 4
  5. 5. 5 Introductions Salt is what makes things taste bad when it isn’t in them Who are we Background Why SaltStack
  6. 6. 6
  7. 7. Where Did SaltStack Come From © 2015 SALTSTACK
  8. 8. 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. 9. 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!
  10. 10. Remote Execution 101 Make 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
  11. 11. Remote Execution 101 Make 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?
  12. 12. Remote Execution 101 and going… How about a script? #!/bin/bash # Make sure your SSH config (~/.ssh/config) is setup! command=$1 host_list=$2 for 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!!!
  13. 13. Remote Execution 101 and 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!
  14. 14. Remote Execution 101 The 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
  15. 15. Say What? You want me to maintain a 5,000 line BASH script?
  16. 16. Syndic Public Cloud DevOps Code Apps CloudOps ITOps 3rd Party Integrations
 CMDB Reactor Config & State Command & Control Multi-
 master Abstraction layer Master AES SSL Curve ØMQ
 SSH RAET Physical Containers OS Virtual Grains Beacons Pillars Minions File server SaltStack Basics
  17. 17. SaltStack Basics Provisioning
  18. 18. SaltStack Basics Infrastructure Automation
  19. 19. SaltStack Basics Business/Cloud/Code/Dev/Infrastructure Orchestration
  20. 20. SaltStack Basics ITSM Empowered!
  21. 21. SaltStack Basics SaltStack automation for: CloudOps, ITOps, DevOps
  22. 22. SaltStack Basics SaltStack 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;
  23. 23. SaltStack Basics SaltStack 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);
  24. 24. More Information SaltStack Meetup: Los Angeles Thursday May 7, 6:00pm http://www.meetup.com/SaltStack-Los-Angeles-Meetup/
  25. 25. More Information http://saltstack.com/training/
  26. 26. More Information http://saltstack.com/training/ https://www.youtube.com/user/SaltStack http://salt.readthedocs.org/en/latest/ http://salt.readthedocs.org/en/latest/ref/modules/all/index.html http://salt.readthedocs.org/en/latest/ref/states/all/index.html https://github.com/saltstack Link all the Things
  27. 27. 801.207.7440 www.saltstack.com 3400 N. Ashton Blvd. Suite 110 Lehi, UT 84043 @SaltStackInc Thank You!

×