a-dash-of-salt



a-dash-of-salt

1 6


a-dash-of-salt

A dash of Salt

On Github alex-leonhardt / a-dash-of-salt

-

a Dash of Salt

YES, SALT IS AWESOME!

Who am I

  • Alex Leonhardt
  • Dev/Ops Engineer at Net-A-Porter for the last 1.5 years
  • 10+ years Systems Administrator / Engineer
  • Started playing with / using SaltStack ~5-6 months ago

Don't know salt ?

  • Python based configuration management and orchestration engine
  • Yaml syntax for salt formulas (puppet = modules)
  • Python modules to extend salt as you see fit

    (puppet = types & providers)

  • Very very fast
  • Uses zeromq by default, recently added RAET

    (Reliable Asynchronous Event Transport)

Dashboard ?

Yeah... nope.

Or so YOU thought!

But what about Halite?

Not really what I was after

Returners to the rescue

  • control where you want job reports sent to
  • many returners already present
  • redis, mongo, memcache, syslog, etc. Full list: salt.readthedocs.org
  • 2014.7.0rc1 (Helium) comes with a elasticsearch returner

Using elasticsearch returner

  • setup your minions and master to know to send data to ES
  • /etc/salt/{master|minion}
    elasticsearch:
      host: '192.168.122.1:9200'
      index: 'salt'
      number_of_shards: 1
      number_of_replicas: 0
    #
    # set returner to elasticsearch
    ext_job_cache: elasticsearch
    #
    
  • restart masters and minions
  • make sure that ES is accessible by all minions and masters (or proxy their connections)

Setup ES and Kibana

  • Docker Images are available here: hub.docker.com/u/alexleonhardt
  • Pull down ES and Kibana with
    docker pull alexleonhardt/elasticsearch
    docker pull alexleonhardt/kibana 
  • Run ES :
    docker run -p 9200:9200 --rm -i alexleonhardt/elasticsearch:1.3.1-5 
  • Run Kibana :
    docker run -p 8080:80 --rm -i alexleonhardt/kibana:3.1-1 
  • /etc/hosts entry for kibana:
    127.0.0.1  logstash.local

Import the kibana dashboard/json

Run salt and check the reports

Thank you!

Slides: alex-leonhardt.github.io/a-dash-of-salt/