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
fluentdサーバをchefで構築するの辛かったけどDockerも別に救世主じゃなかった ...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
h3poteto
July 29, 2018
Technology
5.1k
0
Share
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
1k
Kubernetes上で単発のジョブを実行するkube-jobというツールを作った / kubernetesmeetuptokyo22
h3poteto
6
8.8k
Electronによるアプリケーション開発事情2018 / builderscon2018
h3poteto
9
11k
ECSのサービスをslack botでデプロイする // ecs-goploy
h3poteto
1
5.8k
まだRailsで消耗してるの?
h3poteto
7
4.9k
阿澄佳奈と昇竜拳
h3poteto
1
550
Other Decks in Technology
See All in Technology
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
230
ネットワーク運用を楽にするAWS DevOps Agent活用法!! / 20260421 Masaki Okuda
shift_evolve
PRO
2
220
EBS暗号化に失敗してEC2が動かなくなった話
hamaguchimmm
2
210
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
5.3k
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
390
LLM時代の検索アーキテクチャと技術的意思決定
shibuiwilliam
3
1.5k
AndroidアプリとCopilot Studioの統合
nakasho
0
120
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
4
1.4k
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.3k
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
150
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
36k
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
250
Featured
See All Featured
How to make the Groovebox
asonas
2
2.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
440
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
510
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
320
Ethics towards AI in product and experience design
skipperchong
2
260
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
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ʹߦ͜͏