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
550
Heroku101 Kanazawa
Heroku101 for Kanazawa.rb #22
Keiko Oda
June 21, 2014
Tweet
Share
More Decks by Keiko Oda
See All by Keiko Oda
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
800
Healthy Database
keiko713
2
250
What's wrong with your app?
keiko713
0
300
Intro of Heroku Support
keiko713
0
390
What is Heroku?
keiko713
0
230
Heroku 3mins FAQ
keiko713
0
300
Heroku Support
keiko713
5
3.2k
Other Decks in Technology
See All in Technology
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
120
Emacs x Nostr
hakkadaikon
1
150
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
130
端末が簡単にリモートから操作されるデモを通じて ソフトウェアサプライチェーン攻撃対策の重要性を理解しよう
kitaji0306
0
170
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
440
失敗しないOpenJDKの非互換調査
tabatad
0
260
ネット広告に未来はあるか?「3rd Party Cookie廃止とPrivacy Sandboxの効果検証の裏側」 / third-party-cookie-privacy
cyberagentdevelopers
PRO
1
120
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
20
3.3k
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
110
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
260
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How to Ace a Technical Interview
jacobian
275
23k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.8k
Automating Front-end Workflow
addyosmani
1365
200k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
The Language of Interfaces
destraynor
154
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Writing Fast Ruby
sferik
626
61k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
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