Skip to content

Commit

Permalink
[resolves #1392] Add health checks to example-camel-rest deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Mar 2, 2018
1 parent 98341b9 commit 7c9c673
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/guide/cloud/openshift-local.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ Now, lets create a new application from an existing wildfly-camel based image.
$ oc new-app wildflyext/example-camel-rest
and scale it up
It's good practice to add liveness and readiness probes to the deployment.
$ oc set probe dc/example-camel-rest --liveness --initial-delay-seconds 60 -- echo ok
$ oc set probe dc/example-camel-rest --readiness --initial-delay-seconds 60 --get-url=http://:8080/example-camel-cxf-jaxrs/cxf
Scale up the deployment.
$ oc scale --replicas=3 dc example-camel-rest
Expand All @@ -92,14 +98,20 @@ The pods running the JAX-RS endpoints are however not yet exposed to the world.
##### Exposing the container externally
Now, lets expose the HTTP root context of the running wildlfy server.
Now, lets expose the HTTP root context of the running WildFly server.
$ oc expose service example-camel-rest
You can discover the exposed route host name with.
$ oc get route example-camel-rest
From a remote client, you should now be able to access the service like this
http://example-camel-rest-wildfly-camel.192.168.99.100.nip.io/rest/greet/hello/Kermit[,window=_blank]
Hello Kermit from 172.17.0.8
You can clean up all created resources with.
$ oc delete all -l "app=example-camel-rest"

0 comments on commit 7c9c673

Please sign in to comment.