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
810
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
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
180
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.6k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
870
AGIについてChatGPTに聞いてみた
blueb
0
130
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
230
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
670
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
860
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
32
1.5k
Ruby is Unlike a Banana
tanoku
97
11k
A Tale of Four Properties
chriscoyier
156
23k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Practical Orchestrator
shlominoach
186
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Side Projects
sachag
452
42k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
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