Puppet at Scale
using Terraform & ECS
2
Maxime VISONNEAU
Principal DevOps Engineer
@mvisonneau
The story behind this talk..
3
Agenda
 Terraform and ECS?
 Why?
 How?
 Beyond!
4Puppet at Scale using Terraform & ECS
5
TERRAFORM
 Infrastructure as a Code
 Execution plans
 Resource graph
 Change automation
 Open Source
 Strong community
 Enterprise support
https://github.com/hashicorp/terraform
Alternatives to Terraform
6Puppet at Scale using Terraform & ECS
CloudFormation
Tied to AWS Not made for that
7
ECS
 Container management service
 Highly scalable
 Highly available
 Managed through AWS SDK/API/CLI
 Maintained by AWS
Alternatives to ECS
8Puppet at Scale using Terraform & ECS
GO AHEAD!
Why?
9
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
10Puppet at Scale using Terraform & ECS
Why not masterless ?
11
So why then ?
12
Because we can!
13
The love of the sport!
14
SPEED!
15
16
0
100
200
300
400
500
600
ECS EC2
seconds
17Puppet at Scale using Terraform & ECS
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.
How?
18
First things first!
19
The Puppet Code
20Puppet at Scale using Terraform & ECS
One step at a time!
21
The Certificate Authority
22Puppet at Scale using Terraform & ECS
The Puppet Server
23Puppet at Scale using Terraform & ECS
The Puppet DB
24Puppet at Scale using Terraform & ECS
The puppetboard
25Puppet at Scale using Terraform & ECS
PuppetDB
Assembling the pieces together
26
27
And there it is..
28
SHOWTIME!
(time to pray the demo gods)
29
30
Room for improvement
(a big one!)
31
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
32Puppet at Scale using Terraform & ECS
Change scheduler
Improve operability
and be cloud
provider agnostic
How could we make it better ?
33Puppet at Scale using Terraform & ECS
That’s it!
34
Time for questions
(and answers if possible..!)
35
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime Visonneau, Trainline

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