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
Codepipelineの話
Search
Shun Satou
October 03, 2018
Technology
1
720
Codepipelineの話
Shun Satou
October 03, 2018
Tweet
Share
More Decks by Shun Satou
See All by Shun Satou
ソニーでの事例から考えるプラットフォーム開発
shunsato123
4
1.9k
テレビ・レコーダーのバックエンドにおけるCI/CDへの取り組み
shunsato123
4
3.5k
Other Decks in Technology
See All in Technology
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
120
30分でわかるデータ分析者のためのディメンショナルモデリング #datatechjp / 20250120
kazaneya
PRO
10
2.5k
大規模言語モデルとそのソフトウェア開発に向けた応用 (2024年版)
kazato
2
340
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
130
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
240
ハイテク休憩
sat
PRO
2
190
【令和最新版】ロボットシミュレータ Genesis x ROS 2で始める快適AIロボット開発
hakuturu583
2
1.3k
Web APIをなぜつくるのか
mikanichinose
0
1.3k
いまからでも遅くないコンテナ座学
nomu
0
180
「完全に理解したTalk」完全に理解した
segavvy
1
260
ZOZOTOWN の推薦における KPI モニタリング/KPI monitoring for ZOZOTOWN recommendations
rayuron
1
520
C++26 エラー性動作
faithandbrave
2
870
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
940
Building Your Own Lightsaber
phodgson
104
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
How GitHub (no longer) Works
holman
312
140k
Building an army of robots
kneath
302
44k
Visualization
eitanlees
146
15k
Embracing the Ebb and Flow
colly
84
4.5k
Transcript
Codepipelineͷ ιχʔωοτϫʔΫίϛϡχέʔγϣϯζגࣜձࣾ ࠤ౻ॠ 2018.10.3 JAWSUG Yokohama DevOpsLT
୭ʁ ࠤ౻ɹॠ ιχʔωοτϫʔΫίϛϡχέʔγϣϯζגࣜձࣾ ʢ2016ʙʣ ςϨϏϨίʔμʔͷαʔόʔαΠυΛ୲͍ͯ͠·͢
୭ʁ ԣࡏॅͰ͢ ʢԣΞϐʔϧʣ
ஶॻʢڞஶʣ 2015/3 ग़൛ 2016/4 ग़൛ 2018/3 ग़൛ վగ
Codepipeline
ͬͯ·͔͢ʁ
Codepipelineͷར༻ঢ়گ Dev/Staging/ProdͳͲɺશڥ߹Θͤͯ40ຊఔͷPipeline CodePipeline ECS EC2 Lambda Github Dev/Staging Push Dev/StagingGithubΛTriggerʹσϓϩΠ
Codepipelineͷར༻ঢ়گ Dev/Staging/ProdͳͲɺશڥ߹Θͤͯ40ຊఔͷPipeline CodePipeline ECS EC2 Lambda Prod ࣮ߦ ProdखಈͰPipelineΛ࣮ߦ →ެ։ͳͲɺλΠϛϯάΛௐ͢Δඞཁ͕͋ΔͨΊ
ͱ͍͏ײ͡Ͱɺ ͖ͦͦͬͯ͜͜·ͨ͠
ྑ͍ࠔͬͯΔ͜ͱʹ͍ͭͯ TipsͬΆ͘ޠ͍ͬͯ͜͏ͱࢥ͍·͢
Codepipelineͷྑ͍
Codepipelineͷྑ͍ • Sourceͷॊೈੑ • GithubҎ֎ͷSourceΛࢦఆͰ͖Δ • S3ͷτϦΨʔͰͷىಈ͍ॴ͕ଟ͍ • Codepipelineͷෆ෦ΛิͬͯΔ͚ͩͱݴ͑Δ͕ɾɾɾ ʢޙड़ʣ
• ෳͷϦϙδτϦΛInputʹͰ͖Δ • Github ͱ S3ΦϒδΣΫτΛ྆ํInputʹ͢Δ͜ͱͰ͖Δ
Codepipelineͷྑ͍ • JenkinsΛ͑Δʢ͑ͯ͠·͏ʁʣ • طʹBuildDeployͷδϣϒ͕͋Δ߹ɺͦͷ··͑Δ • ͱΓ͋͑ͣɺCodepipelineʹͤͯɺޙͰCodeBuildʹ Ҡ͕͢Ͱ͖Δ ͜Ε͕͋ͬͨͷͰCodepipelineΛબͨ͠෦͕͋Δ Build/DeployͳͲͷ֤࡞ۀJenkinsͰδϣϒԽ͞Ε͓ͯΓɺ
ͦΕͳΓʹ࡞Γࠐ·Ε͍ͯͨͷͰҠߦ͕؆୯Ͱͳ͔ͬͨ
Codepipelineͷྑ͍ • AWSͷଞαʔϏεͱͷ࿈ܞ • CodeBuildɺECSɺCloudFormationɺLambdaͳͲ • ଞͷCI/CDαʔϏεͰɺCLIͰAPIୟ͚͍͍ͷͰɺ ػೳతʹ͜͜ʹେ͖ͳ༏Ґੑͳ͍ͱࢥ͏ • IAMͷೝূճΓͰAccessKey/SecretKeyΛ͞ͳͯ͘
͍͍͘Β͍
Codepipelineͷྑ͍ • CloudWatch EventͰͷPipelineىಈ • GithubͷPushҎ֎ʹ༷ʑͳΠϕϯτͰىಈͰ͖Δ • ࠓͷͱ͜S3͔ͬͯ͠ͳ͍͕ɺଞʹԿ͔͑ͦ͏ͳ ؾ͍ͯ͠Δ
CodepipelineͷࠔΓ͝ͱ
CodepipelineͷࠔΓ͝ͱ • GitͷTagࢦఆͰιʔεΛऔಘͰ͖ͳ͍ • TagࢦఆͰιʔεΛऔΓ͍ͨέʔε͕݁ߏ͋Δ • Dev/StagingͰݕূ͕ऴΘͬͨόʔδϣϯΛ TagͰࢦఆͯ͠σϓϩΠ͢ΔɹɹͳͲ Github CodePipeline
Jenkins S3 TagΛऔಘ Upload JenkinsͱS3ͰͬͯΔ
CodepipelineͷࠔΓ͝ͱ • ύϥϝʔλʔΛࢦఆͯ͠PipelineΛ࣮ߦ͍ͨ͠ • ʢͦͦɺͦͷӡ༻͕ਖ਼͍͔͠ஔ͍ͱ͍ͯʣ • ڥ໊ʢDev/Staging/ProdʣͳͲɺ ύϥϝʔλʔͰ͍ͨ͠ͷ͕͋Δ • S3ʹYAMLΛஔ͍ͨΓɺLambdaͰύϥϝʔλʔΛ
ੜͯ͠ରॲ CodePipeline parameter.yml source
Codepipelineͷ͍উख • ϦϦʔεॳʮ୭͕͏Μͩ…ʯͱ͍͏ҹͩͬͨ • CodeBuildʗLambda࿈ܞ͕ग़ͨ͜ͱʹΑΓɺ PipelineαʔϏεͱͯ͑͠ΔΑ͏ʹͳ͖ͬͯͨ • Ұ൪ͷࠔΓ͝ͱͩͬͨCodeBuildʹҰ͔ͭ͠ ΠϯϓοτΛͤͳ͍ͱ͍͏੍͕͕͋ͬͨɺ ࠷ۙվળ͞Εͨ
• CodeBuild Multi Input Source
CodepipelineΛબ͢Δ͔Ͳ͏͔ • Circle CIGitlab CIͱਅਖ਼໘͔ΒԥΓ߹ͬͨΒ ෛ͚Δͱࢥ͍·͕͢ɺ࠷ݶͳ͍ • AWSͷαʔϏε্Ͱ͑ΔͷɺΓڧ͍ • ϢʔβʔཧίετཧΛAWSӡ༻ͷԆͰͰ͖Δ
• AWSͰӡ༻͍ͯͯ͠ଞͷαʔϏεͬͯͳ͍ͳΒ ࠷ॳͷબࢶʹͳΔ
ൃදҎ্Ͱ͢
Ұॹʹಇ͍ͯ͘ΕΔํืूͯ͠ΔͷͰ ڵຯ͋Εੋඇ͓ئ͍͠·͢ • AWSΨϯΨϯ͍͍ͨ • SREΓ͍ͨ • ιχʔʹؔΘΓ͍ͨ • ςϨϏ͕͖ɹɹɹɹɹɹͳͲ
https://www.gpcareers.sony.co.jp/000/u/job.phtml? job_code=149&company_code=8