Skip to content

Commit

Permalink
Merge pull request #264 from luck3y/CLOUD-4107
Browse files Browse the repository at this point in the history
[CLOUD-4107] OpenJDK 17 images
  • Loading branch information
luck3y committed Jun 2, 2022
2 parents 9cb0cec + 60dc370 commit 4963df4
Show file tree
Hide file tree
Showing 58 changed files with 1,352 additions and 85 deletions.
563 changes: 563 additions & 0 deletions jboss/container/config/7.4/ee-elytron/standalone-openshift.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature-group-spec name="os-undertow-elytron" xmlns="urn:jboss:galleon:feature-group:1.0">
<feature-group name="undertow-elytron-security"/>
<feature spec="subsystem.undertow">
<feature spec="subsystem.undertow.server">
<param name="server" value="default-server" />
<feature spec="subsystem.undertow.server.host">
<param name="host" value="default-host" />
<feature spec="subsystem.undertow.server.host.setting.http-invoker">
<unset param="security-realm"/>
<param name="http-authentication-factory" value="application-http-authentication"/>
</feature>
</feature>
</feature>
</feature>
<feature-group name="os-undertow"/>
</feature-group-spec>
13 changes: 13 additions & 0 deletions jboss/container/eap/galleon/config/ee-common/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

chown -R jboss:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd
7 changes: 7 additions & 0 deletions jboss/container/eap/galleon/config/ee-common/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
schema_version: 1
name: jboss.container.eap.galleon.config.ee.common
version: '1.0'
description: Install Galleon ee default configuration.

execute:
- script: configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version="1.0" ?>

<config xmlns="urn:jboss:galleon:config:1.0" name="standalone.xml" model="standalone">
<layers>
<!-- we already have all required in default config -->
<!-- Although logically correct, galleon doesn't actually support excluding from model -->
<!-- This is harmless, keeping the exclusion commented for reference until GAL-308 is fixed -->
<!--<exclude name="operator-required"/>-->
<include name="amq6-rar"/>
</layers>

<!-- No sso packages for JDK17 techpreview -->
<!-- <feature-group name="sso"/> -->

<!-- JDK 17 -->
<exclude feature-id="core-service.management.security-realm:security-realm=ApplicationRealm"/>
<exclude feature-id="core-service.management.security-realm:security-realm=ManagementRealm"/>
<feature spec="subsystem.batch-jberet">
<param name="security-domain" value="ApplicationDomain"/>
</feature>
<!-- JDK 17, remoting secured with elytron -->
<feature spec="subsystem.remoting.http-connector">
<param name="http-connector" value="http-remoting-connector"/>
<unset param="security-realm"/>
<param name="sasl-authentication-factory" value="application-sasl-authentication"/>
</feature>

<!-- management -->
<!-- JDK 17, do not exclude identity -->
<!--<exclude spec="core-service.management.access.identity"/>-->
<feature spec="core-service.management.management-interface.http-interface">
<param name="socket-binding" value="management-http"/>
<unset param="http-authentication-factory"/>
<feature spec="core-service.management.management-interface.http-interface.http-upgrade">
<param name="sasl-authentication-factory" value="management-sasl-authentication"/>
</feature>
</feature>
<exclude spec="subsystem.core-management"/>
<feature-group name="os-management"/>

<!-- messaging -->
<feature spec="subsystem.messaging-activemq"/>
<feature-group name="os-messaging"/>

<!-- logging -->
<exclude feature-id="subsystem.logging.pattern-formatter:pattern-formatter=PATTERN"/>
<exclude feature-id="subsystem.logging.periodic-rotating-file-handler:periodic-rotating-file-handler=FILE"/>
<feature-group name="os-logging"/>

<!-- jberet We can't remove it... needs a default job repository -->
<!--<feature spec="subsystem.batch-jberet">
<unset param="default-job-repository"/>
</feature>-->

