Upload
bogdan-marian
View
125
Download
0
Embed Size (px)
Citation preview
Deploying JEE to HEROKUBogdan Marian
12 October 2016
About Me
• iQuest Java developer since 2015• LinkedIn: https://www.linkedin.com/in/bmarian• GitHub: https://github.com/satrapu
Bogdan Marian
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
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
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
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
References
• https://github.com/satrapu/iquest-keyboards-and-mice-brasov-2016/blob/master/README.md#references
Hosted on GitHub
Q&A