From: Guillaume Lambert Date: Thu, 1 Jul 2021 20:00:39 +0000 (+0200) Subject: Allow Karaf to use an alternative websocket port X-Git-Tag: 4.0.0~30 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=commitdiff_plain;h=b6129c0d321ddf064085fff1208926523e3e1c76 Allow Karaf to use an alternative websocket port In tests post install script - generate configuration file template for restconf nc-bierman02 - patch Karaf exec to generate configuration file from environment variable and template Allowing the controller configuration to listen to alternative ports is a commodity to run functional tests in parallel. JIRA: TRNSPRTPCE-482 Signed-off-by: Guillaume Lambert Change-Id: Ib507f486103a9edcaa9a948644c3739ef7381460 --- diff --git a/karaf/src/main/assembly/ressources/post_install_for_tests.sh b/karaf/src/main/assembly/ressources/post_install_for_tests.sh index 5adde6d38..9faf529b3 100755 --- a/karaf/src/main/assembly/ressources/post_install_for_tests.sh +++ b/karaf/src/main/assembly/ressources/post_install_for_tests.sh @@ -35,6 +35,12 @@ else\ RMI_SERVER_PORT=$USE_ODL_ALT_RMI_SERVER_PORT\ fi\ sed -e "s/ODL_RMI_REGISTRY_PORT/$RMI_REGISTRY_PORT/" -e "s/ODL_RMI_SERVER_PORT/$RMI_SERVER_PORT/" \$(dirname \$0)/\.\./ressources/org.apache.karaf.management._template.cfg >\$(dirname \$0)/\.\./etc/org.apache.karaf.management.cfg\ +if [ -z "$USE_ODL_ALT_WEBSOCKET_PORT" ]; then\ + WEBSOCKET_PORT=8185\ +else\ + WEBSOCKET_PORT=$USE_ODL_ALT_WEBSOCKET_PORT\ +fi\ +sed -e "s/ODL_WEBSOCKET_PORT/$WEBSOCKET_PORT/" \$(dirname \$0)/\.\./ressources/org.opendaylight.restconf._template.cfg >\$(dirname \$0)/\.\./etc/org.opendaylight.restconf.cfg\ ' ../bin/karaf sed 's/2550/ODL_AKKA_PORT/' ../system/org/opendaylight/controller/sal-clustering-config/*/sal-clustering-config-*-akkaconf.xml >akka-default_template.conf @@ -42,3 +48,4 @@ sed 's/8181/ODL_RESTCONF_PORT/' ../etc/org.ops4j.pax.web.cfg > org.ops4j.pax.web sed 's/8181/ODL_RESTCONF_PORT/' ../etc/jetty.xml > jetty_template.xml sed 's/8101/ODL_SHELL_PORT/' ../etc/org.apache.karaf.shell.cfg > org.apache.karaf.shell._template.cfg sed -e 's/1099/ODL_RMI_REGISTRY_PORT/' -e 's/44444/ODL_RMI_SERVER_PORT/' ../etc/org.apache.karaf.management.cfg > org.apache.karaf.management._template.cfg +sed 's/^[#|]websocket-port=8185/websocket-port=ODL_WEBSOCKET_PORT/' ../system/org/opendaylight/netconf/sal-rest-connector-config/[0-9.]*/sal-rest-connector-config-[0-9.]*-restconf.cfg >org.opendaylight.restconf._template.cfg