Upcoming SlideShare
Loading in...5

Like this? Share it with your network



Uploaded on

"Heroku" presentation given at Intelligrape Software Knowledge sharing session. Contains commonly used commands of Heroku CLI.

"Heroku" presentation given at Intelligrape Software Knowledge sharing session. Contains commonly used commands of Heroku CLI.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 3

http://www.slashdocs.com 3

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Heroku By Bhagwat Kumar http://twitter.com/bhagwatkumar5th Jan 2013
  • 2. Agenda Cloud Computing and Heroku Process Model Dynos Manifold Deployment Stack Add-on Services Usage and Billing CLI
  • 3. Cloud Computing and HerokuCloud computing is a general term for anything that involves delivering hosted services over the Internet.SAASPAASIAAS
  • 4. Heroku a new way of building and deploying web apps. Spend 100% of your time on application code. Forget managing servers, deployment, ongoing operations, or scaling.
  • 5. How it works? Deploy – just a git push Connect – add 3 party resources rd Command – Use CLI/web interface Observe – All activities logged using Logplex Scale – independent scaling of components Relax - takes full responsibility for your apps health.
  • 6. Git with Heroku
  • 7. Process Model Process Type  Web : web application  Worker : timed jobs and queuing systems Each app has a set of running processes and the processes are instantiated using Process Type as prototype.
  • 8. Process Model cont...
  • 9. Dyno Basic unit of composition on Heroku. A lightweight container running a single user-specified command/process. Possible commands – Web processes – Worker processes – Other processes defined in Procfile
  • 10. Dyno composition Your app Framework support Config vars Own file system for temp usage 512MB of RAM
  • 11. Dyno Manifold  Provides an environment for your apps dynos: • distributed • fault-tolerant • horizontally scalable  Tasks • restarting faulty dyno • checking for idle dyno • restarting on config change
  • 12. Deployment StackA stack is a complete deployment environment including :  base operating system  language runtime  associated libraries.
  • 13. Popular add-on services
  • 14. Usage & Billing Usage is computed from wall-clock time, not CPU time. Current charge : $0.05 per hour per dyno Each app gets 750 free dyno-hours/month – run 1 dyno for an entire month for free OR – run 2 dynos for 1/2 of a month Add-on services have their own charges
  • 15. Get readyRegister here https://api.heroku.com/signup/devcenterInstall Heroku Toolbelt (CLI) from https://toolbelt.heroku.com/Or if you use Ubuntu then :wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
  • 16. Sample commandsheroku helpheroku loginheroku create --stack cedarheroku apps:rename newnameheroku apps:rename newname --app oldname(http://newname.heroku.com/ | git@heroku.com:newname.git)git push heroku masterheroku logs -t
  • 17. Sample commands (git)add heroku remote to existing projectgit remote add heroku git@heroku.com:project.gitpush different project code on existing heroku appgit push --force heroku masterDeploy git yourbranch instead of mastergit push heroku yourbranch:masterRemove heroku remote from the projectgit remote rm heroku
  • 18. Sample commands (config)See all the config available for your projectheroku configAdd a key-value pair to configheroku config:add COMPANY=Intelligrape SoftwareRemove keys from configsheroku config:remove COMPANY OTHER_VAR//config variables are available as System properties on heroku.// in Java/Groovy System.getenv(COMPANY)
  • 19. Sample commands (sharing)Change owner of the heroku projectheroku sharing:transfer owner@xyz.comAdd collaboratorheroku sharing:add my_email@xyz.comRemove collaboratorheroku sharing:remove my_email@xyz.com
  • 20. Sample commands (process)See all running processesheroku pswatch heroku psRestart all dynosheroku restartRun bash shellheroku run bash
  • 21. Sample commands (add-ons)heroku addons:listheroku addons:add heroku-postgresqlheroku pg:waitheroku addons:remove heroku-postgresql
  • 22. Heroku postgres-db commandsheroku pg:infoheroku pg:credentials COLORheroku pg:psql
  • 23. Heroku postgres backupheroku addons:add pgbackupsheroku addons:add pgbackups:plus #plus planheroku addons:add pgbackups:auto-week #auto-week planheroku pgbackups:capture #default database backup creationheroku pgbackups:capture HEROKU_POSTGRESQL_PINK #selected database backupheroku pgbackups:capture --expire # delete manual oldest backupheroku pgbackups# see backups b indicates manual and a indicates autoheroku pgbackups:url b004 # provides a 10 minute backup download public urlheroku pgbackups:destroy b003 # delete a backupheroku pgbackups:restore DATABASE b251 # restore backup to DATABASEheroku pgbackups:restore HEROKU_POSTGRESQL_PINK b251 #restore to PINK database
  • 24. Thank you :)