nhkchan / camel-simple-request-reply

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Camel Simple Request/Reply

Requirements

Preparing

Build the project source code

$ cd $PROJECT_ROOT
$ mvn clean install

Running the example standalone

$ cd $PROJECT_ROOT
$ mvn spring-boot:run

Testing

$ curl -X POST -H 'Content-Type: text/plain' -H 'Accept: text/plain' -d 'Hello world!' 'http://localhost:8080/camel/messages/'

Running the example in OpenShift

It is assumed that:

Create a new project:

$ oc new-project demo-fuse

Create the ServiceAccount:

$ oc create -f src/main/kube/serviceaccount.yml

Create the ConfigMap:

$ oc create -f src/main/kube/configmap.yml

Create the Secret:

$ oc create -f src/main/kube/secret.yml

Add the Secret to the ServiceAccount created earlier:

$ oc secrets add sa/camel-simple-request-reply-sa secret/camel-simple-request-reply-secret

Add the view role to the ServiceAccount:

$ oc policy add-role-to-user view system:serviceaccount:camel-simple-request-reply:camel-simple-request-reply-sa

The example can be built and run on OpenShift using the following goals:

$ mvn clean install fabric8:resource fabric8:build fabric8:deploy

Testing the code

Use the same tools/instructions for testing standalone (above). Make sure to change the host/port to point to the exposed OpenShift Route.

About


Languages

Language:Java 100.0%