Running Java, Play! and Scala Apps on the Cloud


James Ward

Why the Cloud?

Your App

Cloud Machines

Logging

Indexing

Messaging

Deployment

Scaling

Security Updates

Monitoring

Backups

Disaster Recovery

Virtual Machines

File Servers

Web Servers

Load Balancers

Routing

Firewall

IP Assignment

Physical Machines

Power

Network

Physical Space

I Need Servers!

Lets Deploy Some Apps

Deploy Via Command Line


$ play new foo

$ git init
$ git add .
$ git commit -m init

$ heroku create

$ git push heroku master

$ heroku open
                        

Deploy Via Browser




heroku.com/java

Deploy Via Eclipse




http://eclipse-plugin.herokuapp.com/

Heroku

Cloud Application Platform




2,282,962+ Apps Running on Heroku

What is Heroku?

Zero-Error Deployment

Heroku Details

BYOC

<dependency>
    <groupId>com.github.jsimone</groupId>
    <artifactId>webapp-runner</artifactId>
    <version>7.0.22</version>
    <scope>provided</scope>
</dependency>

Procfile

web: java -jar target/web.jar --port $PORT
backgroundjob: java -jar target/something.jar
someotherprocess: java -jar target/whatever.jar

Env Vars

  • Zero-Intervention Deployment
  • External Resources Own Their Config

Collaborators

  • Can push changes
  • Could be a Jenkins / Bamboo System

Logs

  • Available from CLI, Eclipse, API, etc
  • Write logs to STDOUT

Scaling

  • Allocate Dynos to run a process
  • Auto-Scaling via APIs & third-party tools

Add-ons

  • addons.heroku.com
  • Cloud Services provided by Heroku and Partners
  • Databases, Indexing, Logging, Messaging, Analytics, Monitoring, Media, Utilities, Payments

Pricing

  • $0.05 / Dyno Hour
  • Add-ons Tier Pricing Based on Usage (most have a free tier)
  • 750 free Dyno hours / app / month

Wrapping Up

heroku.com/java

Questions?