Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.89 KB

namaste.adoc

File metadata and controls

52 lines (40 loc) · 1.89 KB

Deploy namaste (Dropwizard) microservice

Choose one of the following options/approaches to deploy this microservice.

Option 1: Deploy using Fabric8 plugin

Execute:

$ git clone https://github.com/redhat-helloworld-msa/namaste
$ cd namaste/
$ mvn clean package docker:build fabric8:json fabric8:apply

Option 2: Deploy project via oc CLI

Basic project creation

$ git clone https://github.com/redhat-helloworld-msa/namaste
$ cd namaste/
$ oc new-build --binary --name=namaste -l app=namaste
$ mvn package; oc start-build namaste --from-dir=. --follow
$ oc new-app namaste -l app=namaste,hystrix.enabled=true
$ oc expose service namaste

(Optional) Enable Jolokia and Readiness probe

$ oc patch dc/namaste -p '{"spec":{"template":{"spec":{"containers":[{"name":"namaste","ports":[{"containerPort": 8778,"name":"jolokia"}]}]}}}}'
$ oc patch dc/namaste -p '{"spec":{"template":{"spec":{"containers":[{"name":"namaste","readinessProbe":{"httpGet":{"path":"/api/health","port":8080}}}]}}}}'