The Heroku Way
Going the Heroku way for developers is a very easy and simple process to adopt. It is the right approach to take if you are building applications and do not want to be tied to a platform/infrastructure specific services/hooks. Heroku in its architecting apps for Heroku article lays out these points. One point that stands out for me is that “it is application, not infastructure, focused”.
Now, if you want to go the Heroku way, I hope that this article would give you some information to get you started or provide you guidance.
Prerequisites
- Linux or Mac OS X based computer
- (Windows based computer would do but i suggest you go cygwin route with the Windows)
- Familiarity with command line tools
Getting Started
- Signup on Heroku for a Developer account
- Follow Heroku’s Getting Started guides
- Learn to use Heroku from the Command Line
- Setup CLI Authentication
What is Heroku’s Command Line (CLI)?
from Heroku website:
The heroku command-line tool is an interface to the Heroku Platform API and includes support for things like creating/renaming apps, running one-off dynos, taking backups, configuring add-ons and managing your app’s state. It’s generally installed in your local dev environment as part of the Heroku Toolbelt.
CLI authentication
You may do CLI authentication with email and password. Instead, use API token and SSH Keys to get to your Heroku account. This CLI authentication article for more information.
with the API Token
- On my local, the ~/.netrc looks like this:
Heroku Version
Typing the command heroku version
gives the version information for the heroku toolbelt, cli and all the installed plugins.
AK-Mac:flask-app ak$ heroku version
heroku-toolbelt/3.42.33 (x86_64-darwin10.8.0) ruby/1.9.3
heroku-cli/4.27.16-cb94b94 (amd64-darwin) go1.5.3
=== Installed Plugins
heroku-apps@1.2.3
heroku-cli-addons@0.2.0
heroku-fork@4.1.0
heroku-git@2.4.5
heroku-local@4.1.6
heroku-run@2.9.2
heroku-spaces@2.0.11
heroku-status@2.1.0
Create a New App from the CLI
With the Heroku’s CLI, you can create a new app with just one command
(flask-bs-app)AK-Mac:flask-app ak$ heroku create --stack cedar
Creating sheltered-garden-45928... done, stack is cedar-14
https://sheltered-garden-45928.herokuapp.com/ | https://git.heroku.com/sheltered-garden-45928.git
Also, you get a git remote on Heroku for your application. With this git repo you can track your app with/in git.
Screenshots
New applicaiton on Heroku Dashboard
New Application in the Browser