vinli's farm - tooling kubernetes for us lowly developers
TRANSCRIPT
© Vinli 2015
Tooling Kubernetes for us lowly developers
VINLI’S FARM
© Vinli 2015
WHAT DO WE DO?
© Vinli 2015
© Vinli 2015
© Vinli 2015
© Vinli 2015
FOR DEVELOPERSBY DEVELOPERS
© Vinli 2015
Welcome to the Circle-V Ranch
OUR LITTLE FARM
© Vinli 2015
A little backstory
● Our whole company is container-native.● We create 100s of Docker images a day.● 12-Factor app is gospel
© Vinli 2015
A little backstory
● We wanted a developer-friendly App Platform.● Originally deployed on Elastic Beanstalk ● Tried ECS...(for 2-3 days)...yeah...● Moved to k8s over a weekend
© Vinli 2015
Our own Mini Application Platform
● 40-50 apps/services/workers● Across 4 stacks● Based on the k8s primitives● RC and Service “Compiler”● Any pod just has one
requirement○ App/Service - GET /ping○ Worker - health message
{ "name": "vinli-trip-service", "image": "vinli/trip:1.5.2-5276-fb58c5f", "cpu": [0.1982, 0.2949, 0.2167], "mem": 192114688, "time": 1447211794188, "heap": 68562872, "loop": 0.03902798891067505}
© Vinli 2015
Shepherd
POST /api/v1/sheep
{
"sheep": {
"stack":"dev",
"service":"trip",
"version":"1.5.2-5276-fb58c5f"
}
}
POST /api/v1/promotions
{
"promotion": {
"service":"trip",
"from":"dev",
"to": "qa"
}
}
Herding the pods
© Vinli 2015
Foreman
POST /api/v1/workers
{
"worker": {
"queue":"startup",
"name":"startup-worker",
"image":"vinli/startup-worker:1.2.13-662-93eb21a"
}
}
Managing the workers
© Vinli 2015
Farmer
POST /api/v1/apps/ trip/plants
Increases replica count by 1
POST /api/v1/apps/ trips/picks
Decreases replica count by 1
POST /api/v1/apps/ trip/prunes
Delete 1 pod (RC replaces)
POST /api/v1/apps/ trips/burns
Blows away all the pods
Taking the metaphor a bit too far
© Vinli 2015
Butcher
POST /api/v1/jobs
{
“job”: {
“method”: “POST”,
“url”: “//farmer-service/api/v1/apps/trip/prunes”,
“payload”: { … },
“interval”: “1h”
}
}
Culling the herd and other jobs
© Vinli 2015
And other farm animals
● Really simple tooling● Kubernetes is our persistence● But we don’t put persistence on k8s, yet● Eventually Consistent Architecture● Trusting our developers
© Vinli 2015
© Vinli 2015
Powell Kinney@pkinney
Greg Aker@gaker
https://dev.vin.li@vinlidev
© Vinli 2015
THE ROAD AHEAD