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
fluentdサーバをchefで構築するの辛かったけどDockerも別に救世主じゃなかった ...
Search
h3poteto
July 29, 2018
Technology
5.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
fluentdサーバをchefで構築するの辛かったけどDockerも別に救世主じゃなかった / tokyu ruby kaigi 12
fluentdのchefメンテまじで辛い,どうせみんなcookbookとか忘れたでしょ
h3poteto
July 29, 2018
More Decks by h3poteto
See All by h3poteto
EKS on Fargateは最高のJob基盤 / jawsug_bgnr
h3poteto
1
1.1k
Kubernetes上で単発のジョブを実行するkube-jobというツールを作った / kubernetesmeetuptokyo22
h3poteto
6
9.1k
Electronによるアプリケーション開発事情2018 / builderscon2018
h3poteto
9
11k
ECSのサービスをslack botでデプロイする // ecs-goploy
h3poteto
1
6k
まだRailsで消耗してるの?
h3poteto
7
5k
阿澄佳奈と昇竜拳
h3poteto
1
600
Other Decks in Technology
See All in Technology
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
0
1.4k
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
600
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
150
AI時代のAPI品質を支えるガードレール / API Guardrails for API quality in the AI era
yokawasa
1
210
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
4
1.1k
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
330
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
190
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
230
Sigmaで作る業務アプリ
kazushiro_honma
0
110
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
2
420
AI-DLCって実際どう? 〜聞きたいこと全部聞いてみる〜
news_it_enj
0
260
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
420
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
WCS-LA-2024
lcolladotor
0
820
A Modern Web Designer's Workflow
chriscoyier
699
190k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
270
Chasing Engaging Ingredients in Design
codingconduct
0
300
Why Our Code Smells
bkeepers
PRO
340
58k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Automating Front-end Workflow
addyosmani
1369
210k
Transcript
fluentdαʔόΛchefͰߏங͢Δ ͷਏ͔͚ͬͨͲDockerผʹٹ ੈओ͡Όͳ͔ͬͨ @h3_poteto
ࣗݾհ • Akira Fukushimaʢౡ ໌ʣ • github: h3poteto • twitter:
h3_poteto • ࣄɿterraform৬ਓ@scouty
એ
None
None
એऴΘΓ
fluentdαʔόΛchefͰߏங͢Δͷਏ͔ͬ ͚ͨͲDockerผʹٹੈओ͡Όͳ͔ͬͨ ָԂͰ͢ɼࠓ͙͢Dockerʹ͠·͠ΐ͏ @h3_poteto
ղܾࡦ͕Θ͔Βͳ͍ͬͯΛ ͠Α͏ͱࢥͬͯͨͷʹɼ ղܾࡦ͕ݟ͔ͭͬͯ͠·ͬͨ
Έͳ͞Μ ϩάͷूʹfluentd ͬͯ·͢ΑͶʁ
None
͜Εͷ
aggregatorͷfluentdΛ chefͰߏங͍ͯͨ͠
Έͳ͞Μchefͷ͜ͱ ֮͑ͯ·͔͢ʁ
None
chefͭΒ͍ • immutable infra? • ͨ·ʹࣦഊ͢Δ • ΈΜͳ͏cookbookͷϝϯςͯ͠ͳ͍Ͱ ͠ΐʁ
chef-td-agent͋Δ
td-agentͷcookbookͰ yum install͍ͯ͠Δ
ͳͷʹamazon linux ͨ·ʹݹ͍yumϦϙδτϦΛ ফͯ͘͠Δ
͋Δಥવ Կͯ͠ͳ͍ͷʹ ಈ͔ͳ͘ͳΔʂ
fluentd v0.12ܥΛ ӡ༻ͯͨ͠ࠒͷ
td-agentͷґଘʹؒҧ͑ͯ v0.14ܥͷgem͕ࠞೖͨ͠
None
amazon linuxͷyum ฏવͱtd-agent 2.3.5ʹߋ৽ ͞ΕΔ
͔͠2.3.4͕ফ͞ΕΔ
͜ͷޙ1ϲ݄ۙ͘yum v2.3.5ͷ·· ߋ৽͞Εͳ͔ͬͨ
ͯ͢ͷΠϯελϯεͰchef ͷprovision͕ࣦഊ͢Δ
ͭΒ͍
chefࣗମͷόʔδϣϯΞοϓ Λͬͨͱ͖
ࠓ·Ͱrhelͱఆ͞Ε͍ͯͨ amazon linuxɼ৽ͨʹ amazonͱ͍͏ࣝผࢠΛ৽ઃ ͞ΕΔ
platformͷఆΛ͍ͯͨ͠ cookbook͕΄ͱΜͲ͍ ʹͳΒͳ͍
None
ํͳ͍ͷͰҰͭͣͭमਖ਼ͷ Pull Request
͚ͩͲະͩʹϦϦʔε͞Εͯ ͍ͳ͍ͷ͋Δ
None
None
Ͳ͏ͤ͏ΈΜͳcookbook ͷϝϯςͯ͠ͳ͍Ͱ͠ΐ……
ͭΒ͍
࣮͏ΈΜͳDockerͰ ӡ༻ͯ͠Δͷʁ ͔ͩΒchefϝϯς ͯ͠ͳ͍ͷʁ
গͳ͘ͱΞοϓσʔτ chefΑΓසൟ
σϓϩΠ࣌ͷBuffer Ͳ͏͢Μͷʁ ؾʹͳΔͱ͜Ζ……
None
Memory or File ?
Ͳͬͪίϯςφࡴͨ͠Β ফ͑Δ͡ΌΜʂ ͯࢥͬͯͨΜ͚ͩͲ……
flush_at_shutdown
flush_at_shutdown • SIGTERMΛड͚औͬͨͱ͖ʹBufferΛflush • flushྃ·Ͱtd-agent͕͔ͬͯΒऴྃ • buf_memoryͰσϑΥϧτͰ༗ޮ • SIGKILLͷͱ͖ޮ͔ͳ͍
ߟ͑ͯͨ͜ͱ • k8sͷPersistentVolumesͰNFSʢ͘͠ EBSʣΛvolumeϚϯτ͢Δ • k8sͷPreStopͰbufferΛS3ʹΞοϓϩʔυ͢ Δ • fluentdΫϥελ2ܥ౷࡞Δʁ
શ෦͍Βͳ͔ͬͨʂ flush_at_shutdownͰk8sʹ ͦͷ··ͤΕྑ͍ʂ
SIGKILLΛΒ͏ͱ͖͋Δ • td-agentɼtimeoutҎʹflushΒͳ͍ͱऴ ྃ͠ͳ͍ • k8sͷGracePeriodSecondsҎʹίϯςφ͕ ऴྃ͠ͳ͍ͱSIGKILL
͜Εྲྀྔͱͷ݉Ͷ߹͍
ৗʹਖ਼ৗऴྃͰ͖ͳ͍ͷͰ͋ Εɼbufferͷઃఆoutput ͷεϨουΛௐઅͨ͠ํ͕ ͍͍͔
fluentd on Docker ָԂͰ͋Δ
chefΛࣺͯͯDockerʹߦ͜͏