Fellow ServiceMixers,
I thank all of you guys for jumping in and giving me ideas here! What a
great community we have built around ServiceMix (and Camel, CXF, Karaf,
Aries, etc.)!
I believe our approach will be to use "rolling" deployments. We will set
up two ServiceMix nodes (let's call them A and B), using Karaf's JDBC
fail-over feature. Consider a situation where we have node A running as
our master with "feature1" and "feature2" deployed from feature repository
"myfeatures" version 1.0.1. Node B would be sitting in stand-by mode,
configured identically. Now, we would like to deploy changes made to
"feature1." These are reflected in version 1.0.2 of the "myfeatures"
feature repository. The way I understand it, we have a couple of different
options here:
Boot Features
1. Shutdown node B.
2. Modify node B's SMX_HOME/etc/org.apache.karaf.features.cfg file to
use version 1.0.2 of "myfeatures" feature repository instead of version
1.0.1.
3. Delete node B's SMX_HOME/data directory.
4. Startup node B (stand-by mode).
5. Shutdown node A, thereby allowing node B to become the new master.
6. Modify node A's SMX_HOME/etc/org.apache.karaf.features.cfg file to
use version 1.0.2 of "myfeatures" feature repository instead of version
1.0.1.
7. Delete node A's SMX_HOME/data directory.
8. Startup node A (stand-by mode).
9. Shutdown node B, thereby allowing node A to become the master again.
We could skip this step and just continue with node B as the master, but
if we do this our deployments look exactly the same way each time.
Installed Features
1. Connect to node A's Karaf console.
2. Uninstall "feature1".
3. Remove URL for "myfeatures" version 1.0.1 from the feature
repositories list.
4. Add URL for "myfeatures" version 1.0.2 to the feature repositories
list.
5. Install "feature1".
6. Connect to node B's Karaf console.
7. Uninstall "feature1".
8. Remove URL for "myfeatures" version 1.0.1 from the feature
repositories list.
9. Add URL for "myfeatures" version 1.0.2 to the feature repositories
list.
10. Install "feature1".
In my mind, the Boot Features seems like a "cleaner" option. However,
using Installed Features is the "OSGi Way" and I would like to be able to
get to that. In my experience, though, uninstalling features from a
running instance of ServiceMix turns out to be somewhat problematic,
because all kinds of stuff starts shutting down and the container seems to
go into a "funky" state. I'm not even addressing the issue of
configurations yet. I'm just trying to understand how the bundle/feature
deployments should work. So, what do you guys think?
Thanks,
James