Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.62 KB

ola.adoc

File metadata and controls

52 lines (38 loc) · 1.62 KB

Deploy ola (Spring Boot) microservice

(Option 1) Deploy project via oc CLI

Basic project creation
$ git clone https://github.com/redhat-helloworld-msa/ola
$ cd ola/
$ oc new-build --binary --name=ola -l app=ola
$ mvn package; oc start-build ola --from-dir=. --follow
$ oc new-app ola -l app=ola,hystrix.enabled=true
$ oc expose service ola
Enable Jolokia and Readiness probe
$ oc set env dc/ola AB_ENABLED=jolokia; oc patch dc/ola -p '{"spec":{"template":{"spec":{"containers":[{"name":"ola","ports":[{"containerPort": 8778,"name":"jolokia"}]}]}}}}'
$ oc set probe dc/ola --readiness --get-url=http://:8080/api/health

(Option 2) Deploy project via Fabric8 Maven Plugin

$ mvn package fabric8:deploy

Test the service endpoint

curl http://ola-helloworld-msa.`minishift ip`.nip.io/api/ola