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
runn is a package/tool for running operations f...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ken’ichiro Oyama
May 19, 2022
Technology
1.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
runn is a package/tool for running operations following a scenario. / golang.tokyo #32
https://golangtokyo.connpass.com/event/246982/
Ken’ichiro Oyama
May 19, 2022
More Decks by Ken’ichiro Oyama
See All by Ken’ichiro Oyama
Introducing RFC9111 / YAPC::Fukuoka 2025
k1low
2
5.5k
Design and implementation of "Markdown to Google Slides" / phpconfuk 2025
k1low
1
970
analysis パッケージの仕組みの上でMulti linter with configを実現する / Go Conference 2025
k1low
1
800
Flight recorder at the application layer (NOT the FlightRecoder newly added at Go 1.25) / Fukuoka.go #22
k1low
0
180
ソフトウェア開発におけるインターフェイスという考え方 / PHPerKaigi 2025
k1low
12
6.3k
Parsing HCL/CUE / Fukuoka.go #21
k1low
0
11k
実践 net/http Middleware パターン / Kizuku.go Vol.1
k1low
2
460
Cleanup handling in Go / Go Conference 2024
k1low
7
4.2k
CI/CDがあたりまえの今の時代にAPIテスティングツールに求められていること / CI/CD Test Night #7
k1low
18
12k
Other Decks in Technology
See All in Technology
ADDF - ループエンジニアリングするフレームワークを作ったら/I Didn't Set Out to Build Loop Engineering, But ADDF Did
fruitriin
0
110
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
140
Foxgloveについて 実際にExtensionを開発して公開するまでの話 / About Foxglove: The Story of Developing and Releasing an Extension
ry0_ka
0
200
Genie Ontologyは銀の弾丸かを考える / Is Genie Ontology a Silver Bullet?
nttcom
0
130
Empower GenAI with Agile - あなたのアジャイルが生成AIのバフになる仕組み
hageyahhoo
1
160
Claude Code公式skillで 自分の仕事を少しずつ手放そう!(Claude Code開発ノウハウ大公開スペシャル by クラスメソッド)
kaym
0
120
AI Agent SaaS を支える自社仮想化基盤への挑戦と実運用 / ai-agent-saas-virtualization
flatt_security
2
3.6k
cccccc
moznion
0
1.9k
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
2
3.2k
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
2.5k
Text-to-SQLをAgentCoreで実現し、生成されるSQLの精度を定量的に評価する
yakumo
2
800
Amazon EVS で VCF 9.0 / 9.1 のサポート開始まとめ
mtoyoda
0
290
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
63
55k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
KATA
mclloyd
PRO
35
15k
A better future with KSS
kneath
240
18k
Optimizing for Happiness
mojombo
378
71k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
180
Designing Powerful Visuals for Engaging Learning
tmiket
1
450
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
290
Transcript
runn is a package/tool for running operations following a scenario.
খࢁ݈Ұ / GMO PEPABO inc. 2022.5.19 golang.tokyo #32 1
2
• GoͰAPIαʔόΛ։ൃ͍ͯ͠Δ • ୯ҰͷAPIΤϯυϙΠϯτͷςετͰͳͯ͘ෳͷAPIΤϯυϙΠϯτΛ·͍ͨͩ ςετΛॻ͖͍ͨ • ྫ: ϝʔϧೝূΛؚΜͩαΠϯΞοϓ • ྫ:
γϣοϐϯάΧʔτʢબ͔Βߪೖྃ·Ͱʣ • APIΤϯυϙΠϯτͰσʔλϕʔεૢ࡞͕͋ΔͷͰ͋ΕςετσʔλϕʔεΛ༻ҙ ࣮ͯ͠ࡍʹಡΈॻ͖ൃੜ͢ΔςετΛॻ͖͍ͨ 3 https://github.com/k1LoW/runn ։ൃͷϞνϕʔγϣϯ
• runn ( means "Run N" ) is a package/tool
for running operations following a scenario. • γφϦΦΛYAMLʹॻ͍ͯͦΕΛͬͨςετΛ࣮ߦͰ͖Δύοέʔδ/πʔϧ • ࣮ͷ͋ΔΑ͘ΒΕ͍ͯΔπʔϧͱͯ͠ https://github.com/zoncoen/scenarigo ͕͋Δ • ಛͱͯ͠ҎԼͷ௨Γ • γφϦΦ࣮ߦͷCLIίϚϯυʢπʔϧʣͱͯ͠༻Ͱ͖Δ • GoͷTest Helperʢύοέʔδʣͱͯ͠༻Ͱ͖Δ • γφϦΦϑΝΠϧͷϑΥʔϚοτ͕OpenAPI SpecϥΠΫ • γφϦΦͷεςοϓؒͷͷ࿈ܞ͕ߟྀ͞Ε͍ͯΔ 4 https://github.com/k1LoW/runn runn
• runn࠷ऴతʹ1ͭҎ্ͷγφϦΦΛ࣮ߦͯ͠ɺͦΕͧΕͷޭ/ࣦഊΛΈΔ • γφϦΦ1ͭҎ্ͷεςοϓ͔Βߏ͞Ε͍ͯΔ • 1γφϦΦ1YAMLϑΝΠϧʹͳ͍ͬͯΔʢRunbookͱݺΜͰ͍Δʣ • γφϦΦ͝ͱʹRunnerͱݺΜͰ͍Δεςοϓ࣮ߦίϯϙʔωϯτΛఆٛ͠ɺͦͷRunnerΛ֤ͬͯ εςοϓΛ࣮ߦ͍ͯ͘͠ •
RunnerʹγφϦΦʹఆ͕ٛඞཁͳ௨ৗͷRunnerͱɺطʹrunnͰ༻ҙ͍ͯ͠ΔBuilt-in runnerͷ2 छྨ͕͋Δ • Runner: HTTP Runner, DB Runner • Built-in runner: Exec runner, Test runner, Dump runner, Include runner, Bind runner 5 https://github.com/k1LoW/runn ΞʔΩςΫνϟ
6 γφϦΦʢRunbookʣΛॻ͘
7 https://github.com/k1LoW/runn
8 https://github.com/k1LoW/runn
9 https://github.com/k1LoW/runn
10 https://github.com/k1LoW/runn
11 https://github.com/k1LoW/runn
12 https://github.com/k1LoW/runn
13 https://github.com/k1LoW/runn
14 https://github.com/k1LoW/runn
15 https://github.com/k1LoW/runn
• runnTest helperͱͯ͠༻͢Δͱ͖ɺγφϦΦʹఆٛͯ͠ΔRunnerΛࠩ͠ସ͑Δ͜ͱ͕Ͱ͖Δ • HTTP RunnerͷϦΫΤετઌΛ httptest.Server ͷURLʹͨ͠Γ • http.HandlerΛͯ͠
http.Handler ʹϦΫΤετΛ͢Α͏ʹͨ͠Γ • DB RunnerͷΫΤϦ࣮ߦઌΛผͷςετσʔλϕʔεʹͨ͠Γ 16 https://github.com/k1LoW/runn Test helperͱͯ͠ͷརศੑΛ্ͤ͞Δ (1/2)
17 https://github.com/k1LoW/runn As a test helper using httptest.Server
18 https://github.com/k1LoW/runn As a test helper with http.Handler
• γφϦΦࣗମ͕ؒҧ͍ͬͯͳ͍Α͏ʹ͢Δͱͯ͠HTTP Runnerͷ߹ɺεΩʔϚʹԊͬͨόϦ σʔγϣϯΛಉ࣌ʹΒͤΔΈΛఏڙ͍ͯ͠Δʢݱࡏ OpenAPI Spec v3ͷΈରԠʣ • ʮͦͦͦͷγφϦΦͷϦΫΤετ͕ؒҧ͍ͬͯΔʯΛ͙ •
͍ͭͰʹʮϨεϙϯε͕ؒҧ͍ͬͯΔʯݟ͚ͭΔ 19 https://github.com/k1LoW/runn Test helperͱͯ͠ͷརศੑΛ্ͤ͞Δ (2/2)
͓ΘΓʹ 20
• ·͍ͩ࢝Ί͔ͨΓ͕ͩɺݸਓతʹେ͖Ίͷςετ͕ΧδϡΞϧʹॻ͖͘͢ ͳͬͨͱײ͍ͯ͡Δ • σʔλϕʔεͷΛ༻ͨ͠ςετ͕ॻ͚Δͷ͕Τά͍͕ศར • ࠓճհ͍ͯ͠ͳ͍Include runnerBind runnerͳͲʹڵຯ͕͋Δํ README
Λ ͝ཡ͍ͩ͘͞ • ࠓޙͷలͱͯ͠ɺgRPCରԠΛͯ͠Έ͍ͨ 21 https://github.com/k1LoW/runn ͓ΘΓʹ
ࣗݾհ ٕज़෦ɹٕज़ج൫νʔϜ 2018 த్ೖࣾ খࢁ ݈Ұ Ken’ichiro Oyama গ࣮͠༻తͰখ͞ͳOSSΛॻ͘ͷ͕झຯɻ •
GitHub : k1LoW • Twitter : @k1LoW 22 We are hiring!! @pb_recruit
Thank You! Thank You! 23
24 ͓·͚
• github.com/k1LoW/duration • “3 days 4 hours” Έ͍ͨͳจࣈྻ͔Β time.Duration Λੜ͢Δ
• github.com/k1LoW/expand • YAMLϑΝΠϧʹҰׅͰ os.ExpandEnv Λద༻ͨ͠Γ͢Δͷʹ༻͍ͯ͠Δ 25 ͓·͚ runnͷgo.modʹ͍ΔΦϨΦϨϥΠϒϥϦ2બ