Deploying JEE to Heroku

9
Deploying JEE to HEROKU Bogdan Marian 12 October 2016

Transcript of Deploying JEE to Heroku

Page 1: Deploying JEE to Heroku

Deploying JEE to HEROKUBogdan Marian

12 October 2016

Page 2: Deploying JEE to Heroku

About Me

• iQuest Java developer since 2015• LinkedIn: https://www.linkedin.com/in/bmarian• GitHub: https://github.com/satrapu

Bogdan Marian

Page 3: Deploying JEE to Heroku

Heroku

• Cloud application platform• Cedar stack (Heroku managed OS image)

• Ubuntu 14.04 LTS• Process model implemented via dyno manager

• Dyno = Linux container• Configurations: web (HTTP only, must bind to PORT or be

killed), worker (anything, except HTTP), one-off (“heroku run” command)

• Types: free, hobby, standard, performance, enterprise• A process is declared in a Procfile: “<process_type>:

<command>”• Heroku Elements (add-ons, buttons, buildpacks)

• Different languages (Java, PHP, Python, Ruby, etc.)• Different databases

• Relational: MySQL, PostgreSQL, SQLite, etc.• NoSQL: Mongo DB, Redis, etc.

• Much more• Heroku CLI• Java

• Different deployment models, including git and WAR• No Java EE support• Run Java processes via: java –jar *.jar

General Information

Page 4: Deploying JEE to Heroku

WildFly Swarm

• Just-enough-appserver• Construction toolkit for minimalistic Java EE runtimes based

on WildFly 10.1.0 Final application server • Uberjar

• Run Java EE applications via: java –jar *-swarm.jar

General Information

Page 5: Deploying JEE to Heroku

Demo

• Source code: https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016

• CI/CD: https://drone.io/github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/latest

• Live application: https://iq-kam-brasov-2016.herokuapp.com/demo

Deploying JEE to Heroku

Page 6: Deploying JEE to Heroku

Demo

• On Heroku side• Create a free account• Add a new application

• Add a PostgreSQL database• Setup Java specific config vars• Add Java buildpack

• On developer machine• Install Heroku CLI• Install Git• Clone repo• Setup Heroku Git remote• Deploy via Git command: “git push heroku master”

• Optionally, on drone.io side (replaces “git push …”)• Create a free account• Setup build with Heroku deployment• Upload SSH key to Heroku account• Click the “Build Now” button

Steps

Page 7: Deploying JEE to Heroku

References

• https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/blob/master/README.md#references

Hosted on GitHub

Page 8: Deploying JEE to Heroku

Q&A

Page 9: Deploying JEE to Heroku

© Copyright 2016, iQuest Group. All rights reserved.

Thank You!iquestgroup.com

[email protected]