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
20210323.pdf
Search
nhjglgcm.,xdf
March 23, 2021
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20210323.pdf
nhjglgcm.,xdf
March 23, 2021
Transcript
9 slides
EC2 / Fargate Logging
summary 現状の構成(EC2 + fluentd) から Fargate + α に移⾏するためのロギング構成を検討する
現状の構成 fluentdはEC2起動テンプレートのユーザーデータで設定&プロセス起動 アプリケーションからEBSにファイル出⼒ fluentdで拾って Firehose -> S3 へ。 Athenaでクエリ 起動テンプレートに依存しているためFargateに移⾏できない
MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==BOUNDARY==" --==BOUNDARY== Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash pip3 install awscli curl -L https://toolbelt.treasuredata.com/sh/install-amazon2-td-agent3.sh | sh td-agent-gem install fluent-plugin-s3 td-agent-gem install fluent-plugin-elasticsearch td-agent-gem install fluent-plugin-kinesis td-agent-gem install fluent-plugin-slack aws s3 cp s3://***/fluentd.conf /etc/td-agent/td-agent.conf chown -R td-agent /work/td-agent chown -R td-agent /etc/td-agent
Sidecar pattern
None
ログ出⼒⽅法 ファイル出⼒ 標準出⼒ FireLens
FireLens AWS⽤のfluentbitのイメージを利⽤する Docker build時に設定&ECRにpush FROM amazon/aws-for-fluent-bit:2.12.0 COPY ./extra.conf /fluent-bit/etc/extra.conf
ECS task 定義 { ... "containerDefinitions": [ { "dnsSearchDomains": null,
"environmentFiles": null, "logConfiguration": { "logDriver": "awsfirelens", "secretOptions": null, "options": { "Name": "" } }, ... "image": " メインアプリケーションのコンテナイメージ", ... }, { ... "image": "fluentbit のコンテナイメージ", "startTimeout": null, "firelensConfiguration": { "type": "fluentbit", "options": null }, ... } ], ... }
conclusion FireLens と fluentbit を⽤いた Sidecar pattern による EC2 /
Fargate のロギング構成を 紹介した
More Decks by nhjglgcm.,xdf
See All by nhjglgcm.,xdf
fork, vfork, posix_spawn
thiugfjdkvc
0
300
Delta Lake transaction log protocol
thiugfjdkvc
0
27
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
620
A designer walks into a library…
pauljervisheath
211
25k
Fireside Chat
paigeccino
43
4.1k
What's in a price? How to price your products and services
michaelherold
247
13k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
860
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Paper Plane
katiecoart
PRO
6
55k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Site-Speed That Sticks
csswizardry
13
1.6k