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
2019/02/27 PHP勉強会 #135 PHPでCI・CD
Search
Kaz Watanabe
February 27, 2019
Technology
0
300
2019/02/27 PHP勉強会 #135 PHPでCI・CD
Kaz Watanabe
February 27, 2019
Tweet
Share
More Decks by Kaz Watanabe
See All by Kaz Watanabe
PHPCon福岡2024-Azureもなかなかいいですよ.pdf
kaz29
2
65
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
830
20220908_フロントエンドパフォーマンス改善.pdf
kaz29
2
120
PHP製のPodCast配信用WebアプリをReact+Next.jsなSSGで作り直してみた話
kaz29
3
560
バックエンドエンジニアの私がお勧めする SPAフロントエンド開発環境
kaz29
6
5.9k
201909-PHPCon北海道-PHPでCI_CD.pdf
kaz29
0
3.4k
PHPでもserverless framework!?
kaz29
2
3.3k
PHPでもサーバーレスしたい
kaz29
6
1.8k
ちいさな会社でのAnsible活用事例
kaz29
0
790
Other Decks in Technology
See All in Technology
Dive Deep in Cloud Run: Automatic Base Image update
aoto
PRO
0
900
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
9.3k
開発者体験を意識した開発チームの生産性向上の取り組み
ham0215
3
650
Azure SQL Database Hyperscale HA レプリカの監視
sansantech
PRO
0
190
いまからでも遅くない! コンテナでWebアプリケーションを 動かしてみよう(1)Gitハンズオン
nomu
0
280
強いチームを夢見て-PMからSREに転身して1年の振り返り / 20240906_bengo4_sre
bengo4com
1
750
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
0
13k
エンジニア採用を起点に取り組む組織の改善活動と課題、中長期のタスク管理/ #HRmethod
nishiuma
4
3.3k
Estrategias de escalabilidade para projetos web
jessilyneh
1
150
[RSJ24] Task Success Prediction for Open-Vocabulary Manipulation Based on Multi-Level Aligned Representations
keio_smilab
PRO
0
220
データウェアハウス製品のSnowflakeでPythonが動くって知ってました?
foursue
1
150
FastlyとfalcoでNode.jsレスな Webサーバー構築 : IPTV版 ABEMAアプリインフラ刷新 / Building web server using Fastly and falco without Node.js for IPTV ABEMA app
nodaguti
0
240
Featured
See All Featured
How GitHub Uses GitHub to Build GitHub
holman
472
290k
Automating Front-end Workflow
addyosmani
1365
200k
Visualization
eitanlees
142
15k
The Language of Interfaces
destraynor
153
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
27
1.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.1k
Agile that works and the tools we love
rasmusluckow
327
20k
YesSQL, Process and Tooling at Scale
rocio
167
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.4k
A Philosophy of Restraint
colly
202
16k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Transcript
@ k a z _ 2 9 2 0 1
9 / 2 / 2 7 @ p h p ษ ڧ ձ # 1 3 5 P H P Ͱ C I / C D ʙ ࠷ ۙ ͜ Μ ͳ ײ ͡ Ͱ ͬͯ · ͢
W H O ? ลҰ(@kaz_29) גࣜձࣾϋʔτϏʔπ ։ൃࣄۀ෦ WebΞϓϦέʔγϣϯͷ։ൃ iOS/AndroidΞϓϦέʔγϣϯͷ։ൃ ΫϥυΠϯϑϥͷߏஙɾӡ༻
None
P o d c a s t ࢝ Ί ·
͠ ͨ ʂ #hbsakaba
– J O H N N Y A P P
L E S E E D “we are hiring”
C I / C D
C I / C D • CI - Continuous Integration
• ܧଓతΠϯςάϨʔγϣϯ • CD - Continuous Delivery • ܧଓతσϦόϦʔ
“CI/CD1ͭͷٕज़Λࢦ͢ͷͰͳ͘ɺιϑτ ΣΞͷมߋΛৗʹςετͯࣗ͠ಈͰຊ൪ڥʹ ϦϦʔεՄೳͳঢ়ଶʹ͓ͯ͘͠ɺιϑτΣΞ։ ൃͷख๏”
Q u e s t i o n ? C
I / C D ࣮ ફ ͯ͠ ͍ Δ ํ
ग़ ձ ͍
2 0 1 2 / 1 1 / 0 3
None
https://www.ryuzee.com/contents/blog/6102 https://slide.meguro.ryuzee.com/slides/59
࣮ ફ ͠ ͨ • 2012-10-01 - CakePHP2࣮ફೖ͕Ͱ·ͨ͠(deployͷষΛॻ͍ͨ) • http://kaz29.hatenablog.com/entry/2012/10/01/100150
• 2012-10-30 - ࠓ࣌ͳCakePHPͰͷ։ൃڥʂʁ • http://kaz29.hatenablog.com/entry/2012/11/30/173424 • 2013-04-30 - ʮCIΛؒ·Θͯ͠Έͯʯͱ͍͏͓ͰLTΛ͖ͯ͠·ͨ͠ • http://kaz29.hatenablog.com/entry/2013/04/30/122642 • 2013-04-30 - ʮCakePHPͰֶͿܧଓతΠϯςάϨʔγϣϯʯ- CakePHPΛͬͯܧଓ తΠϯςάϨʔγϣϯΛ࣮ફ͢Δͳ͕ΕΛղઆͨ͠ॻ੶͕ग़൛͞Ε·͢ • http://kaz29.hatenablog.com/entry/2014/09/03/095358
None
C I / C D ڥ ͷ ม ભ
/ ; Γ ͔͑Γ
# 1
# 1 • Jenkins • εςʔδϯάαʔόʹ͍͋ͷΓ • ઐ༻CIαʔό • Capistrano2
• εςʔδϯάࣗಈߋ৽ • ։ൃڥ • Mac্ͷApache/PHP
# 2
# 2 • CircleCI(v1) • UnitTest • Capistrano • ࣗಈσϓϩΠͬͯͳ͍
• ։ൃڥ • Vagrant (+Chef)
# 3
# 2 • CircleCI(v1) • UnitTest • dockerԽ • Ansistrano
• ࣗಈσϓϩΠͬͯͳ͍ • ϓϩϏδϣχϯάͱಉ͡πʔϧ • ։ൃڥ • Vagrant+Ansible • Docker
# 4 ʙ N O W
# 4 ʙ N O W • AWS CodePipeline •
Azure DevOps
A W S C o d e P i p
e l i n e
A W S C o d e P i p
e l i n e • Docker imageͷbuild • ECRͷPush • Deploy • ECS(Fargate)ͷB/G deploy • खಈapproveͰB/GΛswap
S A M P L E AWS CodePipeline + ECS
Fargate
S a m p l e https://github.com/aws-samples/ecs-blue-green-deployment/tree/fargate
A W S C o d e P i p
e l i n e
A W S C o d e P i p
e l i n e
A W S C o d e P i p
e l i n e https://docs.aws.amazon.com/ja_jp/codebuild/latest/userguide/sample-docker.html buildspec.yml sample
A z u re D e v O p s
A z u re D e v O p s
• Visual Studio Team ServicesʢVSTSʣΛϦϒϥϯυͯ͠࠶ߏஙͨ͠αʔϏε • ։ൃऀ5໊·ͰແྉͰ͑Δ(10Ϣʔβ ¥3,360/݄) • Ұݸͷδϣϒ (1,800/݄·Ͱ) • ͔ΜΜϘʔυ • GitϦϙδτϦແ੍ݶ(Githubͱ࿈ܞՄೳ) • ؔऀແ੍ݶ(ϦϙδτϦݟΕͳ͍) • Visual Studio αϒεΫϥΠόʔΧϯτ͞Εͳ͍
A z u re D e v O p s
• Azure Boards -> ͔ΜΜϘʔυ • Azure Pipelines -> CI/CDͷ࣮ߦϓϥοτϗʔϜ • Azure Repos -> Git ϦϙδτϦ • Azure Test Plans -> ୳ࡧςετ(?) • Azure Artifacts -> ύοέʔδϦϙδτϦ
A z u re D e v O p s
• Git repository • ͔ΜΜϘʔυ • Build pipeline • UnitTest • Docker imageͷbuild • ACRͷpush • AKSͷB/G deploy • खಈapproveͰGreenΛstage
S A M P L E Azure DevOps + Azure
Kubernetes Service(AKS)
S a m p l e
A z u re D e v O p s
A z u re D e v O p s
A z u re D e v O p s
A z u re D e v O p s
A z u re D e v O p s
A z u re D e v O p s
· ͱ Ί
· ͱ Ί • CI/CDڥͷӡ༻݁ߏେม • ࡞Γͬͺͳ͠ʹ͢Δͱࢮ͵ • ཁ݅తʹڐ͢ͳΒSaaSָ͕ •
Ϋϥυϕϯμඪ४ͷͷΛ͏ͱศར • ݸਓతʹAzure DevOpsΦεεϝ
࠙ ձ Ͱ օ ͞ Μ Ͳ Μ ͳ
ײ ͡ ͔ ੋ ඇ ฉ ͔ ͤ ͯ͘ ͩ ͞ ͍ ʂ ͓͠·͍