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
310
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
110
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
880
20220908_フロントエンドパフォーマンス改善.pdf
kaz29
2
130
PHP製のPodCast配信用WebアプリをReact+Next.jsなSSGで作り直してみた話
kaz29
3
580
バックエンドエンジニアの私がお勧めする SPAフロントエンド開発環境
kaz29
6
6k
201909-PHPCon北海道-PHPでCI_CD.pdf
kaz29
0
3.5k
PHPでもserverless framework!?
kaz29
2
3.3k
PHPでもサーバーレスしたい
kaz29
6
1.9k
ちいさな会社でのAnsible活用事例
kaz29
0
820
Other Decks in Technology
See All in Technology
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
370
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Taming you application's environments
salaboy
0
190
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
130
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
160
Platform Engineering for Software Developers and Architects
syntasso
1
520
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
Can We Measure Developer Productivity?
ewolff
1
150
複雑なState管理からの脱却
sansantech
PRO
1
150
強いチームと開発生産性
onk
PRO
35
11k
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
390
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
97
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Designing the Hi-DPI Web
ddemaree
280
34k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Scaling GitHub
holman
458
140k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
A Philosophy of Restraint
colly
203
16k
Docker and Python
trallard
40
3.1k
Navigating Team Friction
lara
183
14k
Automating Front-end Workflow
addyosmani
1366
200k
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Φεεϝ
࠙ ձ Ͱ օ ͞ Μ Ͳ Μ ͳ
ײ ͡ ͔ ੋ ඇ ฉ ͔ ͤ ͯ͘ ͩ ͞ ͍ ʂ ͓͠·͍