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
WordPress を Trellis で管理した話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yusuke Matsuura
December 16, 2017
Technology
940
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WordPress を Trellis で管理した話
九州インフラ交流勉強会(Kixs) Vol.006
Yusuke Matsuura
December 16, 2017
More Decks by Yusuke Matsuura
See All by Yusuke Matsuura
SRE Activities at Nulab
matsuzj
0
200
SRE 本 輪読会 #1
matsuzj
0
1k
サーバ構成管理について
matsuzj
0
180
MySQL 5.1 から Aurora への移行
matsuzj
0
160
Other Decks in Technology
See All in Technology
どんな手を使っても絶対間に合わせるスケジューラ
asari194617
0
1.5k
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
240
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.1k
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
160
AI活用の現在地、 ちゃんと見えてますか?/XPfest-2026
visional_engineering_and_design
0
130
推論の観測、できていますか? 〜 Google Cloud Gemini Enterprise Agent Platformで 3つの Gemini モデルを実測して踏んだ、評価の罠 〜
shukob
PRO
0
140
JAWS-UG初心者支部#88わいわい初心塾(夏休みの宿題やったかGit編)
otsuki
0
120
データエンジニアリングワークショップ:Auto LoaderとSparkで学ぶデータパイプライン構築
databricksjapan
PRO
0
140
分割40%キーボードにスムーズに入門するには
hoto17296
1
230
振り返りこそエンジニアの本領
negima
0
260
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
280
Hub & Spoke 環境のネットワークルーティングを分解してみる
tsuyataku
1
520
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
Fireside Chat
paigeccino
42
4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Speed Design
sergeychernyshev
33
2.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
400
Making Projects Easy
brettharned
120
6.7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
30 Presentation Tips
portentint
PRO
1
390
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Visualization
eitanlees
152
17k
Transcript
WordPress を Trellis で管理した話 Yusuke Matsuura ‒ Nulab Inc. Dec
16, 2017 14:00 ∼ 17:30 九州インフラ交流勉強会(Kixs) Vol.006
自己紹介 ‒ Yusuke Matsuura @matsuzj ‒ Nulab Inc. ‒ Site
Reliability Engineer @Backlog ‒ 趣味は登山・キャンプ ‒ Job ‒ Web サービスの開発/運用を始めて11年ぐらい経ちます ‒ アプリケーションエンジニアからインフラ方面へ ‒ 現在は運用・改善・トラブルシュート等 ‒ Team ‒ 2015年7月から Nulab のインフラ担当としてジョイン ‒ 2016年9月から SRE チームを2名になる ‒ 2017年8月から SREメンバーが追加されて3名体制へ
話すること ‒ Trellis 導入の経緯 ‒ Trellis ついて ‒ Web サイトのインフラ構成など
Trellis 導入の経緯 日本向けのドメイン backlog.jp と 海外向けの backlogtool.com を backlog.com へ統合するプロジェクトが動いています。
Webサイトも backlog.com へ統合することになったの で、コンテンツ管理、インフラ管理を楽になるよう検討 することになりました
None
None
Trellisって何? WordPress をよしなに構成管理してくれるツール Modern LEMP stack ‒ Linux ( Ubuntu
) ‒ Nginx ‒ MySQL ( MariaDB ) ‒ PHP
具体的には何を使っているか ‒ Nginx ‒ MariaDB (MySQL drop‒in replacement) ‒ PHP
7.1 (+ extensions) ‒ Composer ‒ WP‒CLI ‒ sSMTP ‒ Memcached ‒ Fail2ban ‒ ferm (firewall) ‒ Mailhog
ディレクトリ構成は? ̀̀̀shell current/ # Root directory (You can change this
directory name) ├── trellis/ # For Ansible │ ├── nginx‒includes # Include nginx conf https://roots.io/trellis/docs/nginx‒includes/ │ └── templates # Define User template, Require trellis/group̲vars/all/main.yml └── site/ # Directory for website (Bedrock‒based) └── web/ ├── app/ # WordPress content directory (themes, plugins, etc.) └── wp/ # WordPress core (don't touch!) ̀̀̀
開発 ‒ 開発は vagrant up を実行してローカルで動作確認で きます ‒ Ansible の
group̲vars には development, staging, production が定義されている ansible‒playbook server.yml ‒e env=staging ‒u ubuntu ‒ デプロイも簡単です ./bin/deploy.sh staging backlog.com
PHP の extensions 拡張したいんだけど? できます! trellis/group̲vars/all/main.yml に以下を追加するだけ php̲extensions̲custom: php7.1‒yaml: "{{
apt̲package̲state }}"
Nginxで他のサーバにプロキシしたいんだけど? できます! 以下に配置するだけで location の追加ができる trellis/nginx‒includes/domain/*.conf.j2
RDS 使いたいんだけど? できます! trellis/group̲vars/production/wordpress̲sites.yml wordpress̲sites: backlog.com: env: db̲host: rds.us‒east‒1.rds.amazonaws.com
SES 使いたいんだけど? できます! trellis/group̲vars/all/mail.yml # Documentation: https://roots.io/trellis/docs/mail/ mail̲smtp̲server: email‒smtp.us‒east‒1.amazonaws.com:465 mail̲admin:
[email protected]
mail̲hostname: localhost mail̲user: mail̲user mail̲password: "{{ vault̲mail̲password }}" # Disable STARTSSL for Amazon SES ssmtp̲start̲tls: 'No'
ALB 使いたいんだけどヘルスチェックどうすんの? できます! trellis/group̲vars/all/main.yml に以下を追加する https://github.com/roots/trellis/issues/786 nginx̲sites̲confs: ‒ src: no‒default.conf.j2
enabled: false ‒ src: "{{ playbook̲dir }}/templates/default‒elb‒health‒check.conf.site.j2"
所感 ‒ サーバ管理が Ansible なのはいい ‒ 細かい設定・拡張もできる ‒ デプロイもすごく楽
Backlog 歴史的経緯 ‒ 10年の歴史で作られたコンテンツがいっぱいある ‒ すべてWordPress で管理されているわけでなくStatic なファイルがある
Backlog のコンテンツは?
インフラ構成 useast1 public private Target Group backlogcomwebsite Target Group backlogcomwebsitestaging
https://backlog.com/ backlogwebsiteblog backlogwebsite Target Group backlogcomwebsiteworld Target Group backlogcomwebsitedl backlogwebsiteworld