Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Digdag x Dockerでモダンなバッチ処理環境を構築
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
morizyun
June 09, 2017
Programming
27k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Digdag x Dockerでモダンなバッチ処理環境を構築
http://morizyun.github.io/digdag/
に入門記事を書きましたのでよければこちらも読んでみてください!
morizyun
June 09, 2017
Transcript
15 slides
Digdag x Dockerでモダンな バッチ処理理環境を構築 twitter: @zyunnosuke blog: http://morizyun.github.io
今⽇日⾔言いたいこと • Treasure DataのOSS「Digdag」の紹介 • DigdagとDockerを組み合わせてバッチ環境を構築 • 感想は環境構築はちょっと苦労。けど使いこなせば便便利利
Digdagって何? • Digdag = ワークフローエンジン • ワークフローエンジン = 順番に予め定義した処 理理を実⾏行行していく仕組み
Digdagの概要 • タスクをYAML(.dig) ベースで定義 • 依存関係のあるタスクや、並列列でのタスク実⾏行行を定 義できる(バッチ間の依存を可視化) • Dockerベースでタスクを実⾏行行できる •
gitでバージョン管理理やコードレビューできるので ソフトウェア開発のプラクティスが使える
ワークフローの定義(YAML) _export: foo: 1 !include : 'config/mysql.dig' _error: sh>: tasks/runs_when_workflow_failed.sh
+step1: sh>: tasks/shell_sample.sh +step2: rb>: MyWorkflow.step2 ← Linuxのexportみたいなの ← エラー時の通知 ← タスク ← Rubyのコードを実⾏行行(要require)
柔軟なタスクの定義 • `if>:` 条件を満たす場合のみ実⾏行行 • `s3_wait>:` AWS S3にファイルが設置されるのを待 つ •
`pg>:` PostgreSQLでSQLを実⾏行行します • `bq>:` BigQueryでクエリを実⾏行行して結果をテーブル に保持
スケジュール実⾏行行もできる timezone: Asia/Tokyo schedule: minutes_interval>: 1 +current_date: sh>: echo `date`
← cron形式も可能 ← タイムゾーン
Docker ベースで実⾏行行できる • Dockerベースでお望みの環境で処理理を実⾏行行できる _export: docker: image: ubuntu:14.04 +step1: py>:
tasks.MyWorkflow.step1 ← Dockerイメージ を指定
グループごとにタスクをまとめる • Topレベルで prepare => analyze => evaluate • `call>:
another_workflow.dig`で他のタスク(dig)を呼び出す
Digdag Server • `digdag push`でサーバにprojectを登録 • 複数台のAgentが必要なタイミングでタスクを実⾏行行
タスクの実⾏行行状況をWeb画⾯面で確認 • 画⾯面からログの確認や、タスク再実⾏行行とかできる
感想 • ワークフローでやりたいことは⼀一通りで きる • 環境構築のコストがそれなりにかかった • 最新バージョン 0.9.12なので、まだまだ PRのチャンス!!
宣伝 • ⼊入⾨門のブログ記事書きました! • http://morizyun.github.io/digdag/
Appendix
デプロイフロー masterにマージ digdag push (タスク実⾏行行) docker run スクリプト郡 Digdagリポジトリ docker
push
More Decks by morizyun
See All by morizyun
履歴書サービスでのLLMを使った機能の事例
morizyun
0
340
個人開発におすすめの Next.js 技術スタック
morizyun
1
1.4k
継続的個人開発のコツ
morizyun
1
62k
GitLab CI x Docker のススメ
morizyun
15
5.3k
Mini-Heroku "Dokku"
morizyun
0
420
Overcommit & Pronto Introduction
morizyun
0
1k
I Enjoyed First English LT @ RedDotRubyConf
morizyun
0
2.1k
Learning Through Blogging: Ruby Blogging Benefits
morizyun
0
1k
英語で広がるRubyの世界
morizyun
4
2.4k
Other Decks in Programming
See All in Programming
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
300
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
440
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
400
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
120
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
330
Getting Started with Vibe Coding
miccheng
0
250
Skills Are the New npm [AAIF Bengaluru]
shivamsaraswat
0
120
エージェントの管理もエージェントに – herdr-core と自作バックログで作る司令塔 –
nearme_tech
PRO
1
110
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
230
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
130
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.4k
So, you think you're a good person
axbom
PRO
2
2.3k
Navigating Team Friction
lara
192
16k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
610
Leo the Paperboy
mayatellez
11
2.5k
The Curse of the Amulet
leimatthew05
4
17k
Become a Pro
speakerdeck
PRO
31
6.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
440