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
Elastic Beanstalk + Docker で WordPress / WordPr...
Search
KOMATSU Seiji
June 26, 2018
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elastic Beanstalk + Docker で WordPress / WordPress with Elastic Beanstalk and Docker
LT Lovers 4th の LT 資料です
KOMATSU Seiji
June 26, 2018
More Decks by KOMATSU Seiji
See All by KOMATSU Seiji
非エンジニアでも Git を使えるチームをビルド中
comuttun
0
200
Other Decks in Technology
See All in Technology
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
150
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
140
大型犬好きによるPugの紹介
yamanoku
1
160
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
180
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
190
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
Local CI × GitHub Actions
gogutan
2
190
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Evolving SEO for Evolving Search Engines
ryanjones
0
330
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Rails Girls Zürich Keynote
gr2m
96
14k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Speed Design
sergeychernyshev
33
2.2k
Transcript
ElasticBeanstalk + Docker ElasticBeanstalk + Docker で WordPress で WordPress
Seiji Komatsu (@comuttun) Jun 26, 2018 LT Lovers 4th
自分について 自分について name: Seiji Komatsu id: comuttun company: 株式会社まぐまぐ job:
Backend & Frontend Engineer
TRiP EDiTOR TRiP EDiTOR WordPress で運用している自社メディアサイト
https://tripeditor.com
2018/03 「ジモトのココロ」からリニューアルオー プン
それまで KUSANAGI AMI を EC2 上で稼働 https://kusanagi.tokyo
いくつかの課題があった いくつかの課題があった ※ KUSANAGI の問題ではない
サーバーの構成管理ができていなかった Nginx などの設定を変更するたびに AMI 再作成 テーマファイルのバージョン管理ができていな かった 管理画面から直接修正 ローカル開発環境がなかった Vagrant
でローカル用を作ったものの重量級の ため NFS サーバが SPOF 当時 EFS は東京リージョンに来ていなかった
主に新しく採用した技術 主に新しく採用した技術 Docker ローカルでは docker-compose Elastic Beanstalk Code Commit/Pipeline/Build
Docker イメージ KUSANAGI の設定を参考にしつつ、 wordpress:4.9-php7.2-fpm-alinpe から 作成
Elastic Beanstalk 構成管理ツールとしても利用 Docker コンテナをアプリケーションとしてデ プロイ ECS にしなかった理由 Blue-Green Deployment
を標準でサポートして いる 学習コストを極力抑える
Code Commit/Pipeline/Build Slack のデプロイボットが Backlog Git から pull して Code
Commit に push Code Pipeline が push を検知して Code Build で Docker イメージをビルド Code Build でのビルドが成功したら Elastic Beanstalk に新バージョンのアプリケーション としてデプロイ
工夫したこと 工夫したこと
管理画面の制限 管理画面の制限 Git 管理を徹底するため、管理画面からのテーマ ファイル修正はできないようにした デプロイの自動化 デプロイの自動化 Git にプッシュして Slack
のデプロイボットでデ プロイできるようにした
脱 NFS 脱 NFS NFS サーバが SPOF になることを嫌い、 NFS サー
バレス構成にした。 WP Offload S3 Lite を活用し、画像は CloudFront+S3 でホスティング /wp-content/uplaods に書き込みをするプラ グインの利用は諦めた
困ったこと 困ったこと
Thin-Pool 枯渇問題 Thin-Pool 枯渇問題 コンテナ内で繰り返しファイルの作成と削除を 繰り返すと LVM の Thin-Pool が枯渇し、ファイル
システムに書き込めなくなる docker ps -q | xargs docker inspect --format='{{ .State.Pid }}' | xargs -IZ sudo fstrim /proc/Z/root/ を定期的 に実行するようにした
これから先 これから先
EFS がついに東京リージョンに EFS がついに東京リージョンに 来るので使うことを検討中 来るので使うことを検討中
We're hiring! We're hiring! まぐまぐ!では仲間を募集しています
ご清聴ありがとうございました ご清聴ありがとうございました