<!-- datasources -->
<!-- We are not keeping the ExampleDS in the config -->
<exclude feature-id="subsystem.datasources.data-source:data-source=ExampleDS"/>
<feature spec="subsystem.ee.service.default-bindings">
<unset param="datasource"/>
</feature>

<!-- ejb3 -->
<feature spec="subsystem.ejb3">
<param name="default-sfsb-cache" value="distributable"/>
<param name="default-sfsb-passivation-disabled-cache" value="simple"/>
<param name="default-mdb-instance-pool" value="mdb-strict-max-pool"/>
<param name="default-resource-adapter-name" value="${ejb.resource-adapter-name:activemq-ra.rar}"/>
<!-- JDK 17, elytron security -->
<feature spec="subsystem.ejb3.application-security-domain">
<param name="application-security-domain" value="other"/>
<param name="security-domain" value="ApplicationDomain"/>
</feature>
</feature>
<exclude spec="subsystem.ejb3.service.timer-service"/>

<!-- elytron -->
<feature-group name="os-elytron"/>

<!-- clustering -->
<exclude spec="subsystem.infinispan"/>
<exclude spec="subsystem.distributable-web"/>
<feature-group name="os-clustering"/>

<!-- legacy security -->
<!-- JDK 17 excluded fully -->
<exclude feature-id="subsystem.security.security-domain:security-domain=jaspitest"/>
<exclude feature-id="subsystem.security.security-domain:security-domain=other"/>
<exclude feature-id="subsystem.security.security-domain:security-domain=jboss-web-policy"/>
<exclude feature-id="subsystem.security.security-domain:security-domain=jboss-ejb-policy"/>
<exclude spec="subsystem.security"/>
<!-- transactions -->
<feature-group name="tx-recovery"/>

<!-- undertow -->
<exclude feature-id="subsystem.undertow.server.https-listener:server=default-server,https-listener=https"/>

<!-- web-services -->
<feature spec="subsystem.webservices">
<param name="modify-wsdl-address" value="true"/>
<param name="wsdl-host" value="jbossws.undefined.host"/>
</feature>

<feature-group name="os-socket"/>

<feature-group name="os-undertow-elytron"/>

</config>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" ?>
<layer-spec xmlns="urn:jboss:galleon:layer-spec:1.0" name="application-security-realm">
<exclude feature-id="core-service.management.security-realm:security-realm=ApplicationRealm"/>
</layer-spec>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" ?>
<layer-spec xmlns="urn:jboss:galleon:layer-spec:1.0" name="management-security-realm">
<exclude feature-id="core-service.management.security-realm:security-realm=ManagementRealm"/>
</layer-spec>
17 changes: 17 additions & 0 deletions jboss/container/eap/galleon/config/ee-elytron/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

chown -R jboss:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

# Remove sso content for JDK17 tech preview image. To be removed when supported.
rm "${GALLEON_FP_PATH}/src/main/resources/feature_groups/sso.xml"
rm -r "${GALLEON_FP_PATH}/src/main/resources/layers/standalone/sso"
11 changes: 11 additions & 0 deletions jboss/container/eap/galleon/config/ee-elytron/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
schema_version: 1
name: jboss.container.eap.galleon.config.ee
version: '1.0-elytron'
description: Install Galleon ee default configuration.

execute:
- script: configure.sh

modules:
install:
- name: jboss.container.eap.galleon.config.ee.common
4 changes: 4 additions & 0 deletions jboss/container/eap/galleon/config/ee/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ description: Install Galleon ee default configuration.

execute:
- script: configure.sh

modules:
install:
- name: jboss.container.eap.galleon.config.ee.common
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ echo "`date "+%Y-%m-%d %H:%M:%S"` Launching EAP Server"
# Always start sourcing the launch script supplied by wildfly-cekit-modules
source ${JBOSS_HOME}/bin/launch/launch.sh

