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
CodeDeployを使ったアプリケーションデプロイを考える
Search
toshihirock
September 16, 2015
Technology
0
640
CodeDeployを使ったアプリケーションデプロイを考える
toshihirock
September 16, 2015
Tweet
Share
More Decks by toshihirock
See All by toshihirock
Lambdaを使ってJawsDaysをHackしてみよう!
toshihirock
2
1.8k
保守、運用で使ってみようLambda!
toshihirock
4
1.8k
Jenkinsおじさんと楽しい連携ツールたち
toshihirock
1
2.3k
Other Decks in Technology
See All in Technology
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
フルカイテン株式会社 採用資料
fullkaiten
0
40k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
TypeScript、上達の瞬間
sadnessojisan
46
13k
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Designing for Performance
lara
604
68k
BBQ
matthewcrist
85
9.3k
Being A Developer After 40
akosma
86
590k
Transcript
CodeDeployΛͬͨΞϓϦ έʔγϣϯσϓϩΠΛߟ͑Δ +"846(ΞʔΩςΫνϟઐࢧ෦ $%1ٞձ !UPTIJIJSPDL
ࣗݾհ ɾ@toshihirock ɾAWSۀ͙Β͍ ɾ͖ - CodeDeploy - Podcast - ϫʔϧυτϦΨʔ
ࠓ͞ͳ͍͜ͱ ɾElasticBeanstalk ɾOpsWorks ɾͦͦEC2Θͳ͍ͱ͔ͷ(ECS Lambdaͷஔ͖͑)
͍ٞͨ͜͠ͱ
ΦʔτεέʔϧͷΞϓϦέʔ γϣϯͷσϓϩΠͲ͏ͯ͠·͔͢
ΦʔτεέʔϧͰͷΞϓϦσϓϩΠ ɾҎԼͷ̎ͭʹ͍ͭͯݕ౼͢Δඞཁ͕͋Δ - ࣗಈͰىಈ͢ΔEC2ͷσϓϩΠ - طʹىಈ͍ͯ͠ΔEC2ͷσϓϩΠ
σϓϩΠํ๏ ɾىಈ͢ΔAMIʹσϓϩΠ͓ͯ͘͠ ɾΦʔτεέʔϧ࣌ʹσϓϩΠ ɹ- UserData(shellscript || cloud-init) - AutoScaing LifeCycleHook
- σϓϩΠπʔϧ(Fabric || Capistrano) - Chef || Puppet || Ansible ɹ- ԹΓͷ͋ΔΦϨΦϨεΫϦϓτ - CodeDeploy New!
None
CodeDeploy ɾAWSۘͷσϓϩΠπʔϧɻσϓϩΠ͢Δϓϩάϥϛϯά ݴޠʹ੍ݶͳ͍ ɾ࠷ۙTokyoϦʔδϣϯͰ͑Α͏ʹ ɾಛఆͷλά͘͠ࢦఆͨ͠ΦʔτεέʔϧʹΞϓϦΛσϓ ϩΠͰ͖ΔɻΦʔτεέʔϧͰͷEC2૿Ճ࣌ͷࣗಈద༻Մೳ ɾιʔεS3͘͠GitHub ɾҰͭͷΞϓϦέʔγϣϯʹର͠ɺෳͷڥΛઃఆͰ͖Δ (Production,Dev etc)
ɾಛఆͷϦϏδϣϯʹΕΔ ɾappspec.ymlͱ͍͏ϑΝΠϧʹͲͷλΠϛϯά (CodeDeployಠࣗͷϥΠϑαΠΫϧ)ͰԿΛ͢Δ͔ࢦఆ(࣍ทࢀ র)
version: 0.0 os: linux files: - source: / destination: /var/www/html/WordPress
hooks: ApplicationStop: - location: scripts/stop_server.sh timeout: 300 runas: root AfterInstall: - location: scripts/change_permissions.sh timeout: 300 runas: root ApplicationStart: - location: scripts/start_server.sh timeout: 300 runas: root
FabricCapistranoͱͷҧ͍ ɾϝϦοτ - σϓϩΠ༻αʔόʔ͕ෆཁ - Φʔτεέʔϧ࣌ͷࣗಈద༻ - GUIͰͷૢ࡞͕Ͱ͖Δ ɾσϝϦοτ -
AgentΛEC2ʹΠϯετʔϧ͢Δඞཁ͋Γ - InternetͷΞΫηε͕ඞཁ(VPCΤϯυϙ Πϯτཉ͍͠ʣ
ϘΫϊΧϯΨΤλσϓϩΠ
BlueGreenDeployment
ҰͭͷΦʔτεέʔϧͰͷӡ༻ CodeDeployࣗମʹσϓϩΠதࣦഊ࣌ʹΦʔτεέʔϧ͔Βग़Δػೳͳ͍ͷͰҙɻҎԼࢀরɻ CodeDeployͰͷσϓϩΠࣦഊ࣌σϓϩΠதʹELB͔ΒτϥϑΟοΫ͕ྲྀΕΔͷΛ͙ํ๏ (http://qiita.com/toshihirock/items/b23f44dcd9f07f36bcfc)
·ͱΊ ɾCodeDeployσϓϩΠʹϑΥʔΧεͨ͠ πʔϧͰطଘڥద༻͍͢͠ ɾσϓϩΠࣦഊ࣌ͷڍಈʹ͍ͭͯ༧Ί֬ೝ ͓ͯ͘͠ ɾͬͱྑ͍ํ๏͋ΔΑʂͳͲ͋Εڭ͑ͯ Լ͍͞ɻ
Appendix1 ɾCodeDeployΦʔτεέʔϧద༻࣌ɺ UserData(shell script || cloud-init)ΑΓޙͰ࣮ ߦ͞ΕΔ ɾσϓϩΠΛOneAtTimeͰ࣮ߦ͠ɺࣦഊͨ͠ ߹ʹҎ߱ͷσϓϩΠ࣮ࢪ͠ͳ͍ ɾ࠷৽ͷσϓϩΠ͕ࣦഊͨ͠λΠϛϯάͰΦʔ
τεέʔϧ͕࣮ߦ͞ΕΔͱ࠷৽ͷޭόʔδϣ ϯ͕σϓϩΠ͞ΕΔ
Appendix2 SlackΛͬͯCodeDeploy Heroku+HubotͰCodeDeployͷσϓϩΠΛSlack͔Β࣮ߦ͢Δ (http://qiita.com/toshihirock/items/7598ab59b2c687b77cb6)
Thanks!