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
Heroku101 Kanazawa
Search
Keiko Oda
June 21, 2014
Technology
2
560
Heroku101 Kanazawa
Heroku101 for Kanazawa.rb #22
Keiko Oda
June 21, 2014
Tweet
Share
More Decks by Keiko Oda
See All by Keiko Oda
Explain EXPLAIN
keiko713
10
3.1k
Exploring Postgres VACUUM with the VACUUM Simulator
keiko713
5
14k
Introduction to Netlify
keiko713
1
90
What really happens when you deploy a site on Netlify
keiko713
0
820
Healthy Database
keiko713
2
260
What's wrong with your app?
keiko713
0
310
Intro of Heroku Support
keiko713
0
400
What is Heroku?
keiko713
0
240
Heroku 3mins FAQ
keiko713
0
300
Other Decks in Technology
See All in Technology
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
250
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
320
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
620
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
470
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
AWS re:Invent 2024 ふりかえり
kongmingstrap
0
130
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
240
生成AIのガバナンスの全体像と現実解
fnifni
1
180
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
2024年にチャレンジしたことを振り返るぞ
mitchan
0
130
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
210
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Embracing the Ebb and Flow
colly
84
4.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
A better future with KSS
kneath
238
17k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Automating Front-end Workflow
addyosmani
1366
200k
A Tale of Four Properties
chriscoyier
157
23k
Transcript
Heroku 101 Keiko Oda (@keiko713) Technical Support Engineer Saturday, June
21, 14
About me ৫ాܟࢠʢ͓͚͍ͩ͜ʣ ੴݝۚࢢग़ ੴߴઐɹిࢠใֶՊଔ 20134݄ɹHerokuೖࣾ ݱࡏۚͷ࣮ՈΑΓϦϞʔτۈ Saturday, June 21,
14
Table of Contents Herokuͬͯʁ (20mins) Πϯετʔϧͯ͠ΈΑ͏ (10mins) σϞ (10mins) ΞϓϦΛσϓϩΠͯ͠ΈΑ͏
(30mins) ΧελϚΠζͯ͠ΈΑ͏ (20mins) Saturday, June 21, 14
What is Heroku? PaaS (Platform as a Service) Heroku༻ޠɹ ଟݴޠରԠ
(Ruby, Java, Node.js, etc.) ๛ͳΞυΦϯ ࢝Ί͍͢ແྉ Saturday, June 21, 14
Heroku ຊࣾɿΞϝϦΧɹαϯϑϥϯγεί ɹ2007 James, Adam, OrionʹΑͬͯઃཱ 2010 Salesforce.com͕ങऩ 2011 Matz͕͖ͨΑ
Saturday, June 21, 14
PaaS IaaS (Infrastracture as a Service) ࣗͰαʔόʔΛ༻ҙ͠ͳ͍͍ͯ͘ʂ SaaS (Software as
a Service) ࣗͰΞϓϦΛ࡞Βͳ͍͍ͯ͘ʂ PaaS (Platform as a Service) ࣗͰαʔόʔͷηοτΞοϓ͠ͳ͍͍ͯ͘ʂ Saturday, June 21, 14
Heroku terms dyno: Heroku্ͰΔΠϯελϯεͷ୯Ґɻࣗ༝ ʹ૿ͨ͠ΓݮΒͨ͠Γग़དྷΔɻαΠζݱࡏ1X, 2X, PX͕͋Δ add-on: ΞϓϦʹՃͰ͖Δ֦ுػೳɻσʔλ ϕʔεͳͲ͕͋Δ
buildpack: ΞϓϦΛσϓϩΠͨ࣌͠ʹΔεΫ Ϧϓτɻ͜͜ͰRubyͳͲΛΠϯελϯεʹೖΕΔ Saturday, June 21, 14
Languages ੲRuby͚ͩͩͬͨ ࠓΦϑΟγϟϧʹ5ݴޠ+αରԠ Ruby, Java, Node.js, Python, PHP ΓRuby͕ࠜڧ͍ਓؾ buildpackʹΑͬͯଞͷݴޠରԠՄೳ
Saturday, June 21, 14
Add-ons Data Stores (heroku postgres) Logging Email Caching Monitoring Saturday,
June 21, 14
Pricing 1ϲ݄ͨΓ750 dyno-hours͕ແྉʂ 24 h * 1 dyno * 30
days = 720 dyno-hours ՝ۚඵ୯ҐʢΞυΦϯؚΉʣ ແྉ͔Β࢝ΊΒΕΔΞυΦϯͨͬΓ ΞυΦϯΛར༻͍ͨ͠߹ͷΈΫϨδοτΧʔυͷొ͕ඞཁ Saturday, June 21, 14
Herokai Japan ·ͭͱ͞Μ ͳ͔ͩ͞Μ ͍͋͟Θ͞Μ ͩ͞͞͞Μ Herokuͷϓϩ ৭ʑ༏͘͠ڭ͑Δϓϩ ύον/σόοάͷϓϩ Ωʔϊʔτͷϓϩ
Saturday, June 21, 14
Let’s install! ֬ೝ1: Heroku toolbeltೖΕ·ͨ͠ʁ ֬ೝ2: Heroku Sign up͠·ͨ͠ʁ ֬ೝ3:
Heroku CLIͰloginͯ͠Έ·ͨ͠ʁ ࣭1: طʹHerokuΛͬͨ͜ͱ͕͋Δʁ ࣭2: GitΛͬͨ͜ͱ͕͋Γ·͔͢ʁ Saturday, June 21, 14
Saturday, June 21, 14
Deploy app to Heroku 1. ΞϓϦΛGitHub͔Βམͱͯ͘͠Δ 2. ϩʔΧϧͰΒͤͯΈΔ 3. git
push heroku master Saturday, June 21, 14
Clone app from GitHub $ git clone https:/ /github.com/keiko713/rails- todo.git
ࠓճ͋·Γ࣌ؒͳ͍ͷͰɺrails newͳ Ͳඈ͠·͢ Saturday, June 21, 14
Run app locally $ cd rails-todo $ bundle install --without
production $ foreman run bundle exec rake db:migrate $ foreman start http://localhost:5000/ Λ։͍ͯΞϓϦ͕ ಈ͍͍ͯΔ͔֬ೝ Saturday, June 21, 14
Deploy $ heroku create # create an app $ git
remote -v # who the list of remotes $ heroku rename <keiko-todo> # rename $ git push heroku master # deploy! $ heroku run rake db:migrate # db migrate $ heroku open # open the app in browser Saturday, June 21, 14
Customize! 0. Add-onΛՃͯ͠ΈΔ 1. Unicornʹͯ͠ΈΔ 2. CSSJSͳͲΛมߋͯ͠ΈΔ 3. ͖ͳͱ͜ΖΛมߋͯ͠ΈΔ Saturday,
June 21, 14
Using add-ons HerokuͷΞυΦϯศརͳͷ͔Γ ࠓճloggingͱmonitoringΛՃ Saturday, June 21, 14
Using Unicorn https://devcenter.heroku.com/articles/ rails-unicorn υΩϡϝϯτʹԊͬͯͬͯΈΔ HerokuͰͷ։ൃϑϩʔ Change git add git
commit git push Saturday, June 21, 14
Modify CSS/JS ࠓͷσβΠϯΠέͯͳ͍ͷͰม͑ͯΈΔ HerokuͰͷ։ൃϑϩʔ Change git add git commit git
push Saturday, June 21, 14
ͦͷଞ͖ͳॴΛมߋʂ Saturday, June 21, 14
Thank you for using Heroku! Saturday, June 21, 14