• Save
Real-time Infrastructure Management with SaltStack - OpenWest 2013
Upcoming SlideShare
Loading in...5
×
 

Real-time Infrastructure Management with SaltStack - OpenWest 2013

on

  • 2,632 views

SaltStack is fast, among other things. At it's core, SaltStack is a real-time infrastructure management tool that utilizes a high-speed communication channel for remote execution and configuration ...

SaltStack is fast, among other things. At it's core, SaltStack is a real-time infrastructure management tool that utilizes a high-speed communication channel for remote execution and configuration management. Proper systems administration is not possible without both. This presentation will demonstrate how to create real-time interaction between your code and your infrastructure using SaltStack.

Statistics

Views

Total Views
2,632
Views on SlideShare
2,561
Embed Views
71

Actions

Likes
5
Downloads
0
Comments
0

3 Embeds 71

http://www.scoop.it 44
http://162.243.226.161 18
http://www.devopsroom.com 9

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Real-time Infrastructure Management with SaltStack - OpenWest 2013 Real-time Infrastructure Management with SaltStack - OpenWest 2013 Presentation Transcript

  • Real-time infrastructure management with SaltSeth House <seth@eseth.com>OpenWest Conference 20132013-05-03Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 1 / 34
  • Salt internals (briefly)Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 2 / 34
  • Salt internals (briefly)Outline1 Salt internals (briefly)2 Salt speed3 Minion data4 Events5 Schedules6 What’s comingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 2 / 34
  • Salt internals (briefly)Salt internalsSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 3 / 34
  • Salt internals (briefly)Mastersalt-master -dOpen two ports (pub/sub & reply channel)Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 4 / 34
  • Salt internals (briefly)Minionssalt-minion -dConnect to the masterNo open ports requiredListens for pubs from the master/etc/salt/minion:#master: saltSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 5 / 34
  • Salt internals (briefly)Execution modulesContain all the functionalitySeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 6 / 34
  • Salt internals (briefly)Execution examplesalt ’web-*’ network.interfacesSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 7 / 34
  • Salt internals (briefly)State modulesWrap execution modulesBefore-checktest=trueCall out to execution modulesAfter-checkSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 8 / 34
  • Salt internals (briefly)State module exampletop.sls:base:’web-*’:- httpdhttpd.sls:httpd:pkg:- installedSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 9 / 34
  • Salt speedOutline1 Salt internals (briefly)2 Salt speed3 Minion data4 Events5 Schedules6 What’s comingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 10 / 34
  • Salt speedWhy is Salt fast?Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 11 / 34
  • Salt speedCommunicationZeroMQmsgpackSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 12 / 34
  • Salt speedpub/subAsynchronousMinions determine targeting matchMinions do all the workSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 13 / 34
  • Minion dataOutline1 Salt internals (briefly)2 Salt speed3 Minion data4 Events5 Schedules6 What’s comingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 14 / 34
  • Minion dataSharing minion data<-- Live -- Recent -- Historic -->peer interface Salt Mine ReturnersSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 15 / 34
  • Minion dataPeer/etc/salt/master:peer:lb-.*:- network.interfacesBe mindful of data securityCommunication still goes through the masterSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 16 / 34
  • Minion dataPeer exampleConfiguring haproxy.cfg:{% for server,ip insalt[’publish.publish’](’web*’,’network.interfaces’,[’eth0’]).items() %}server {{ server }} {{ ip[0] }}:80 check{% endfor %}Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 17 / 34
  • Minion dataSalt Mine/etc/salt/{master,minion}:mine_functions:network.interfaces: [eth0]mine_interval: 60New in Salt v0.15Either master or minion configBe mindful of data securitySeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 18 / 34
  • Minion dataSalt Mine exampleConfiguring haproxy.cfg:{% for server,ip insalt[’mine.get’](’web-*’,’network.interfaces’,[’eth0’]).items() %}server {{ server }} {{ ip[0] }}:80 check{% endfor %}Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 19 / 34
  • Minion dataReturners/etc/salt/{master,minion}:redis.db: 0redis.host: myredisredis.port: 6379Minions write directlyCan be read into Pillar via ext_pillarSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 20 / 34
  • Minion dataReturner full-circle exampleCollect the data:salt ’web-*’ network.interfaces eth0 --return redis_returnFetch the data via a custom ext_pillar module.Use the data:{% for server,ip insalt[’pillar.get’](’web.ip_addrs’, {}).items() %}server {{ server }} {{ ip[0] }}:80 check{% endfor %}Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 21 / 34
  • EventsOutline1 Salt internals (briefly)2 Salt speed3 Minion data4 Events5 Schedules6 What’s comingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 22 / 34
  • EventsEventsSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 23 / 34
  • EventsFire eventssalt ’lb-*’ event.fire_master refresh_pool loadbalancerSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 24 / 34
  • EventsWatch for events (manually)Some assembly requiredsalt/tests/eventlisten.pyComing soon to salt-apiSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 25 / 34
  • EventsReactor (react to events)/etc/salt/master:reactor:- loadbalancer:- /src/reactor/refresh_pool.sls/src/reactor/refresh_pool.sls:{% if data[’type’] == ’refresh_pool’ %}highstate_run:cmd.state.highstate:- tgt: lb-*{% endif %}Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 26 / 34
  • SchedulesOutline1 Salt internals (briefly)2 Salt speed3 Minion data4 Events5 Schedules6 What’s comingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 27 / 34
  • SchedulesSchedulesSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 28 / 34
  • SchedulesAdd events/etc/salt/{master,minion} (or pillar):schedule:highstate:function: state.highstateminutes: 60Seth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 29 / 34
  • SchedulesStats gatheringschedule:uptime:function: status.uptimeseconds: 60returner: redismeminfo:function: status.meminfominutes: 5returner: redisSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 30 / 34
  • What’s comingOutline1 Salt internals (briefly)2 Salt speed3 Minion data4 Events5 Schedules6 What’s comingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 31 / 34
  • What’s comingWhat’s comingSalt v.0.nextSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 32 / 34
  • What’s comingMonitoring statesConfigure inline with existing statesIndividual components are in placeNeeded: glueNeeded: alertingSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 33 / 34
  • What’s comingData resolutionTime-series dataThin and/or summarize older and older dataFree with some returnersSeth House <seth@eseth.com> (OpenWest Conference 2013)Real-time infrastructure management with Salt 2013-05-03 34 / 34