Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Clint Hello! my name is

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Deploying Applications with Heroku

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

❖ What is Heroku ❖ 12 Factor Apps ❖ Working With Heroku ❖ Heroku + Java Contents:

Slide 7

Slide 7 text

What Is Heroku

Slide 8

Slide 8 text

Heroku is a Cloud!

Slide 9

Slide 9 text

Heroku is a PaaS: “Platform as a service (PaaS) is a category of cloud computing services that provide a computing platform and a solution stack as a service [...] The consumer controls software deployment and configuration settings. The provider provides the networks, servers, storage and other services." ! - https://en.wikipedia.org/wiki/Platform_as_a_service

Slide 10

Slide 10 text

WE RUN FOR YOU ~YOUR CODE~

Slide 11

Slide 11 text

History: ❖ Founded June 2007, supporting Rack-compatible projects ❖ December 2010: acquired by Salesforce.com ❖ July 2011: Yukihiro "Matz" Matsumoto joined as Chief Architect, Ruby ❖ May 2011: Cedar stack announced ❖ <3 August 2011: Java support <3

Slide 12

Slide 12 text

Supporting: ❖ Ruby ❖ Python ❖ ->Java<- ❖ Node.js ❖ Clojoure ❖ PHP …and basically anything with 3rd Party Buildpacks

Slide 13

Slide 13 text

HOW

Slide 14

Slide 14 text

This:

Slide 15

Slide 15 text

This: Apps

Slide 16

Slide 16 text

Apps: ❖ application, not infrastructure ❖ dynamic and distributed runtime ❖ utilizes process-based execution model ❖ strict separation of apps and their dependencies ❖ embodiment of 12 Factor methodology

Slide 17

Slide 17 text

RECAP: What is Heroku? Platform + Apps

Slide 18

Slide 18 text

12 Factor Apps

Slide 19

Slide 19 text

Architecting Apps for Heroku

Slide 20

Slide 20 text

Philosophy:

Slide 21

Slide 21 text

I. Codebase II. Dependencies III. Config IV. Backing Services V. Build, release, run VI. Processes VII. Port binding VIII. Concurrency IX. Disposability X. Dev/prod parity XI. Logs XII. Admin processes 12 Factor Apps Philosophy:

Slide 22

Slide 22 text

I. Codebase II. Dependencies III. Config IV. Backing Services V. Build, release, run VI. Processes VII. Port binding VIII. Concurrency IX. Disposability X. Dev/prod parity XI. Logs XII. Admin processes 12 Factor Apps Philosophy:

Slide 23

Slide 23 text

Codebase

Slide 24

Slide 24 text

❖ Single repo ❖ One codebase tracked in revision control ❖ Many deploys Codebase:

Slide 25

Slide 25 text

Dependencies

Slide 26

Slide 26 text

❖ Consistent packaging: RubyGems, pip, npm, Maven ❖ Declaration: Gemfile, requirements.txt ❖ Execution isolation: bundle exec, Virtualenv Dependencies:

Slide 27

Slide 27 text

Config

Slide 28

Slide 28 text

❖ Resource handles ❖ Credentials ❖ Things you used to use constants for ❖ All your secrets Config:

Slide 29

Slide 29 text

Backing Services

Slide 30

Slide 30 text

❖ Datastores: MySQL, Postgres ❖ Queueing systems: RabbitMQ ❖ Some local, other remote ❖ Can be attached/detached Backing Services:

Slide 31

Slide 31 text

Processes

Slide 32

Slide 32 text

❖ Stateless processes ❖ Persistence/ communication: backing services Processes:

Slide 33

Slide 33 text

Logs

Slide 34

Slide 34 text

❖ Treat logs as event streams ❖ Visibility into running app ❖ write to stdout ❖ collected by execution environment Logs:

Slide 35

Slide 35 text

RECAP: Twelve-Factors Apps I. Codebase II. Dependencies III. Config IV. Backing Services V. Build, release, run VI. Processes VII. Port binding VIII. Concurrency IX. Disposability X. Dev/prod parity XI. Logs XII. Admin processes

