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.

Salt Stack pt. 2 : Configuration Management

2,083 views

Published on

Second and last episode of my SaltStack series for Programmers in Padua.

This one focuses on the configuration management features of SaltStack and ends with a demo of a full solution for installing Sentry. There will be a video recording soon.

Repo for the salt states: https://github.com/unicolet/salt-sentry

Published in: Technology
  • Be the first to comment

Salt Stack pt. 2 : Configuration Management

  1. 1. For Beginners – pt. 2 Configuration Management
  2. 2. Who am I? ber Um etti icol oN t ● Sysadmin ● PSC Dev ● Open Source enthusiast contributor contributor @afactotum
  3. 3. Riassunto della puntata prec. Remote Execution http://prezi.com/user/unicoletti/
  4. 4. Configuration Management Configuration management is the process of standardizing resource configurations and enforcing their state across IT infrastructure in an automated yet agile manner.
  5. 5. Un esempio... Policy: il servizio snmp deve essere installato ed in esecuzione YA M L! net-snmp: pkg: - installed service: - name: snmpd - enable: True - running - require: - pkg: net-snmp
  6. 6. L'esempio continua... /etc/snmpd.conf: Gestiamo anche la cfg del servizio file.managed: - source: salt://snmp/snmpd.conf - user: root - group: root - mode: 640 - template: jinja
  7. 7. Jinja Templating syslocation "Pd, Veneto, Italy, Europe" syscontact root@example.org rocommunity sssshhhhh disk / Q ue s t e stringhe dev o n o diventa re variabili syslocation {{ pillar['location'] }} syscontact {{ pillar['contact'] }} rocommunity {{ pillar['rocommunity'] }} disk /
  8. 8. Pillar of Salt Pillar is an interface for Salt designed to offer global values that can be distributed to all minions. ● Jinja templates usano – pillar data – grains
  9. 9. Gestione multipli OS net-snmp: pkg: {% if grains['os'] == 'Ubuntu'%} - name: snmpd {% endif%} - installed service: - name: snmpd - enable: True - running - require: - pkg: net-snmp
  10. 10. Ricapitolando... GRAINS PILLAR DATA TEMPLATES STATI SALT FUNCTIONS
  11. 11. Applicare gli stati ● Da master: – ● salt state.highstate Da minion – salt-call state.highstate Anche modalita' master-less
  12. 12. TOP: assegnare stati/pillar ai nodi TOP FILE ● base: '*': - snmpd ● ● top.sls associa stati ai nodi associa pillar ai nodi
  13. 13. Un esempio reale(istico) SENTRY POSTGRES + DJANGO + NGINX Centos + Vagrant https://github.com/unicolet/salt-sentry
  14. 14. Configuration Mgmt: benefici Automazione Documentazione, Visibilita' Compliance Efficienza Affidabilita' Testability Agilita'

×