Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.64 KB

aloha.adoc

File metadata and controls

49 lines (38 loc) · 1.64 KB

Deploy aloha (Vert.x) microservice

(Option 1) Deploy project via oc CLI

Basic project creation
$ git clone https://github.com/redhat-helloworld-msa/aloha
$ cd aloha/
$ oc new-build --binary --name=aloha -l app=aloha
$ mvn package; oc start-build aloha --from-dir=. --follow
$ oc new-app aloha -l app=aloha,hystrix.enabled=true
$ oc expose service aloha
Enable Jolokia and Readiness probe
$ oc set env dc/aloha AB_ENABLED=jolokia; oc patch dc/aloha -p '{"spec":{"template":{"spec":{"containers":[{"name":"aloha","ports":[{"containerPort": 8778,"name":"jolokia"}]}]}}}}'
$ oc set probe dc/aloha --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://aloha-helloworld-msa.`minishift ip`.nip.io/api/aloha