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
130
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
920
20220908_フロントエンドパフォーマンス改善.pdf
kaz29
2
130
PHP製のPodCast配信用WebアプリをReact+Next.jsなSSGで作り直してみた話
kaz29
3
590
バックエンドエンジニアの私がお勧めする 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
830
Other Decks in Technology
See All in Technology
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
160
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
AWS re:Invent 2024 ふりかえり
kongmingstrap
0
130
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
1
230
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
160
Featured
See All Featured
Fireside Chat
paigeccino
34
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Gamification - CAS2011
davidbonilla
80
5.1k
Six Lessons from altMBA
skipperchong
27
3.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
The World Runs on Bad Software
bkeepers
PRO
65
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Become a Pro
speakerdeck
PRO
26
5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Building Adaptive Systems
keathley
38
2.3k
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Φεεϝ
࠙ ձ Ͱ օ ͞ Μ Ͳ Μ ͳ
ײ ͡ ͔ ੋ ඇ ฉ ͔ ͤ ͯ͘ ͩ ͞ ͍ ʂ ͓͠·͍