Daniël van Gils, Cloud 66
So you’ve already containerized the shit out of your code, broken down monoliths, microserviced the hell out of your app and have run some awesome workloads in your local, dev and test environments. It’s all looking good, but now what?
Running Docker commands is one thing, but maintaining containers in production is a whole other ballgame. So during this talk I’ll show you the REAL wild world of Docker in production. With the added benefit of talking to and observing how over 900 of our customers have been using Docker in production, I’ll be presenting some of these data points and sharing our observations on how to get it right.
My aim? I want to turn the conversation on its head and dispel some of the ‘silver bullet’ assumptions flying around by taking an inside-out approach to building with Docker. The idea is to provide you with a framework for how to get your code into containers, streamline the Docker build flow and avoid common pitfalls when moving from dev to live environments.
Because remember, Docker will NOT, and I repeat, will not solve your bad dev and ops behaviours. So don’t end up with a ‘hot mess’ (more on that later), and attend my talk to get container smart
Docker Inside/Out: The 'Real' Real- World World of Stacking Containers in production
1. The real-realworld of stacking
containers in production.
@foldingbeauty // www.cloud66.com
broadcast
live from
cold Russia
title has changes from: how the hell do I run my microservices in production and will it scale.
2. developer advocate
50% of my time I spend building, shaping, creating darlings, killing darling a SaaS product to make deploying of container easy for everyone.
50% of my time I’m thinking, researching, talking, educating our customers and trying to understand the ecosystem(s) of containers, microservices and the world of
cloud native. making sense of it all.
3. hero’s container journey
Joseph Campball - The Hero with a thousand faces
It describes the typical adventure of the archetype called the Hero, the persoen who goes out and achieve great deeds on behalf of the group.
12 stages - my presentation follow the hero’s journey outline.
4. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2 call to adventure
2
3 refusal of the call
3
4 meeting the mentor
4
you can’t run containers in production from day one, you need to take the journey.
it’s a bumpy road. an transition from the ordinary IT world into the very special container world en bring back the exlixir to move the business forward into the (un)known
cloud native territory.
1) give hero a context, some kind of itch is pulling him in a different direction giving him stress.
2) something shakes up the situation.
3) won’t embrace change. change it scary. maybe somebody express the uncertainty
4) come across a seasoned traveler of the world. (for example speakers talking today)
5. follow
the
heart
mentor note
a mentor, like me, gives your an arctifact to bring with you on this journey. the artichoke.
the sweet spot is the heart of the artichoke. to get to the sweet spot (or understand the heart) you need to peel all layers. what drives us?
6. dev
ops
people
artichoke model
business
follow
the
heart
Ɨ
some layers of dev = tools, programming languages, design patterns, frameworks, github resources
the heart of dev = building the right, elegant, performant code.
some layers of ops = programmable infrastructure, performance tests, servers, networking, security.
the heart of ops = deploying the code in a controlled manner and keep it performant and stable.
some layers of business = cost saving, adding value, metrics, return of investment
the heart of business = run and give the right services to the people with a margin.
some layers op people = human-like software, helping them, solving problems, work together,
the heart of people = consume the services the way they want it with out barriers.
to quote Marshall McLuhan : The medium is the message -> The container is the message.
When you want to embrace change in your company you need a medium. The container/microservice is an elegant message.
7. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2
2
3
3
4
4
5 crossing the threshold
5
in the end of act one…we understand to find the right message and getting our questions answered. The hero leave the ordinary world behind and start his journey in the
very special container world. He already overcome some hurdles.
8. containerizationmachine
Ɨ
Ǹ
ƗƗ
let start with the first thing you encounter.
the containerizartion machine.
the proces to get your service from idea to production is to start with the heart of the message. the container. this has to me a smooth process…you need your team to
make this happening.
9. FROM base
RUN update + setup
COPY source-code
RUN create + cleanup
CMD run code
very clever kernel stuff
container
small introduction to containers.
1) we share the kernel (and this is very complicated and clever stuff)
2) we run an isolated proces (your services) inside a container
3) how to run your proces is defined in an image —> dockerfile
10. think global, act local
mentor note
the mentor steps in. a lot of customers don’t want to spend time understanding the Dockerfile format and how powerful it is. the want to skip the line. don’t. act local
(make your containers work on your local machine) before deploying it anyway (think global).
12. less is more
mentor note
before the big battle (running something in production) you need to slow down. less is more. focus on the minimal set of what your container needs to run smoothly in
production.
13. “I didn't have time to create a slim image,
so I created a fat one instead.”
shortcuts are evil
“I didn't have time to create a slim image,
so I created a fat one instead.”
shortcuts are evil.
lots of customers are just throwing everything inside a container but have no idea how it behaviours in production.
let’s make my point.
14. Ɨ
Ǹ
ƗƗ Ɨ=
containerizationmachineyou can’t polish a turd
container won’t solve your bad code/ops/business descions. if you put shit in - it will be shit out.
you can’t make something more beautifal, or engineer you way out of a hot mess.
you can’t polish a turd.
15. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2
2
3
3
4
4
5 crossing the threshold
57 approach
7
6 tests, allies, enemies
6
let’s prepare for those major challenges we talked about. the hero, his team and new allies has to face the truth.
16. k.i.s.s.s.s.s.s.s to get it right!
mentor note
keep it simple stupid (we already abstract away a lot of complex stuff already..don’t make it more complex)
becomes keep images
SLIM
SECURE
SPEEDY
STABLE
SET
stupid.
17. SLIM
SECURE
SPEEDY
STABLE
SET
we want from a fat image to a slim image.
slim = remove the things you don’t need
secure = update to the latest security updates and remove secrets
speedy = follow best practices how to deploy your code in production, performance test
stable = lock downstream base image, lock run time depedencies, has to be the same in all environments
set = make it unmuttable. don’t mess around with stuff like volumes and databases inside containers (yet)
18. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2
2
3
3
4
4
5 crossing the threshold
5
6
6
8
ordeal, death and rebirth
8
7 approach
7
the big battle begins. the central space. PRODUCTION!
the moment of death comes new life.
it’s still a playground to learn
22. container nursery platform
to take of your microservice and becoming cloud native you need a lot of ingredients.
again a collaboration between all team members (ops/dev/business/people).
23. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2
2
3
3
4
4
5 crossing the threshold
5
6
6
7
7
8
ordeal, death and rebirth
8
9reward
910road back
10
if will bring back the learnings but understand the the urgency and the danger of running containers/microservices in production.
24. headspace
mentor note
let advice of the mentor.
create some headspace to understand all the moving parts and implications.
don’t let everybody shit in your head.
choose your battle.
26. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2
2
3
3
4
4
5 crossing the threshold
5
6
6
7
7
8
ordeal, death and rebirth
8
9
910road back
10
11resurrection
11
in the climax the hero and his team can shine and show off an proof of concept of an actual project in production.
27. ORDINARY
IT WORLD
VERY SPECIAL
CONTAINER
WORLD
1
1
ordinary world
2
2
3
3
4
4
5 crossing the threshold
5
6
6
7
7
8
ordeal, death and rebirth
8
9
910road back
10
12return with elixir
12
11resurrection
11
you made it. you become a microserviced container hero in a bold cloud native world. you you the exilir. go explore the new world… which become the ordinary IT world
soon ;-)
28. hero’s container journey
headspaceartichoke model
less is more
recap: find the hard of your team. message = get the right images for your containers. less is more and give yourself some headspace to make decisions how you
container platform should look like.
29. thank you!
@foldingbeauty // www.cloud66.com
The real-realworld of stacking
containers in production.talk to me
on slack
thank you.