puppetconf 2016: scaling puppet on aws ecs with terraform and docker – maxime visonneau, trainline

36
Puppet at Scale using Terraform & ECS

Upload: puppet

Post on 06-Jan-2017

62 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scaleusing Terraform & ECS

Page 2: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

2

Maxime VISONNEAUPrincipal DevOps Engineer

@mvisonneau

Page 3: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

3

The story behind this talk..

Page 4: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scale using Terraform & ECS 4

Agenda

Terraform and ECS?

Why?

How?

Beyond!

Page 5: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

5

TERRAFORM Infrastructure as a Code

Execution plans

Resource graph

Change automation

Open Source

Strong community

Enterprise support

https://github.com/hashicorp/terraform

Page 6: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scale using Terraform & ECS 6

Alternatives to Terraform

CloudFormation

Tied to AWS Not made for that

Page 7: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

7

ECS Container management service

Highly scalable

Highly available

Managed through AWS SDK/API/CLI

Maintained by AWS

Page 8: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scale using Terraform & ECS 8

Alternatives to ECS

GO AHEAD!

Page 9: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

9

Why?

Page 10: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

10

Use case

Client / Server architecture

Certificate Authority

Server workloads

PuppetDB for reporting, with a human friendly interface on top of it

Lets keep it opensource for now

Puppet at Scale using Terraform & ECS

Page 11: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

11

Why not masterless ?

Page 12: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

12

So why then ?

Page 13: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

13

Because we can!

Page 14: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

14

The love of the sport!

Page 15: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

15

SPEED!

Page 16: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

16

ECS EC20

100

200

300

400

500

600

seco

nds

Page 17: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scale using Terraform & ECS 17

Pros Speed of scale

Scalability Reliability / Availability Additionnal level of abstraction

Enhanced compute resources sharing

No chicken/egg issue at Puppet is not configuring itself anymore

Cons Complexity

Operability

The TCO will depend on where you currently are regarding your

implementation of containers at scale.

Page 18: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

18

How?

Page 19: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

19

First things first!

Page 20: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

20

The Puppet Code

Puppet at Scale using Terraform & ECS

Page 21: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

21

One step at a time!

Page 22: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

22

The Certificate Authority

Puppet at Scale using Terraform & ECS

Page 23: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

23

The Puppet Server

Puppet at Scale using Terraform & ECS

Page 24: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

24

The Puppet DB

Puppet at Scale using Terraform & ECS

Page 25: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

25

The puppetboard

Puppet at Scale using Terraform & ECS

PuppetDB

Page 26: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

26

Assembling the pieces together

Page 27: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

27

Page 28: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

28

And there it is..

Page 29: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

29

SHOWTIME!(time to pray the demo gods)

Page 30: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

30

Page 31: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

31

Room for improvement(a big one!)

Page 32: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scale using Terraform & ECS 32

How could we make it better ?

Service discovery

Move away from load balancers and enhance portability

Use a unikernel

Improve immutability of the

base image we use

Monitoring

What we don’t monitor never

fails

Abstract data persistence

Will enable the portability of the

solution onto another provider

Change scheduler

Improve operability and be cloud

provider agnostic

Page 33: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

Puppet at Scale using Terraform & ECS 33

How could we make it better ?

Page 34: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

34

That’s it!

Page 35: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

35

Time for questions(and answers if possible..!)

Page 36: PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline