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.3k
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
30座EKS, 180次升級淬煉的EKS Upgrade Skill 的歷程
eric8230
0
170
あけおめLINE 傾向とその対策
nasa9084
0
110
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
9
3.8k
AI時代、データエンジニアが一番おもろい
genshun9
0
650
データ_AIの事業の勝敗をわけるもの
nek0128
1
410
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
AI de Idea
kawaguti
PRO
2
120
人間はどの意思決定を手放せるのか
kawasima
15
7.1k
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
1
160
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
120
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
160
Railsのように考える: See through the Master
snoozer05
PRO
4
980
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
740
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
510
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
320
We Are The Robots
honzajavorek
0
380
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
How to build a perfect <img>
jonoalderson
1
6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
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ʹߦ͜͏