A quick starter for the development of Java apps that runs with Docker and Kubernetes.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
log4j2
manifests
src
.gitignore
.travis.yml
Dockerfile
Dockerfile-travis
README.md
codesign.asc.enc
docker-compose.yaml
pom.xml

README.md

Java Starter

Build Status Release Maven Central Javadocs

A quick start for the development of new Java applications. 👌

  • Container-ready with Docker and Docker Compose configuration.
  • Docker builder pattern with caching of Maven dependencies.
  • Basic Kubernetes deployment and service definitions.
  • Istio ingress gateway and virtual service definitions.
  • Travis CI pipeline with automated GitHub releases and Docker build and push.
  • Spark Java's smart and simple http endpoints.
  • SLF4J and logback setup.
  • Additional Log4j2 YAML config with several features.
  • Rich Maven setup required by Maven Central (including GPG jar sign).
  • Prints ascii banner at application startup.

Docker

docker-compose up
curl http://localhost:8000/hello

Kubernetes and Istio

kubectl apply -f manifests/
kubectl apply -f manifests/istio/

Test with Istio

export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
curl -i http://$(minikube ip):$INGRESS_PORT/hello

Test with k8s only

kubectl proxy --port=8080
curl -i http://localhost:8080/api/v1/namespaces/juliaaano/services/java-starter:http/proxy/hello