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
320
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
150
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
960
20220908_フロントエンドパフォーマンス改善.pdf
kaz29
2
130
PHP製のPodCast配信用WebアプリをReact+Next.jsなSSGで作り直してみた話
kaz29
3
600
バックエンドエンジニアの私がお勧めする SPAフロントエンド開発環境
kaz29
6
6k
201909-PHPCon北海道-PHPでCI_CD.pdf
kaz29
0
3.6k
PHPでもserverless framework!?
kaz29
2
3.3k
PHPでもサーバーレスしたい
kaz29
6
1.9k
ちいさな会社でのAnsible活用事例
kaz29
0
840
Other Decks in Technology
See All in Technology
TSのコードをRustで書き直した話
askua
2
160
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
Building Scalable Backend Services with Firebase
wisdommatt
0
110
Evolving Architecture
rainerhahnekamp
3
260
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
12k
メールヘッダーを見てみよう
hinono
0
110
【JAWS-UG大阪 reInvent reCap LT大会 サンバが始まったら強制終了】“1分”で初めてのソロ参戦reInventを数字で振り返りながら反省する
ttelltte
0
140
comilioとCloudflare、そして未来へと向けて
oliver_diary
6
450
AWS re:Invent 2024 recap in 20min / JAWSUG 千葉 2025.1.14
shimy
1
100
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.5k
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
170
AWSマルチアカウント統制環境のすゝめ / 20250115 Mitsutoshi Matsuo
shift_evolve
0
120
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
96
5.3k
Designing Experiences People Love
moore
139
23k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Thoughts on Productivity
jonyablonski
68
4.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Faster Mobile Websites
deanohume
305
30k
Code Review Best Practice
trishagee
65
17k
Automating Front-end Workflow
addyosmani
1366
200k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Code Reviewing Like a Champion
maltzj
521
39k
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Φεεϝ
࠙ ձ Ͱ օ ͞ Μ Ͳ Μ ͳ
ײ ͡ ͔ ੋ ඇ ฉ ͔ ͤ ͯ͘ ͩ ͞ ͍ ʂ ͓͠·͍