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
140
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
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
150
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
180
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
3.2k
comilioとCloudflare、そして未来へと向けて
oliver_diary
6
430
コロプラのオンボーディングを採用から語りたい
colopl
5
920
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
220
OPENLOGI Company Profile for engineer
hr01
1
18k
30分でわかるデータ分析者のためのディメンショナルモデリング #datatechjp / 20250120
kazaneya
PRO
21
4.7k
【JAWS-UG大阪 reInvent reCap LT大会 サンバが始まったら強制終了】“1分”で初めてのソロ参戦reInventを数字で振り返りながら反省する
ttelltte
0
120
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
350
OPENLOGI Company Profile
hr01
0
58k
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
150
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
950
A better future with KSS
kneath
238
17k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Scaling GitHub
holman
459
140k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
Mobile First: as difficult as doing things right
swwweet
222
9k
Bash Introduction
62gerente
610
210k
Code Review Best Practice
trishagee
65
17k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
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Φεεϝ
࠙ ձ Ͱ օ ͞ Μ Ͳ Μ ͳ
ײ ͡ ͔ ੋ ඇ ฉ ͔ ͤ ͯ͘ ͩ ͞ ͍ ʂ ͓͠·͍