Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ContainerCon North America – Cloud Anti-Patterns
Search
Casey West
August 23, 2016
Technology
3
3.2k
ContainerCon North America – Cloud Anti-Patterns
Casey West
August 23, 2016
Tweet
Share
More Decks by Casey West
See All by Casey West
Voxxed Days Belgrade 2017: Deploying Image Recognition with TensorFlow and Kubernetes
caseywest
0
130
TechSummit Amsterdam 2017: Enhance! Deploying Image Recognition with TensorFlow and Kubernetes
caseywest
0
160
Said no CEO ever: Things that don't matter in the cloud
caseywest
12
3.2k
OperabilityIO 2016 – Achieving Cloud-Native Operability
caseywest
0
550
Abstractions – Pittsburgh – The Twelve-Factor Container + BONUS
caseywest
0
310
Velocity — Minimum Viable Platform
caseywest
0
270
Minimum Viable Platform - Devops MSP
caseywest
0
220
How Platforms Work
caseywest
0
610
Linux Conf Australia 2016 - The Twelve-Factor Container
caseywest
3
560
Other Decks in Technology
See All in Technology
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
250
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
380
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
31k
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
180
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
51
7.3k
Six Lessons from altMBA
skipperchong
27
3.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Why Our Code Smells
bkeepers
PRO
335
57k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Designing for Performance
lara
604
68k
Transcript
Cloud Anti-Patterns @caseywest 1 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
A word about consent… Please do: Take pictures, tweet, take
notes. Please don't: Record or live stream without my explicit consent. 2 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Cloud Anti-Patterns • Twitter @caseywest • Email
[email protected]
• Web
http://caseywest.com 3 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Thanks, Pivotal 4 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Act One The five stages of cloud-native 5 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
The five stages of cloud- native 1. Denial 2. Anger
3. Bargaining 4. Depression 5. Acceptance 6 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Have a seat on the couch 7 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Whatever makes you comfortable 8 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Now for some basic ground rules 9 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Rules We will talk about your delivery pipeline 10 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Rules We will talk about your architecture 11 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
Rules We will talk about your automation 12 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
⏰ 13 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
"Deploying my apps to 'the cloud' is paintful. Why?" 14
! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Denial 15 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Denial Containers are just like tiny virtual machines 16 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Denial We don't need to automate continuous delivery 17 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anger 18 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anger Works on my machine 19 ! @caseywest #containercon #linuxcon
#containers #realworld #sorrynotsorry
Anger Dev is just #YOLO-ing shit to production 20 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Bargaining 21 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Bargaining We crammed this monolith into a container and called
it a microservice 22 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Bargaining "Bi-Modal IT" 23 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
Bargaining What if we create "microservices" that all talk to
the same data source? 24 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Depression 25 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Depression We made 200 microservices and forgot to set up
jenkins 26 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Depression We have an automated build pipeline but release twice
a year 27 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Acceptance 28 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Acceptance All software sucks 29 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Acceptance Respect CAP Theorem 30 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Acceptance Respect Conway's Law 31 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Acceptance Small batch size works for replatforming, too 32 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Acceptance Automate everything 33 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
⏰'s up 34 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
What have we learned? 35 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Cloud-native operability is* 1. Microservices Architecture 2. Devops Culture 3.
Continuous Delivery Pick Any Three * Not always true. 36 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Act Two The twelve-factor container 37 ! @caseywest #containercon #linuxcon
#containers #realworld #sorrynotsorry
You must be this tall to ride this ride 38
! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Audience Participation • Containers? • Schedulers? • Cloud? 39 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Docker Docker Docker Docker Docker Docker Docker Docker 40 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
The factors http://12factor.net 41 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
1: One codebase tracked in revision control, many deploys 42
! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Building separate images for staging and production 43 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Tags for dev and prod 44 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Best Practice Use the environment and/or feature flags 45 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
2: Explicitly declare and isolate dependencies 46 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
2: Explicitly declare and isolate dependencies 47 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Anti-pattern latest 48 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice Declare version numbers of upstream dependencies 49 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice Depend on base images for default filesystem and
runtimes 50 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
3: Store config in the environment 51 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Anti-pattern config.yml 52 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern properties.xml 53 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Hard-coded feature flags 54 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Best Practice This one is literally about environment variables 55
! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice This one is literally about environment variables !
‑ 56 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
4: Treat backing services as attached resources 57 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Local disk 58 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
Anti-pattern Local disk 59 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
Anti-pattern Local disk 60 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
Best Practice Connect to network- attached services using connection info
from the environment 61 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
5: Strictly separate build and run stages 62 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Install on deploy 63 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Best Practice Build immutable images then run those images 64
! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Painfully Obvious Best Practices 1. Eat when hungry 2. Sleep
when tired 3. Book Casey West for speaking gigs 65 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice Respect the lifecycle: build, run, destroy 66 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
6: Execute the app as one or more stateless processes
67 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice Schedule LRPs by distributing them across a cluster
of physical hardware 68 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern NFS 69 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern NFS Need I say more? 70 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
7: Export services via port binding 71 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Best Practice port = Env.fetch(:PORT) 72 ! @caseywest #containercon #linuxcon
#containers #realworld #sorrynotsorry
Best Practice my $port = $ENV{PORT}; 73 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Best Practice private String getPort() { Map<String, String> env =
System.getenv(); return env.get("PORT"); } 74 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice let port = env::var("PORT").unwrap() 75 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
8: Scale out via the process model 76 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice Horizontally scale by adding instances 77 ! @caseywest
#containercon #linuxcon #containers #realworld #sorrynotsorry
9: Maximize robustness with fast startup and graceful shutdown 78
! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
10: Keep development, staging, and production as similar as possible
79 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice Run containers in development 80 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
11: Treat logs as event streams 81 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Random log files #yolo'd all over the file system
82 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Best Practice STDOUT STDOUT STDOUT STDOUT 83 ! @caseywest #containercon
#linuxcon #containers #realworld #sorrynotsorry
12: Run admin/ management tasks as one-off processes 84 !
@caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
Anti-pattern Custom containers for tasks 85 ! @caseywest #containercon #linuxcon
#containers #realworld #sorrynotsorry
Best Practice Reuse application images with specific entrypoints for tasks
86 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
More factors? • API first • Secrets management • Health
metrics • Global distribution 87 ! @caseywest #containercon #linuxcon #containers #realworld #sorrynotsorry
You are now cloud-native 88 ! @caseywest #containercon #linuxcon #containers
#realworld #sorrynotsorry
Repeatability Reliability Resiliency 89 ! @caseywest #containercon #linuxcon #containers #realworld
#sorrynotsorry
@caseywest Let's be friends ! 90 ! @caseywest #containercon #linuxcon
#containers #realworld #sorrynotsorry