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
David McKay
September 27, 2019
Technology
0
180
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
130
Cloud Native Telegraf - Cloud Native London (September 2019)
rawkode
0
42
Developing Your Own Flux Packages (InfluxDays London 2019)
rawkode
0
120
Introduction to Time Series (Software Circus, April 2019)
rawkode
0
130
Introduction to Time Series (Cloud Native Kraków, April 2019)
rawkode
0
88
Introduction to Time Series (Cloud Native Wales, April 2019)
rawkode
0
79
Introduction to InfluxDB 2.0 (Kubernetes London - February 2019)
rawkode
0
54
Kickass Development Environments with Docker (PHPBenelux 2019)
rawkode
0
92
LaraconEU 2018 - Kickass Development Environments with Docker
rawkode
2
290
Other Decks in Technology
See All in Technology
事前準備が肝!AI活用のための業務改革
layerx
PRO
1
380
watsonx.ai Dojo 環境準備について
oniak3ibm
PRO
0
240
20240912 JJUGナイトセミナー
mii1004
0
140
なぜクラウドサービスで Web コンソールを提供するのか
shuta13
4
2k
プロダクトエンジニアを支えるための開発生産性向上施策
tsukakei
0
140
Creative UIs with Compose: DroidKaigi 2024
chrishorner
1
540
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
110
リアルお遍路+SORACOM IoT
ozk009
1
140
サーバー管理しないサーバーサービスManaged DevOps Pool
kkamegawa
0
130
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
1
930
スタッフエンジニアの道: The Staff Engineer’s Path
snoozer05
PRO
44
14k
不動産 x AIことはじめ~データの真価を拓くために
estie
0
110
Featured
See All Featured
Clear Off the Table
cherdarchuk
91
320k
Building a Modern Day E-commerce SEO Strategy
aleyda
36
6.8k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.6k
Designing for humans not robots
tammielis
248
25k
Fireside Chat
paigeccino
31
2.9k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
36
1.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
166
48k
Writing Fast Ruby
sferik
623
60k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Side Projects
sachag
451
42k
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