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
The DShell Pattern (DevOpsDays London 2019)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
David McKay
September 27, 2019
Technology
0
220
The DShell Pattern (DevOpsDays London 2019)
David McKay
September 27, 2019
Tweet
Share
More Decks by David McKay
See All by David McKay
The Telegraf Toolbelt (InfluxDays SF, 2019)
rawkode
0
170
Cloud Native Telegraf - Cloud Native London (September 2019)
rawkode
0
84
Developing Your Own Flux Packages (InfluxDays London 2019)
rawkode
0
130
Introduction to Time Series (Software Circus, April 2019)
rawkode
0
150
Introduction to Time Series (Cloud Native Kraków, April 2019)
rawkode
0
100
Introduction to Time Series (Cloud Native Wales, April 2019)
rawkode
0
99
Introduction to InfluxDB 2.0 (Kubernetes London - February 2019)
rawkode
0
90
Kickass Development Environments with Docker (PHPBenelux 2019)
rawkode
0
140
LaraconEU 2018 - Kickass Development Environments with Docker
rawkode
2
350
Other Decks in Technology
See All in Technology
Introduction to Bill One Development Engineer
sansan33
PRO
0
350
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Deno・Bunの標準機能やElysiaJSを使ったWebSocketサーバー実装 / ラーメン屋を貸し切ってLT会! IoTLT 2026新年会
you
PRO
0
140
Claude Codeベストプラクティスまとめ
minorun365
53
30k
BiDiってなんだ?
tomorrowkey
2
510
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
200
VRTと真面目に向き合う
hiragram
1
520
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
4
600
「全社導入」は結果。1人の熱狂が組織に伝播したmikanのn8n活用
sota_mikami
0
590
しろおびセキュリティへ ようこそ
log0417
0
200
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
320
MySQLのJSON機能の活用術
ikomachi226
0
120
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
190
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
570
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Crafting Experiences
bethany
1
43
YesSQL, Process and Tooling at Scale
rocio
174
15k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
61
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
87
Technical Leadership for Architectural Decision Making
baasie
1
230
Done Done
chrislema
186
16k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
The DShell Pattern DevOps Days London, 2019
David McKay ➔ Developer Advocate for InfluxData ➔ Kubernetes Release
Team ➔ Tweets @rawkode ★ Scottish ★ Lover of esoteric programming languages ★ Likes symmetry
BREAKING NEWS Some* developers don’t want to use Docker *
No developer with macOS wants to use Docker
Docker is useful Encapsulated Dependencies Documented Build Process Deployable
3 Components Dockerfile Docker Compose Makefile
Dockerfile Make it work for all environments
Dockerfile FROM elixir:1.9-alpine AS base FROM base AS development RUN
apk add --update vim git make FROM base AS build RUN make compile FROM base AS production COPY --from=build … ...
Docker Compose Make it as (more) painful as possible (than
normal)
dshell dshell: @docker-compose run \ --rm \ --service-ports \ --user
$UID \ --use-aliases \ --entrypoint=ash \ myapp
Encourage DShell Block Up service: myapp: entrypoint: sh command: echo
Publish Service Ports --service-ports Override Entrypoint --entrypoint=ash
UNPOPULAR OPINION DO NOT use compose syntax v3 in dev
Best Practice Use Depends On depends_on: mongodb: condition: service_healthy 12-Factor
env_file: .env env_file: - .env - .env.secret
Makefile Unify Developers
The Sausage .PHONY: dshell dclean up up: deps @mix run
--no-halt compile: deps @mix compile
up up: @npm run develop @mix test @FLASK_APP=hello flask run
dclean! dclean: @docker-compose down --rmi=local -v
Final API ❏ make dshell [host] ❏ make up [container]
❏ make test | deps | whatever [container] ❏ make dclean [host]
Better Together We’re deploying Docker to production (I hope), so
encourage (not force) it’s usage for local development; make it easy for people to dip their toe in.
VSCode Remotes { "dockerComposeFile": [ "../docker-compose.yml", ], "service": "node", }
Thank You ➔ Follow me on Twitter (@rawkode) ➔ At
the InfluxData booth (I’ve got badges and stickers) ➔ Come speak to me about InfluxDB, Cloud Native, Monitoring, Docker, or Kubernetes