# Append image specific modular options in standalone.conf
SPEC_VERSION="${JAVA_VERSION//1.}"
SPEC_VERSION="${SPEC_VERSION//.*}"
if (( $SPEC_VERSION > 15 )); then
MODULAR_JVM_OPTIONS=`echo $JAVA_OPTS | grep "\-\-add\-modules"`
if [ "x$MODULAR_JVM_OPTIONS" = "x" ]; then
DIRNAME=`dirname "$0"`
marker="#JVM modular options added by openshift startup script"
if ! grep -q "$marker" "$DIRNAME/standalone.conf"; then
jvm_options="$marker
JAVA_OPTS=\"\$JAVA_OPTS --add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED\""
echo "$jvm_options" >> "$DIRNAME/standalone.conf"
fi
fi
fi
# end specific JDK modular options

function runServer() {
local instanceDir=$1
launchServer "$JBOSS_HOME/bin/standalone.sh -c standalone-openshift.xml -bmanagement 0.0.0.0 -Djboss.server.data.dir=${instanceDir} -Dwildfly.statistics-enabled=true"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
schema_version: 1
name: jboss.container.eap.launch
name: jboss.container.eap.launch.common
version: '1.0'
description: Module that enables CLI configuration for standalone-openshift.xml file
execute:
Expand Down
39 changes: 39 additions & 0 deletions jboss/container/eap/launch/ee-no-sso/added/launch/launch-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh

# Centralised configuration file to set variables that affect the launch scripts in wildfly-cekit-modules.

# Scripts that modify the configuration. Either via xml marker replacement or via CLI commands.
# wildfly-cekit-modules will look for each of the listed files and run them if they exist.
CONFIG_SCRIPT_CANDIDATES=(
$JBOSS_HOME/bin/launch/backward-compatibility.sh
$JBOSS_HOME/bin/launch/configure_extensions.sh
$JBOSS_HOME/bin/launch/passwd.sh
$JBOSS_HOME/bin/launch/messaging.sh
$JBOSS_HOME/bin/launch/datasource.sh
$JBOSS_HOME/bin/launch/resource-adapter.sh
$JBOSS_HOME/bin/launch/admin.sh
# Keep this order, jgroups.sh before ha.sh. jgroups.sh is the script which initializes the protocol list store
# used to share changes in the protocol list when a protocol is added either by ha.sh or by jgroups.sh.
# This protocol store is just a set of files under temporal directory. We need them to be able to share changes
# done by the ha.sh and jgroups.sh routines which are executed in subshells
$JBOSS_HOME/bin/launch/jgroups.sh
$JBOSS_HOME/bin/launch/ha.sh
$JBOSS_HOME/bin/launch/https.sh
$JBOSS_HOME/bin/launch/elytron.sh
$JBOSS_HOME/bin/launch/json_logging.sh
$JBOSS_HOME/bin/launch/configure_logger_category.sh
$JBOSS_HOME/bin/launch/security-domains.sh
$JBOSS_HOME/bin/launch/jboss_modules_system_pkgs.sh
$JBOSS_HOME/bin/launch/deploymentScanner.sh
$JBOSS_HOME/bin/launch/ports.sh
$JBOSS_HOME/bin/launch/access_log_valve.sh
$JBOSS_HOME/bin/launch/filters.sh
$JBOSS_HOME/bin/launch/statefulset.sh
/opt/run-java/proxy-options
)
# The server configuration file to use. If not set, wildfly-cekit-modules defaults to standalone.xml.
# For EAP we want standalone-openshift.xml
WILDFLY_SERVER_CONFIGURATION=standalone-openshift.xml
# The configuration adjustment mode. For EAP we want both xml marker replacement and CLI commands.
# Notice that the value of this variable must be aligned with the value configured in assemble
export CONFIG_ADJUSTMENT_MODE="xml_cli"
13 changes: 13 additions & 0 deletions jboss/container/eap/launch/ee-no-sso/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

SCRIPT_DIR=$(dirname $0)
ADDED_DIR=${SCRIPT_DIR}/added

mkdir -p ${JBOSS_HOME}/bin/launch
#Overwrite openshift-launch.sh

cp -p ${ADDED_DIR}/launch/* ${JBOSS_HOME}/bin/launch

#Ensure permissions
chmod -R g+rwX ${JBOSS_HOME}/bin/launch/
11 changes: 11 additions & 0 deletions jboss/container/eap/launch/ee-no-sso/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
schema_version: 1
name: jboss.container.eap.launch
version: '1.0-no-sso'
description: Module that enables CLI configuration for standalone-openshift.xml file, no SSO script
execute:
- script: configure.sh
user: '185'

modules:
install:
- name: jboss.container.eap.launch.common
13 changes: 13 additions & 0 deletions jboss/container/eap/launch/ee/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

SCRIPT_DIR=$(dirname $0)
ADDED_DIR=${SCRIPT_DIR}/added

mkdir -p ${JBOSS_HOME}/bin/launch
#Overwrite openshift-launch.sh

cp -p ${ADDED_DIR}/launch/* ${JBOSS_HOME}/bin/launch

#Ensure permissions
chmod -R g+rwX ${JBOSS_HOME}/bin/launch/
11 changes: 11 additions & 0 deletions jboss/container/eap/launch/ee/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
schema_version: 1
name: jboss.container.eap.launch
version: '1.0'
description: Module that enables CLI configuration for standalone-openshift.xml file
execute:
- script: configure.sh
user: '185'

modules:
install:
- name: jboss.container.eap.launch.common
4 changes: 2 additions & 2 deletions os-eap70-sso/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SCRIPT_DIR=$(dirname $0)
ADDED_DIR=${SCRIPT_DIR}/added
SOURCES_DIR="/tmp/artifacts"

unzip -o $SOURCES_DIR/rh-sso-7.4.6-eap7-adapter.zip -d $JBOSS_HOME
unzip -o $SOURCES_DIR/rh-sso-7.4.6-saml-eap7-adapter.zip -d $JBOSS_HOME
unzip -o $SOURCES_DIR/rh-sso-7.4.10-eap7-adapter.zip -d $JBOSS_HOME
unzip -o $SOURCES_DIR/rh-sso-7.4.10-saml-eap7-adapter.zip -d $JBOSS_HOME

chown -R jboss:root $JBOSS_HOME
chmod -R g+rwX $JBOSS_HOME
12 changes: 6 additions & 6 deletions os-eap70-sso/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ execute:
user: '185'

artifacts:
- name: rh-sso-7.4.6-eap7-adapter
target: rh-sso-7.4.6-eap7-adapter.zip
md5: 10b1adaace20aae249ac124f4f32469a
- name: rh-sso-7.4.6-saml-eap7-adapter
target: rh-sso-7.4.6-saml-eap7-adapter.zip
md5: 7392404a47ddc22bdbd1f76982ca27c3
- name: rh-sso-7.4.10-eap7-adapter
target: rh-sso-7.4.10-eap7-adapter.zip
md5: c397605d0e12baa060615bc80912d153
- name: rh-sso-7.4.10-saml-eap7-adapter
target: rh-sso-7.4.10-saml-eap7-adapter.zip
md5: 3e5b3e8d416dde2894746891552012d6
2 changes: 1 addition & 1 deletion tests/examples/test-app-advanced-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<version>3.3.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<outputDirectory>target</outputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/test-app-drivers-at-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<version>3.3.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<outputDirectory>target</outputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/test-app-drivers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<version>3.3.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<outputDirectory>target</outputDirectory>
Expand Down
7 changes: 7 additions & 0 deletions tests/examples/test-app-ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@

<build>
<finalName>test-app-ejb</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>

</project>

0 comments on commit 4963df4

Please sign in to comment.