Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 2.87 KB

hello.adoc

File metadata and controls

83 lines (62 loc) · 2.87 KB

Deploy the hello (JAX-RS/EAP) 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/hello
$ cd hello/
$ mvn clean package docker:build fabric8:json fabric8:apply -Popenshift

Option 2: Deploy project via oc CLI

Basic project creation

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

(Optional) Enable Jolokia and Readiness probe

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