- Install Eclipse 3.7 or newer
- Signup for a Heroku account
- Install the Heroku Eclipse Plugin (Complete the steps up to "Create app from template")
-
-
Save jamesward/3910085 to your computer and use it in GitHub Desktop.
Heroku is a Cloud Application Platform
- Supports Java, Scala, Python, Node.js, Ruby, etc
- Instant Deployment via Git or WAR files
- Instant Scalability
- Managed Infrastructure: Servers, Load Balancers, Databases, etc
- Extended via Add-ons: http://addons.heroku.com
-
Copy git repo to Heroku:
git push heroku master -
Heroku compiles code
-
Heroku creates a "slug" file
-
Heroku deploys "slug" onto a "dyno"
-
Heroku starts the process
User has 0 or more Applications
Application has 1 git repository
Application has 0 or more Processes
Process is defined in a Procfile
Process named "web" can listen on one port for HTTP
Process runs on 0 or more Dynos
Dynos are isolated (LXC) and managed execution environments
Application has 0 more more external resources - Heroku Add-ons
Buildpack receives a
git pushand produces a "slug"Slug contains the non-system dependencies for all Processes
Dynos are ephemeral and stateless
HTTP(s) requests are randomly routed to the "web" Dynos
$0.05 / dyno hour
750 free dyno hours per application per month
- In Eclipse select
File>New>Other... - Expand the
Herokusection, selectCreate Heroku App from Template, selectNext - Select
Spring MVC & Tomcat application, selectFinish
- In Eclipse select
Window>Show View>Other... - Expand the
Herokusection, selectMy Heroku Applications, selectOk - Locate the newly created application in
My Heroku Applications - Right-click on the application and select
Open
- In Eclipse select
Run>Run Configurations... - Double-click on
Java Application - Set the name to something like
arcane-taiga-7336 webapp-runner(using the application's name) - Set the
Main classtowebapp.runner.launch.Main - In the
Argumentstab addsrc/main/webappas aProgram argument - Select
Run - Visit http://localhost:8080
- BYOC via
pom.xml - Define processes via the
Procfile - Database configured via the
DATABASE_URLenvironment variable
- Make a change to the application and test locally
- In Eclipse right-click on the project name in the
Project Explorer - Select
Team>Commit... - Enter a
Commit message - Select
Commit - Right-click on the project name in the
Project Explorer - Select
Team>Push to Upstream - View the application on Heroku in your browser
- In Eclipse select the
My Heroku Applicationstab - Right-click on the application and select
View logs
This requires a verified account on Heroku: http://heroku.com/verify
- In Eclipse select the
My Heroku Applicationstab - Right-click on the application and select
Scale - Enter the number of Dynos to scale the web process to
- Select
Ok