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
h3poteto
July 29, 2018
Technology
0
4.3k
fluentdサーバをchefで構築するの辛かったけどDockerも別に救世主じゃなかった / tokyu ruby kaigi 12
fluentdのchefメンテまじで辛い,どうせみんなcookbookとか忘れたでしょ
h3poteto
July 29, 2018
Tweet
Share
More Decks by h3poteto
See All by h3poteto
EKS on Fargateは最高のJob基盤 / jawsug_bgnr
h3poteto
1
920
Kubernetes上で単発のジョブを実行するkube-jobというツールを作った / kubernetesmeetuptokyo22
h3poteto
6
7.9k
Electronによるアプリケーション開発事情2018 / builderscon2018
h3poteto
9
9.5k
ECSのサービスをslack botでデプロイする // ecs-goploy
h3poteto
1
5k
まだRailsで消耗してるの?
h3poteto
7
4.7k
阿澄佳奈と昇竜拳
h3poteto
1
480
Other Decks in Technology
See All in Technology
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
1
120
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
220
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
200
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
GoogleのAIエージェント論 Authors: Julia Wiesinger, Patrick Marlow and Vladimir Vuskovic
customercloud
PRO
0
160
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
180
Godot Engineについて調べてみた
unsoluble_sugar
0
410
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
280
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
12k
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
150
2024AWSで個人的にアツかったアップデート
nagisa53
1
110
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
170
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
It's Worth the Effort
3n
183
28k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Building an army of robots
kneath
302
45k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Music & Morning Musume
bryan
46
6.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Why Our Code Smells
bkeepers
PRO
335
57k
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ʹߦ͜͏