Skip to content

Zapata/easy-java-deployment-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample of easy Java deployement

Deploy a core style application (Plain old main) and a web application (light container) in the simplest way.

Best practices

  • Do not require any dependency on target env exept Java.
  • When possible build a Plain old Main application and deploy using a Jar with all dependencies.
  • When a container is require:
    • prefer lightweight technology (servlet, ...), avoid dependency of a J2EE application server.
    • use Jetty Runner, easier than embedded style, and no lock in.
  • Deliver only one file (easier for production team).
  • Deployement should be reproducible.
  • Target environment should be easely reproducable and testable.

How to use it

mvn package
cd distrib
vagrant up

That's all! Both applications should be deployed on the VM.
You should have a "Hello World" when connecting to http://localhost:8080/ .

How it works

Core and webapp application are dummy maven archetype applications.

Distrib module will:

  • use appassembler-maven-plugin to build two deamon applications (using Java Service Wrapper).
  • on the fly download of Jetty Runner, used to run the webapp application.
  • build a tar.gz with full application installation (use maven-assembly-plugin).
  • use Vagrant to build easely target VM.
    • see Vagrantfile for reproducible VM setup.
    • see bootstrap.sh for dependencies installation on VM (java).
    • see install.sh for a custom reproducable installation of applications.

Further infos

About

Sample of easy Java deployement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published