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
710
Codepipelineの話
Shun Satou
October 03, 2018
Tweet
Share
More Decks by Shun Satou
See All by Shun Satou
ソニーでの事例から考えるプラットフォーム開発
shunsato123
4
1.8k
テレビ・レコーダーのバックエンドにおけるCI/CDへの取り組み
shunsato123
4
3.5k
Other Decks in Technology
See All in Technology
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
160
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.7k
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
180
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
170
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
Bash Introduction
62gerente
608
210k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
BBQ
matthewcrist
85
9.3k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Faster Mobile Websites
deanohume
305
30k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Automating Front-end Workflow
addyosmani
1366
200k
Practical Orchestrator
shlominoach
186
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
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