The 7 Things I Know About Cyber Security After 25 Years | April 2024
Heroku
1. Heroku
By Bhagwat Kumar
http://twitter.com/bhagwatkumar
5th 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 Heroku
Cloud computing is a general term for
anything that involves delivering hosted
services over the Internet.
SAAS
PAAS
IAAS
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 app's health.
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.
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 app's dynos:
• distributed
• fault-tolerant
• horizontally scalable
Tasks
• restarting faulty dyno
• checking for idle dyno
• restarting on config change
12. Deployment Stack
A stack is a complete deployment environment
including :
base operating system
language runtime
associated libraries.
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.
16. Get ready
Register here
https://api.heroku.com/signup/devcenter
Install Heroku Toolbelt (CLI) from
https://toolbelt.heroku.com/
Or if you use Ubuntu then :
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
18. Sample commands (git)
add heroku remote to existing project
git remote add heroku git@heroku.com:project.git
push different project code on existing heroku app
git push --force heroku master
Deploy git 'yourbranch' instead of master
git push heroku yourbranch:master
Remove heroku remote from the project
git remote rm heroku
19. Sample commands (config)
See all the config available for your project
heroku config
Add a key-value pair to config
heroku config:add COMPANY='Intelligrape Software'
Remove keys from config
sheroku config:remove COMPANY OTHER_VAR
//config variables are available as System properties on heroku.
// in Java/Groovy System.getenv('COMPANY')