0

I have previous experience in Apache Camel and JBoss Fuse and I am new to Openshift version 3.x I am trying to deploy a camel application which is developed using java dsl and spring DI.

I am using an external properties file to load the consumer and producer endpoint in camel.In JBoss Fuse I used the configAdmin services with the update-stratergy=reload as shown below in my blueprint.xml

<!-- OSGI blueprint property placeholder -->
<cm:property-placeholder id="routesConfig" persistent-id="org.sample.camel.routes.config" update-strategy="reload"/>

The above configuration will reload the camelContext automatically when there is a change in the properties file

How can I achieve the same functionality using fis-java-openshift:1.0 template image in openshift 3.x

  • Haven't tried this myself, but you probably need to connect your docker container to an existing disk that has your property file on that. (So that disk space always exists) Then when you update the property file there I would expect to see the desired results. – Matthew Fontana Jun 10 '16 at 12:43

1 Answers1

2

We wrote some docs on how to work with configuration.

Generally speaking on kubernetes the use of service discovery and kubernetes secrets avoids most of the use cases for environment specific configuration.

Ideally we would use the same Continuous Delivery pipelines to change code or configuration to ensure things are properly tested before they hit production.

However if you really really want to reload configuration on the fly in Java containers you can store configuration in a ConfigMap and mount it as a file inside the pod; then have the Java code watch the file (eg with spring boot or ConfigAdmin).

James Strachan
  • 9,168
  • 34
  • 31