Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Heroku101 Kanazawa

Heroku101 Kanazawa

Heroku101 for Kanazawa.rb #22

Avatar for Keiko Oda

Keiko Oda

June 21, 2014
Tweet

More Decks by Keiko Oda

Other Decks in Technology

Transcript

  1. What is Heroku? PaaS (Platform as a Service) Heroku༻ޠɹ ଟݴޠରԠ

    (Ruby, Java, Node.js, etc.) ๛෋ͳΞυΦϯ ࢝Ί΍͍͢ແྉ࿮ Saturday, June 21, 14
  2. PaaS IaaS (Infrastracture as a Service) ࣗ෼ͰαʔόʔΛ༻ҙ͠ͳ͍͍ͯ͘ʂ SaaS (Software as

    a Service) ࣗ෼ͰΞϓϦΛ࡞Βͳ͍͍ͯ͘ʂ PaaS (Platform as a Service) ࣗ෼ͰαʔόʔͷηοτΞοϓ͠ͳ͍͍ͯ͘ʂ Saturday, June 21, 14
  3. Pricing 1ϲ݄౰ͨΓ750 dyno-hours͕ແྉʂ 24 h * 1 dyno * 30

    days = 720 dyno-hours ՝ۚ͸ඵ୯ҐʢΞυΦϯؚΉʣ ແྉ͔Β࢝ΊΒΕΔΞυΦϯ΋ͨͬ΀Γ ΞυΦϯΛར༻͍ͨ͠৔߹ͷΈΫϨδοτΧʔυͷొ࿥͕ඞཁ Saturday, June 21, 14
  4. Let’s install! ֬ೝ1: Heroku toolbeltೖΕ·ͨ͠ʁ ֬ೝ2: Heroku Sign up͠·ͨ͠ʁ ֬ೝ3:

    Heroku CLIͰloginͯ͠Έ·ͨ͠ʁ ࣭໰1: طʹHerokuΛ࢖ͬͨ͜ͱ͕͋Δʁ ࣭໰2: GitΛ࢖ͬͨ͜ͱ͕͋Γ·͔͢ʁ Saturday, June 21, 14
  5. Clone app from GitHub $ git clone https:/ /github.com/keiko713/rails- todo.git

    ࠓճ͸͋·Γ࣌ؒ΋ͳ͍ͷͰɺrails newͳ Ͳ͸ඈ͹͠·͢ Saturday, June 21, 14
  6. 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
  7. 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