Slide 36

Slide 36 text

Working With Heroku

Slide 37

Slide 37 text

This:

Slide 38

Slide 38 text

❖ git push ❖ slug compilation ❖ dyno provisioning ❖ api/routing updates ❖ CLI for management (overly simplistic) This:

Slide 39

Slide 39 text

About Dynos

Slide 40

Slide 40 text

This:

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Small sharp tools

Slide 43

Slide 43 text

Many identical copies (dynos)

Slide 44

Slide 44 text

Dynos: ❖ lightweight containers ❖ Elasticity & scale ❖ Management ❖ Distribution and redundancy

Slide 45

Slide 45 text

Many identical copies (dynos)

Slide 46

Slide 46 text

Java environment your app Java environment your app postgres your data add-on your data

Slide 47

Slide 47 text

This:

Slide 48

Slide 48 text

Add-ons

Slide 49

Slide 49 text

❖ Data Stores: Postgres, MongoHQ, Redis ❖ Search: Websolr, Flying Sphinx ❖ Logging: Paptertrail, Loggly ❖ Analytics: New Relic, Blitz ❖ Queue Managers: IronMQ, Pusher ❖ Cache: Memcache, RedisGreen Add-ons:

Slide 50

Slide 50 text

Add-ons:

Slide 51

Slide 51 text

$ Pricing $

Slide 52

Slide 52 text

Pricing: ❖ Based on usage ❖ 750 free dyno hours ❖ Add-ons are prorated based on plan ❖ One-off dynos accrue too

Slide 53

Slide 53 text

^ Up Time ^

Slide 54

Slide 54 text

Uptime:

Slide 55

Slide 55 text

Uptime: ❖ 99% since December 2012 ❖ 99.9% for all of 2013 (so far) ❖ Based on # of apps affected ❖ https://status.heroku.com ❖ https://status.heroku.com/uptime

Slide 56

Slide 56 text

RECAP: • Spend time solving app problems, not infrastructure • Add things as needed • Pay by usage • 99.9% uptime

Slide 57

Slide 57 text

Heroku JAVA

Slide 58

Slide 58 text

❖ Development ❖ Packaging ❖ Distribution ❖ Install ❖ Deployment Classic Approach:

Slide 59

Slide 59 text

❖ Development ❖ Packaging ❖ Distribution ❖ Install ❖ Deployment Heroku Approach:

Slide 60

Slide 60 text

❖ No application server ❖ Linked libraries ❖ Minimal external configuration ❖ Still have Servlet, JSP, JDBC Heroku Approach:

Slide 61

Slide 61 text

Application Servers?

Slide 62

Slide 62 text

❖ Deployment ❖ Start/stop/restart ❖ Deployment of changes ❖ Clustering (scaling) Application Servers: ❖ Load-balancing ❖ Failover ❖ Logging ❖ Service binding

Slide 63

Slide 63 text

❖ Deployment ❖ Start/stop/restart ❖ Deployment of changes ❖ Clustering (scaling) Application Servers: ❖ Load-balancing ❖ Failover ❖ Logging ❖ Service binding Heroku

Slide 64

Slide 64 text

Demo!

Slide 65

Slide 65 text

❖ devcenter.heroku.com/articles/getting- started-with-spring-mvc-hibernate ❖ https://github.com/heroku/devcenter- spring-mvc-hibernate Demo!

Slide 66

Slide 66 text

Heroku Java Recap: ❖ Build for deployment, not packaging ❖ Version control for distribution ❖ Heroku is the Application Server ❖ Think Applications, not systems

Slide 67

Slide 67 text

What Now?

Slide 68

Slide 68 text

1.Sign up at www.heroku.com 2.toolbelt.heroku.com 3.devcenter.heroku.com/categories/java 4.$ heroku create 5.$ git push heroku master 6.discussion.heroku.com/category/java

Slide 69

Slide 69 text

my twitter is @ctshryock my email is [email protected] Thanks!