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
650
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.4k
Other Decks in Technology
See All in Technology
MicrosoftのOSSだけでAIによるブラウザテストを構成する
ymd65536
1
220
論文紹介 ”Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG” @GDG Tokyo
shukob
0
230
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
210
大学教員が押さえておくべき生成 AI の基礎と活用例〜より効率的な教育のために〜
soh9834
1
160
Microsoft Ignite 2024 最新情報!Microsoft 365 Agents SDK 概要 / Microsoft Ignite 2024 latest news Microsoft 365 Agents SDK overview
karamem0
0
160
やっちゃえ誤自宅Nutanix
yukiafronia
0
320
データ基盤におけるIaCの重要性とその運用
mtpooh
5
790
ココナラのセキュリティ組織の体制・役割・今後目指す世界
coconala_engineer
0
170
クロスアカウントな RDS Snapshot Export による カジュアルなデータ集約の仕組み / 202501-finatext-technight-lt
wa6sn
1
120
HCP Terraformで実現するPlatform Engineering/nikkei-tech-talk-29
nikkei_engineer_recruiting
0
200
15年入社者に聞く! これまでのCAのキャリアとこれから
kurochan
1
130
プロダクト開発、インフラ、コーポレート、そしてAIとの共通言語としての Terraform / Terraform as a Common Language for Product Development, Infrastructure, Corporate Engineering, and AI
yuyatakeyama
6
1.4k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
170
14k
Optimising Largest Contentful Paint
csswizardry
33
3k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Unsuck your backbone
ammeep
669
57k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
39
1.9k
How to train your dragon (web standard)
notwaldorf
89
5.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Faster Mobile Websites
deanohume
305
30k
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!