+ All Categories
Home > Technology > Introduction to orchestration using Mcollective

Introduction to orchestration using Mcollective

Date post: 29-Nov-2014
Category:
Upload: puppet-labs
View: 2,147 times
Download: 1 times
Share this document with a friend
Description:
"Introduction to orchestration using MCollective" by Pieter Loubser at Puppet Camp London 2013. Find the video here: http://puppetlabs.com/community/puppet-camp
35
Introduction to orchestration using MCollective Pieter Loubser Puppet Camp London 18 November 2013
Transcript
Page 1: Introduction to orchestration using Mcollective

Introduction to orchestration using

MCollective

Pieter Loubser!Puppet Camp London!

18 November 2013

Page 2: Introduction to orchestration using Mcollective

Who am I?

Developer at Puppet Labs in London!

On the MCollective team for 2 years!

@pieterloubser on the twitter!

ploubser on IRC

Page 3: Introduction to orchestration using Mcollective

Finite State Machines

Abstract machine that can only be in one of a finite number of states!

It can move from one state to another when an event or condition is triggered (transitions)

Page 4: Introduction to orchestration using Mcollective
Page 5: Introduction to orchestration using Mcollective

Old app Magic? Winning

Page 6: Introduction to orchestration using Mcollective

Orchestration It can be a Finite State Machine

Determine your states!

Determine your transitions

Page 7: Introduction to orchestration using Mcollective

What is MCollective?!

A framework for building server orchestration tools and a parallel job execution system

Page 8: Introduction to orchestration using Mcollective

The moving parts

Message Oriented Middleware!

MCollective Server (mcollectived)!

MCollective Client

Page 9: Introduction to orchestration using Mcollective

Middleware

Client

RPC Request

Server Server Server

RPC Request

RPC RequestRPC Request

Page 10: Introduction to orchestration using Mcollective

Server

Request : Determine the status of the puppet service

Response

Agents

Actionsrpcutilpuppet

packageservice

...

statusstartstop...

Page 11: Introduction to orchestration using Mcollective

Middleware

Client

Server Server Server

stopped stopped running

Process results

Page 12: Introduction to orchestration using Mcollective
Page 13: Introduction to orchestration using Mcollective

Agents - State Transitions

Agents can change the state the world is in!

Agents can determine what state the world is in !

An agent consists of two parts!

The DDL file which describes the Agent

Page 14: Introduction to orchestration using Mcollective
Page 15: Introduction to orchestration using Mcollective

Agents - State Transitions

Agents can change the state the world is in!

Agents can determine what state the world is in !

An agent consists of two parts!

The DDL file which describes the Agent!

An implementation file that defines the actions

Page 16: Introduction to orchestration using Mcollective
Page 17: Introduction to orchestration using Mcollective

State We’re not always looking at the system as

a whole

MCollective uses discovery plugins as the source of truth!

But touching all the things can sometimes be a bad idea!

There is a desire for fine grained filtering

Page 18: Introduction to orchestration using Mcollective

Filters

Filter on fact sources

Page 19: Introduction to orchestration using Mcollective
Page 20: Introduction to orchestration using Mcollective

Filters

Filter on fact sources!

Filter on Puppet classes

Page 21: Introduction to orchestration using Mcollective
Page 22: Introduction to orchestration using Mcollective

Filters

Filter on fact sources!

Filter on Puppet classes!

Filter on identity

Page 23: Introduction to orchestration using Mcollective
Page 24: Introduction to orchestration using Mcollective

Filters

Filter on fact sources!

Filter on Puppet classes!

Filter on identity!

Complex filtering based on logical language

Page 25: Introduction to orchestration using Mcollective
Page 26: Introduction to orchestration using Mcollective

Data Plugins

Enables you to determine system state by executing code in a similar manner to agents!

Consist of the same two parts as Agents!

DDL!

Implementation

Page 27: Introduction to orchestration using Mcollective
Page 28: Introduction to orchestration using Mcollective
Page 29: Introduction to orchestration using Mcollective
Page 30: Introduction to orchestration using Mcollective

Orchestration A simple deployment scenario

5 web servers sitting behind a load balancer!

Mark a web server as down!

Update the application!

Mark the web server as up!

Profit

Page 31: Introduction to orchestration using Mcollective

lb1

web1 web2 web3 web4 web5

Group 1

Page 32: Introduction to orchestration using Mcollective

Removed from load balancer

Failed to remove from load balancer

Ready for upgrade

Failed upgrade

Successful upgrade

Failed to return to load balancer Returned to

load balancer

Pre deployment Ready forload balancer

Successful deploy

Failed deploy

Page 33: Introduction to orchestration using Mcollective

The code

https://github.com/ploubser/puppetcamp-london

Page 34: Introduction to orchestration using Mcollective

Here goes everything…

Page 35: Introduction to orchestration using Mcollective

Questions?


Recommended