Heroku
   Jeweler + Gemcutter
                    All Ruby Goodness



a riej a n .dev ro om@k a bi sa .n l



                     http://slideshare.net/ariejan/heroku-jeweler-gemcutter
What the ...?
What the ...?



Rails deployment with Heroku
What the ...?



Rails deployment with Heroku

Creating gems with Jeweler and Gemcutter
Heroku
What’s Heroku?
What’s Heroku?

Easy deployment of Ruby-based apps
What’s Heroku?

Easy deployment of Ruby-based apps

Hosted in the Amazon EC2 Cloud
What’s Heroku?

Easy deployment of Ruby-based apps

Hosted in the Amazon EC2 Cloud

Offering of easy to integrate third-party services
What’s Heroku?

Easy deployment of Ruby-based apps

Hosted in the Amazon EC2 Cloud

Offering of easy to integrate third-party services

Pay as you go
What’s Heroku?

Easy deployment of Ruby-based apps

Hosted in the Amazon EC2 Cloud

Offering of easy to integrate third-party services

Pay as you go

Scales!
What’s Heroku?

Easy deployment of Ruby-based apps

Hosted in the Amazon EC2 Cloud

Offering of easy to integrate third-party services

Pay as you go

Scales!

Hosts 42k apps! Including Shopify
“Problems”
“Problems”

You don’t have root access
“Problems”

You don’t have root access

Your app lives in the cloud.
“Problems”

You don’t have root access

Your app lives in the cloud.

You need Heroku to pull your data out
“Problems”

You don’t have root access

Your app lives in the cloud.

You need Heroku to pull your data out

You have no direct database access
“Problems”

You don’t have root access

Your app lives in the cloud.

You need Heroku to pull your data out

You have no direct database access

You have limited access to logs (heroku logs)
Amazon EC2 vs. Heroku
Amazon EC2 vs. Heroku


Hardware as a Service vs. Platform as a Service
Amazon EC2 vs. Heroku


Hardware as a Service vs. Platform as a Service

Ruby Oriented
Amazon EC2 vs. Heroku


Hardware as a Service vs. Platform as a Service

Ruby Oriented

No hardware knowledge required
Amazon EC2 vs. Heroku


Hardware as a Service vs. Platform as a Service

Ruby Oriented

No hardware knowledge required

Limiting in choice for third party tools
Heroku vs. Kabisa Hosting
Heroku vs. Kabisa Hosting

Heroku scales with a few clicks
Heroku vs. Kabisa Hosting

Heroku scales with a few clicks

Easy deployment, including gem dependencies
Heroku vs. Kabisa Hosting

Heroku scales with a few clicks

Easy deployment, including gem dependencies

Pay as you go - only pay for the resources you use
Heroku vs. Kabisa Hosting

Heroku scales with a few clicks

Easy deployment, including gem dependencies

Pay as you go - only pay for the resources you use

No hardware to maintain or worry about
Heroku vs. Kabisa Hosting

Heroku scales with a few clicks

Easy deployment, including gem dependencies

Pay as you go - only pay for the resources you use

No hardware to maintain or worry about

Less control over hardware and software choices
Heroku vs. Kabisa Hosting

Heroku scales with a few clicks

Easy deployment, including gem dependencies

Pay as you go - only pay for the resources you use

No hardware to maintain or worry about

Less control over hardware and software choices

It’s not hosted in Eindhoven (latency)
Give Heroku a Spin!
Ingredients
Ingredients


A Heroku account (you did read the email,
right?)
Ingredients


A Heroku account (you did read the email,
right?)

A sample rails app
Ingredients


A Heroku account (you did read the email,
right?)

A sample rails app

An open terminal
First, a local blog!
First, a local blog!

Get a rails app working locally
First, a local blog!

Get a rails app working locally

 gem install faker
First, a local blog!

Get a rails app working locally

 gem install faker

 git clone
       git://github.com/ariejan/kks-heroku.git
First, a local blog!

Get a rails app working locally

 gem install faker

 git clone
       git://github.com/ariejan/kks-heroku.git

 rake db:migrate && rake db:seed
First, a local blog!

Get a rails app working locally

 gem install faker

 git clone
       git://github.com/ariejan/kks-heroku.git

 rake db:migrate && rake db:seed

 script/server
Second, deploy to Heroku
Second, deploy to Heroku

Deploying is easy. No capistrano required!
Second, deploy to Heroku

Deploying is easy. No capistrano required!

 gem install heroku
Second, deploy to Heroku

Deploying is easy. No capistrano required!

 gem install heroku

 heroku create <appname>
Second, deploy to Heroku

Deploying is easy. No capistrano required!

 gem install heroku

 heroku create <appname>

 git push heroku master
Second, deploy to Heroku

Deploying is easy. No capistrano required!

 gem install heroku

 heroku create <appname>

 git push heroku master

 heroku open
Push your development data
Push your development data

Easily push data into your production app
Push your development data

Easily push data into your production app

 heroku db:push
Push your development data

Easily push data into your production app

 heroku db:push

 heroku open
Push your development data

Easily push data into your production app

 heroku db:push

 heroku open

You can also do pull production data
Push your development data

Easily push data into your production app

 heroku db:push

 heroku open

You can also do pull production data

 heroku db:pull
Getting Info
Getting Info



heroku info
Backups? No, bundles!
Backups? No, bundles!


Include app and database dump
Backups? No, bundles!


Include app and database dump

 heroku addons:add bundles:single
Backups? No, bundles!


Include app and database dump

 heroku addons:add bundles:single

 heroku bundles:capture
Backups? No, bundles!


Include app and database dump

 heroku addons:add bundles:single

 heroku bundles:capture

 heroku bundles:download <bundle>
Caveats
Caveats


Gem dependencies
Caveats


Gem dependencies

PostgreSQL (is not MySQL)
Caveats


Gem dependencies

PostgreSQL (is not MySQL)

File uploads
Jeweler & Gemcutter
Jeweler
Jeweler


Easily create and manage your gem
Jeweler


Easily create and manage your gem

Make it easy to release your gem to Gemcutter
Jeweler


Easily create and manage your gem

Make it easy to release your gem to Gemcutter

Manage code on github
Let’s make a kks-gem!
Let’s make a kks-gem!


jeweler --rspec --gemcutter --create-repo
downcaser
Let’s make a kks-gem!


jeweler --rspec --gemcutter --create-repo
downcaser

Edit Rakefile to suit your needs
Let’s make a kks-gem!


jeweler --rspec --gemcutter --create-repo
downcaser

Edit Rakefile to suit your needs

Write specs, write code, commit
Release version 0.0.1
Release version 0.0.1


rake version:write
Release version 0.0.1


rake version:write

rake version:bump:patch
Release version 0.0.1


rake version:write

rake version:bump:patch

rake gemcutter:release
Release version 0.0.1


rake version:write

rake version:bump:patch

rake gemcutter:release

gem install downcaser
Why Jeweler
Why Jeweler


Makes your life easy
Why Jeweler


Makes your life easy

Focus on writing the gem, not managing it
Why Jeweler


Makes your life easy

Focus on writing the gem, not managing it

Easily release a gem to Gemcutter
Why Gemcutter?
Why Gemcutter?


It’s (or will be) the default gem source
Why Gemcutter?


It’s (or will be) the default gem source

Supported by the Ruby community (including
RubyForge)
Q&A

Heroku + Jeweler & Gemcutter