Skip to content

Commit

Permalink
HZN-1092: Upgrade to Karaf 4.1.2 (#1698)
Browse files Browse the repository at this point in the history
* HZN-1092: Upgrade to Karaf 4.1.1

Spring 4.2 and earlier have been moved into a 'spring-legacy' feature
repository so include that repo in every project that needs it.

* Created a paxWebVersion build property

* NMS-9363: Upgrade to osgi-pluginmanager compatible with Pax Web 4 and 6

* HZN-1092: Downgrade Pax Web to a version that works with our HTTP bridge

* HZN-1092: Removed repo refresh in KarafExtender

Removed manual repo refresh from KarafExtender to avoid
refreshing a repo that already has installed features which is now
illegal in Karaf 4.1.  Bumped Pax Exam to latest version 4.11.0.
Other minor fixes.

https://issues.apache.org/jira/browse/KARAF-4060
https://issues.apache.org/jira/browse/KARAF-5223
https://issues.apache.org/jira/browse/KARAF-5251

* HZN-1092: Fixed console output parsing

Karaf 4.1 has jline ANSI escape codes on some output so we need
to change some test assertions.

* HZN-1092: Updated to Karaf 4.1.2, added workaround for KARAF-5384

The workaround involves adding our Apache MINA bundle to the startup
bundle list for Karaf in startup.properties. This has to be done in
the container in container/standalone and in the Pax Exam tests so
that the bundle is available before the container starts in Pax Exam.

https://issues.apache.org/jira/browse/KARAF-5384

* HZN-1092: Updated Minion container to match Karaf distro

The Minion karaf-maven-plugin configuration was missing many
configuration options, making the /lib, /lib/endorsed, and /system
directories incomplete. This has been fixed and the MINA JAR was
added to the /system repo to work around KARAF-5384.

https://issues.apache.org/jira/browse/KARAF-5384

* Clean up JRadius dependency POM

* HZN-1092: Disable Bouncy Castle security in Apache MINA SSHD

Karaf's SSHD was failing because it was trying to classload
Bouncy Castle out of the system classpath so disable the
Bouncy Castle provider.

* HZN-1092: Shade/relocate bouncycastle inside jradius-extended

Created a shaded JAR project to combine jradius-extended and
a relocated bouncycastle to avoid bad side-effects of having
bouncycastle in the classpath (like NMS-7959).
  • Loading branch information
soleger authored and j-white committed Oct 16, 2017
1 parent 8b21f0e commit 3f8d8b2
Show file tree
Hide file tree
Showing 52 changed files with 2,411 additions and 1,149 deletions.
10 changes: 7 additions & 3 deletions container/features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<value>framework-${karafVersion}</value>
<value>enterprise-${karafVersion}</value>
<value>spring-${karafVersion}</value>
<value>spring-legacy-${karafVersion}</value>
<value>standard-${karafVersion}</value>

<!-- Apache CXF -->
Expand Down Expand Up @@ -150,7 +151,6 @@
<feature>framework</feature>

<!-- Karaf standard features -->
<feature>aries-annotation</feature>
<feature>aries-blueprint</feature>
<feature>aries-proxy</feature>
<feature>blueprint-web</feature>
Expand All @@ -161,21 +161,25 @@
<feature>eventadmin</feature>
<feature>feature</feature>
<feature>framework-security</feature>
<feature>httplite</feature>
<feature>http</feature>
<feature>http-whiteboard</feature>
<feature>instance</feature>
<feature>jaas-boot</feature>
<feature>jaas</feature>
<feature>jasypt-encryption</feature>
<!-- TODO: Figure out how to import 2 versions of Jetty? -->
<feature>jetty</feature>
<!-- TODO: Should we import both versions of Jetty? -->
<feature>jetty/8.1.14.v20131031</feature>
<feature>jetty/9.3.9.v20160517</feature>
<feature>jolokia</feature>
<feature>kar</feature>
<feature>log</feature>
<feature>management</feature>
<feature>minimal</feature>
<feature>obr</feature>
<feature>package</feature>
<!-- Replaced by opennms-bridge-http-service -->
<!-- <feature>pax-http-service</feature> -->
<feature>profile</feature>
<feature>scheduler</feature>
<feature>scr</feature>
Expand Down
24 changes: 21 additions & 3 deletions container/karaf/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,33 @@ Upgrading Karaf
To upgrade our container to use a new base Karaf version, follow these steps.

1. Download and unpack the new Karaf tar.gz file.
1. Run this command to see the differences in the Karaf etc files:
1. Run these commands to see the differences in the Karaf etc files:

diff -r $KARAF_DIR/etc $SRC_DIR/container/karaf/src/main/filtered-resources/etc
1. Apply any relevant changes to the files inside $SRC_DIR/container/karaf/src/main/filtered-resources/etc.
diff -r $KARAF_DIR/etc $SRC_DIR/features/minion/container/karaf/src/main/filtered-resources/etc
diff -r $KARAF_DIR/etc $SRC_DIR/opennms-base-assembly/src/main/filtered-resources/etc
diff -r $KARAF_DIR/etc $SRC_DIR/smoke-test/src/test/resources

1. Apply any relevant changes to the files inside each etc file.
1. Copy the new Karaf "standard" features.xml file into the container project:

cp $KARAF_DIR/system/org/apache/karaf/features/standard/$KARAF_VERSION/standard-$KARAF_VERSION-features.xml $SRC_DIR/container/karaf/src/main/filtered-resources/features/features.xml

1. Restore the HTTP bridge changes to the features.xml file by making all of the changes between the OPENNMS CUSTOMIZATION comment blocks.
1. Copy the new Karaf "spring" features.xml file into the container project:

cp $KARAF_DIR/system/org/apache/karaf/features/spring/$KARAF_VERSION/spring-$KARAF_VERSION-features.xml $SRC_DIR/container/karaf/src/main/filtered-resources/features/spring.xml

1. Remove the unmodified standard features repo from the spring.xml file by making all of the changes between the OPENNMS CUSTOMIZATION comment blocks.
1. Update $SRC_DIR/pom.xml with new value for <karafVersion/> property.
1. Copy the new Karaf "spring-legacy" features.xml file into the container project:

cp $KARAF_DIR/system/org/apache/karaf/features/spring-legacy/$KARAF_VERSION/spring-legacy-$KARAF_VERSION-features.xml $SRC_DIR/container/karaf/src/main/filtered-resources/features/spring-legacy.xml

1. Remove the unmodified standard features repo from the spring-legacy.xml file by making all of the changes between the OPENNMS CUSTOMIZATION comment blocks.
1. Update the ```karaf-maven-plugin``` configuration inside ```$SRC_DIR/features/minion/container/karaf/pom.xml``` so that it matches the default Karaf assembly from <https://github.com/apache/karaf/blob/karaf-$KARAF_VERSION/assemblies/apache-karaf/pom.xml> with our additions.
1. Update the list of repo features inside ```$SRC_DIR/container/features/pom.xml```, ```$SRC_DIR/core/test-api/karaf/pom.xml```, and ```$SRC_DIR/opennms-full-assembly/pom.xml```.
1. Update the Karaf version inside ```$SRC_DIR/core/test-api/karaf/src/main/java/org/opennms/core/test/karaf/KarafTestCase.java```.
1. Update ```$SRC_DIR/pom.xml``` with new value for ```<karafVersion>``` property.
1. Update ```$SRC_DIR/smoke-test/pom.xml``` with new value for ```<karafVersion>``` property.

See commit dea910701c3f48e367636b507fc575b59e70b843 for an example of an upgrade.
5 changes: 5 additions & 0 deletions container/karaf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@
<type>xml</type>
<classifier>spring</classifier>
</artifact>
<artifact>
<file>target/filtered-resources/features/spring-legacy.xml</file>
<type>xml</type>
<classifier>spring-legacy</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
Expand Down
Loading

0 comments on commit 3f8d8b2

Please sign in to comment.