Camel CXFRS Demo (swagger v2.0) :: A Red Hat JBoss Fuse 6.3.0 RESTful service that handles operations on an IP address or a hostname
This project can be deployed both in a Red Hat JBoss Fuse 6.3.0 standalone karaf container or in a Fabric8-managed cluster environment.
- Red Hat JBoss Fuse 6.3.0 Rollup 19 (v6.3.0.redhat-515) on Apache Karaf is installed and running in standalone mode
- Red Hat JBoss AMQ broker is either running inside in the Red Hat JBoss Fuse 6.3.0 Rollup 19 (v6.3.0.redhat-515) on Apache Karaf (embedded) or is running as a standalone instance
- The project has been built for a standalone deployment
- Red Hat JBoss Fuse 6.3.0 Rollup 19 (v6.3.0.redhat-515) on Apache Karaf is installed and running in standalone mode
- Red Hat JBoss AMQ broker is either running inside in the Red Hat JBoss Fuse 6.3.0 Rollup 19 (v6.3.0.redhat-515) on Apache Karaf (embedded) or is running as a standalone instance
- The project has been built for a standalone deployment
- Create the
org.jeannyil.fuse.demo.ipservicecxfrsserver.cfg
Persistent ID file in the<red_hat_fuse_install_directory>/etc
directory with the following content:context.name.application=demo-ipservice_cxfrs_server camel.name.route=demo-ipservicecxfrsserver-route notif.amq.destination=queue://IPSERVICE.CXFRSSERVER.NOTIF.QUEUE error.amq.destination=queue://IPSERVICE.CXFRSSERVER.ERROR.QUEUE amqclient.ssl.truststore=/Users/jnyilimb/workdata/truststore/truststore.jks amqclient.ssl.truststore.password=secret broker.out.url=failover:(ssl://amq-standalone.lab.com:61443)?jms.useCompression=true broker.user.name=amq broker.user.password=amq@standalone broker.max.connections=1 broker.max.activesessionperconnection=500 output.message.ttl.inms=3600000 exposed.service.gateway.host=fuse-standalone.lab.com exposed.service.gateway.port=8443 http.client.connection.timeout.inms=60000 http.client.receive.timeout.inms=120000
- Adapt the following properties according to your run-time environment:
amqclient.ssl.truststore
: path to the truststore containing the AMQ broker public certificateamqclient.ssl.truststore.password
: password of the truststorebroker.out.url
: Red Hat JBoss AMQ broker connection url (openwire)broker.user.name
andbroker.user.password
: credentials to connect to the Red Hat JBoss AMQ brokerexposed.service.gateway.host
andexposed.service.gateway.port
: these are respectively the host and port where the RESTful service is exposed. They are used for the service dynamically-generatedswagger v2.0
specification.
- Log into the Red Hat Fuse Karaf terminal and deploy the
ipservice_cxfrs_server_swaggerv2
feature:$ features:addurl mvn:org.jeannyil.fuse/ipservice_cxfrs_server_swaggerv2/1.0.0-SNAPSHOT/xml/features $ features:install ipservice_cxfrs_server_swaggerv2
- A fabric8-managed cluster of Red Hat JBoss Fuse 6.3.0 Rollup 19 (v6.3.0.redhat-515) is running
- Red Hat JBoss AMQ broker is either running within the fabric8-managed cluster of Red Hat JBoss Fuse 6.3.0 Rollup 19 (v6.3.0.redhat-515) or as a standalone instance outside the fabric8 cluster
- The project has been built for a Red Hat Fuse fabric8-managed cluster deployment
- All the generated fabric8 profiles have been imported (See instructions here)
- Log into the Red Hat Fuse fabric8 terminal
- Use the
fabric:profile-edit
command (example:fabric:profile-edit -p org.jeannyil.fuse.cxfrs.demo/broker.user.name=amq org-jeannyil-fuse-cxfrs-demo
) to adapt some Persistent ID properties as indicated for the following fabric8 profiles:org-jeannyil-fuse-cxfrs-demo
fabric8 profile- Adapt these
org.jeannyil.fuse.cxfrs.demo
Persistent ID properties:amqclient.ssl.truststore
: path to the truststore containing the AMQ broker public certificateamqclient.ssl.truststore.password
: password of the truststorebroker.out.url
: Red Hat JBoss AMQ broker connection url (openwire)broker.user.name
andbroker.user.password
: credentials to connect to the Red Hat JBoss AMQ broker
- Below is an extract of my
org-jeannyil-fuse-cxfrs-demo
fabric8 profile:$ fabric:profile-display org-jeannyil-fuse-cxfrs-demo Profile id: org-jeannyil-fuse-cxfrs-demo [...] Configuration details ---------------------------- PID: org.jeannyil.fuse.cxfrs.demo broker.out.url discovery:(fabric://ssl-demo-broker) amqclient.ssl.truststore /Users/jnyilimb/workdata/truststore/truststore.jks broker.max.activesessionperconnection 500 broker.max.connections 1 broker.user.name amq broker.user.password ${crypt:AXwoRz+nwJEtZtayqOprP8VFTxMJl5EZ} amqclient.ssl.truststore.password ${crypt:/ynd1l0QTCcuaeJdcdAsrA==} output.message.ttl.inms 3600000 [...]
- Adapt these
org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2
fabric8 profile- Adapt these
org.jeannyil.fuse.demo.ipservicecxfrsserver
Persistent ID properties:exposed.service.gateway.host
andexposed.service.gateway.port
: these are respectively the host and port where the RESTful service is exposed. They are used for the service dynamically-generatedswagger v2.0
specification.
- Below is an extract of the
org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2
fabric8 profile:$ fabric:profile-display org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2 Profile id: org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2 [...] Configuration details ---------------------------- PID: org.jeannyil.fuse.demo.ipservicecxfrsserver error.amq.destination queue://IPSERVICE.CXFRSSERVER.ERROR.QUEUE broker.out.url ${profile:org.jeannyil.fuse.cxfrs.demo/broker.out.url} broker.max.activesessionperconnection ${profile:org.jeannyil.fuse.cxfrs.demo/broker.max.activesessionperconnection} http.client.receive.timeout.inms 120000 broker.max.connections ${profile:org.jeannyil.fuse.cxfrs.demo/broker.max.connections} notif.amq.destination queue://IPSERVICE.CXFRSSERVER.NOTIF.QUEUE broker.user.password ${profile:org.jeannyil.fuse.cxfrs.demo/broker.user.password} amqclient.ssl.truststore.password ${profile:org.jeannyil.fuse.cxfrs.demo/amqclient.ssl.truststore.password} exposed.service.gateway.host fuse-fabric8.lab.com amqclient.ssl.truststore ${profile:org.jeannyil.fuse.cxfrs.demo/amqclient.ssl.truststore} context.name.application demo-ipservice_cxfrs_server broker.user.name ${profile:org.jeannyil.fuse.cxfrs.demo/broker.user.name} http.client.connection.timeout.inms 60000 exposed.service.gateway.port 9000 camel.name.route demo-ipservicecxfrsserver-route output.message.ttl.inms ${profile:org.jeannyil.fuse.cxfrs.demo/output.message.ttl.inms} [...]
- Adapt these
- Deploy the
org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2
fabric8 profile:- On an existing fabric8 karaf container using the
fabric:container-add-profile
command. Example:$ fabric:container-add-profile cxfrs_server-node org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2
- Or, create a new fabric8 karaf container and assign the profile using the
fabric:container-create-child
command. Example:$ fabric:container-create-child --profile org-jeannyil-fuse-cxfrs-demo-ipservice_cxfrs_server_swaggerv2 fuse-01-root cxfrs_server-node
- On an existing fabric8 karaf container using the
🚧 README TO BE COMPLETED with tests samples for both standalone and fabric8 deployments...