docker inside/out: the real real- world world of stacking containers in production

32
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.

Upload: sonatype

Post on 22-Jan-2018

99 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 2: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 3: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

hero’s container journey

Joseph Campball - The Hero with a thousand facesIt 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.

Page 4: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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 uncertainty4) come across a seasoned traveler of the world. (for example speakers talking today)

Page 5: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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?

Page 6: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

dev

ops

people

artichoke model

businessfollow

the heart

!

some layers of dev = tools, programming languages, design patterns, frameworks, github resourcesthe 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 investmentthe 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.

Page 7: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 8: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 9: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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 container3) how to run your proces is defined in an image —> dockerfile

Page 10: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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).

Page 11: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

ORDINARY IT WORLD

VERY SPECIAL CONTAINER

WORLD

1

1

ordinary world

2

2

3

3

4

4

5 crossing the threshold

5

6 tests, allies, enemies

6

the hero is tested, make new allies and enemies. with the team, himself or the technology.

Page 12: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 13: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

“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.

Page 14: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

"

#

!

$

%

!!!=

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.

Page 15: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 16: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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 SLIMSECURESPEEDYSTABLESETstupid.

Page 17: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

SLIM SECURE SPEEDY STABLESET

we want from a fat image to a slim image.slim = remove the things you don’t needsecure = update to the latest security updates and remove secretsspeedy = follow best practices how to deploy your code in production, performance teststable = lock downstream base image, lock run time depedencies, has to be the same in all environmentsset = make it unmuttable. don’t mess around with stuff like volumes and databases inside containers (yet)

Page 18: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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

Page 19: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

#nofilter reality

mentor note

Page 20: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

microservices 3%

split 7%

api 30% monolith

60%

Page 21: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

ORDINARY IT WORLD

VERY SPECIAL CONTAINER

WORLD

1

1

ordinary world

2

2

3

3

4

4

5 crossing the threshold

5

6

67

7

8

ordeal, death and rebirth

89reward

9

10

as a reward you understand what is needed in production.

Page 22: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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).

Page 23: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

ORDINARY IT WORLD

VERY SPECIAL CONTAINER

WORLD

1

1

ordinary world

2

2

3

3

4

4

5 crossing the threshold

5

6

67

7

8

ordeal, death and rebirth

89reward

910road back

10

if will bring back the learnings but understand the the urgency and the danger of running containers/microservices in production.

Page 24: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 25: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

choose wisely

and choose your container platform wisely.

Page 26: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

ORDINARY IT WORLD

VERY SPECIAL CONTAINER

WORLD

1

1

ordinary world

2

2

3

3

4

4

5 crossing the threshold

5

6

67

7

8

ordeal, death and rebirth

89

910road back

10

11resurrection11

in the climax the hero and his team can shine and show off an proof of concept of an actual project in production.

Page 27: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

ORDINARY IT WORLD

VERY SPECIAL CONTAINER

WORLD

1

1

ordinary world

2

2

3

3

4

4

5 crossing the threshold

5

6

67

7

8

ordeal, death and rebirth

89

910road back

10

12return with elixir

1211resurrection

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 ;-)

Page 28: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

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.

Page 29: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

thank you!

@foldingbeauty // www.cloud66.com

The real-realworld of stacking containers in production.talk to me

on slack

thank you.

Page 30: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

@foldingbeauty // www.cloud66.com

thank you.

Page 31: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

@foldingbeauty // www.cloud66.com

thank you.

Page 32: Docker Inside/Out: The Real Real- World World of Stacking Containers in production

thank you!

@foldingbeauty // www.cloud66.com

The real-realworld of stacking containers in production.talk to me

on slack

thank you.