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
540
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
13k
Introduction to Netlify
keiko713
1
89
What really happens when you deploy a site on Netlify
keiko713
0
790
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.1k
Other Decks in Technology
See All in Technology
Sansanにおける全社横断データ分析基盤の挑戦と未来 / Challenges and Future of Cross-Organizational Data Analytics Platform at Sansan
sansan_randd
2
310
[JAWS-UG GameTech] 第6回 各種事例紹介_18TRIPにおけるAWSサービスを活用した負荷テスト・障害テスト
naoto_yasuda
0
120
ORM と向き合う
hoto17296
8
6k
軽いノリで"自動化"に取り組んではいけないという話
tetsuyaooooo
1
190
Oracle GoldenGate 23ai 導入Tips
oracle4engineer
PRO
1
210
Strict Concurrencyにしたらdeinitでクラッシュする話
0si43
0
120
スクラム導入の舞台裏:QAエンジニアがスクラムマスターになるまで
bubo1201
0
130
KDD2024参加報告
cyberagentdevelopers
PRO
1
210
ITエンジニアとして知っておいてほしい、電子メールという大きな穴
logica0419
2
310
たった一人で始めた音楽制作が気がついたら会社公認の部活動になっていた話〜組織の垣根を超えるコラボレーションを実現するには〜 / On-KAG-bu
piyonakajima
0
160
Valuable Software Engineering
avandeursen
0
250
LINEヤフー新卒採用 コーディングテスト解説 実装問題編
lycorp_recruit_jp
1
12k
Featured
See All Featured
Code Review Best Practice
trishagee
62
16k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
Practical Orchestrator
shlominoach
185
10k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Cost Of JavaScript in 2023
addyosmani
43
5.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Testing 201, or: Great Expectations
jmmastey
38
7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9k
From Idea to $5000 a Month in 5 Months
shpigford
380
46k
Designing on Purpose - Digital PM Summit 2013
jponch
114
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