Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Heroku
Rails Hosting in the Cloud
What is cloud
 computing?
Cloud Computing

• Companies don‘t own the physical
  infrastructure
• Computing time and storage is rented from
  a third...
Advantages

• Variable costs instead of capital
  expenditure
  • Costs lining up with real usage
  • Real usage lining up...
Disadvantages


• You have to trust a third party
• Limitations for exotic configurations
The Cloud rocks

Deployment sucks
co sts
   agility      low            scala
                                    bility


        The Cloud rocks
abso
    ...
Set up new        Deal with
   instances        outages

Deployment sucks
                  Persist
   d Bala ncing   stor...
Automate or die
Customers




               contract


Dyno, SQL-Storage, Caching,…

               management


  ECS, S3, EBS, SimpleDB...
Customers




       contract                        contract



                       manages
                          ...
The Heroku stack
OS and Ruby

• default: Debian 4 + Ruby 1.8.6
• optional:
 • Debian 5 + REE 1.8.7
 • Debian 5 + Ruby 1.9.1
Dynos
App servers, background processes
Database
Shared or dedicated,
based on PostgreSQL
Add-Ons
• Amazon RDS          • Websolr
• Bundles (Backups)   • Memcache
• Cron                • AMQP
Integration
• Custom domains   • New Relic
• DNS servers      • Sendgrid
• Deploy hooks     • SSL certificates
• Exceptiona...
Read Only FS

• Caching → Header + Reverse Proxy
• Uploads → S3
• SQLite → PostgreSQL
• Ferret indices → use SOLR service
Interaction with
     heroku
Git based workflow

• gem install heroku
• heroku create
• git push heroku master
• heroku rake db:migrate
git push → build slug



                                     }
• checkout master branch
• download, build and install gem...
Gem management


• .gems manifest file
• bundler (experimental)
Database management

• Uses values from database.yml
• Export to heroku → db:push
• Import from heroku → db:pull
Other features

• heroku
 • console (interactive/single commands)
 • rake
Conclusion
Cons
• Oversimplification
 • Predefined sets of OS and Ruby version
 • No ssh access
 • No choice of physical location
 • On...
Pros

• Very simple start
• Low costs in the beginning / for small apps
• Offers simple management of complex
  apps, if d...
Questions?

Follow me!
 @ralph
Rails Usergroup Hamburg: Heroku
Rails Usergroup Hamburg: Heroku
Rails Usergroup Hamburg: Heroku
Upcoming SlideShare
Loading in …5
×

Rails Usergroup Hamburg: Heroku

2,181 views

Published on

  • Be the first to comment

  • Be the first to like this

Rails Usergroup Hamburg: Heroku

  1. 1. Heroku Rails Hosting in the Cloud
  2. 2. What is cloud computing?
  3. 3. Cloud Computing • Companies don‘t own the physical infrastructure • Computing time and storage is rented from a third party
  4. 4. Advantages • Variable costs instead of capital expenditure • Costs lining up with real usage • Real usage lining up with sales volume • Higher flexibility
  5. 5. Disadvantages • You have to trust a third party • Limitations for exotic configurations
  6. 6. The Cloud rocks Deployment sucks
  7. 7. co sts agility low scala bility The Cloud rocks abso rb p ur ity eaks s ec reliability
  8. 8. Set up new Deal with instances outages Deployment sucks Persist d Bala ncing storag ant Loa e
  9. 9. Automate or die
  10. 10. Customers contract Dyno, SQL-Storage, Caching,… management ECS, S3, EBS, SimpleDB, …
  11. 11. Customers contract contract manages ECS, S3, EBS, SimpleDB, AppServer, SQL, etc. …
  12. 12. The Heroku stack
  13. 13. OS and Ruby • default: Debian 4 + Ruby 1.8.6 • optional: • Debian 5 + REE 1.8.7 • Debian 5 + Ruby 1.9.1
  14. 14. Dynos App servers, background processes
  15. 15. Database Shared or dedicated, based on PostgreSQL
  16. 16. Add-Ons • Amazon RDS • Websolr • Bundles (Backups) • Memcache • Cron • AMQP
  17. 17. Integration • Custom domains • New Relic • DNS servers • Sendgrid • Deploy hooks • SSL certificates • Exceptional • ...
  18. 18. Read Only FS • Caching → Header + Reverse Proxy • Uploads → S3 • SQLite → PostgreSQL • Ferret indices → use SOLR service
  19. 19. Interaction with heroku
  20. 20. Git based workflow • gem install heroku • heroku create • git push heroku master • heroku rake db:migrate
  21. 21. git push → build slug } • checkout master branch • download, build and install gems slug • delete .git, log/*, tmp/* and everything in .slugignore
  22. 22. Gem management • .gems manifest file • bundler (experimental)
  23. 23. Database management • Uses values from database.yml • Export to heroku → db:push • Import from heroku → db:pull
  24. 24. Other features • heroku • console (interactive/single commands) • rake
  25. 25. Conclusion
  26. 26. Cons • Oversimplification • Predefined sets of OS and Ruby version • No ssh access • No choice of physical location • Only predefined tools available • For larger setups: pretty expensive • Porting apps may be hard
  27. 27. Pros • Very simple start • Low costs in the beginning / for small apps • Offers simple management of complex apps, if developed with the heroku stack in mind
  28. 28. Questions? Follow me! @ralph

×