Skip to content

Commit

Permalink
Add WildFly docker images (#3315)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardovh authored Jun 17, 2022
1 parent 8666515 commit 399e9f8
Show file tree
Hide file tree
Showing 15 changed files with 898 additions and 5 deletions.
1 change: 1 addition & 0 deletions docker/appserver/WildFly/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin
23 changes: 23 additions & 0 deletions docker/appserver/WildFly/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>iaf-docker-docker-as-WildFly</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
16 changes: 16 additions & 0 deletions docker/appserver/WildFly/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG WILDFLY_VERSION=26.1.1.Final
FROM quay.io/wildfly/wildfly:${WILDFLY_VERSION} AS iaf-test-as-wildfly

# copy dependencies
COPY target/dependencies/*.jar /opt/jboss/wildfly/standalone/lib/ext/
COPY target/dependencies/*.rar /opt/jboss/wildfly/standalone/deployments/

# Copy in standalone-configuration.xml
COPY src/configuration/standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml

# Copy configuration script for modules
COPY src/configuration/configuration.py /home/configuration.py
RUN python /home/configuration.py

# copy war
COPY target/dependencies/ibis-adapterframework-test.war /opt/jboss/wildfly/standalone/deployments/iaf-test.war
141 changes: 141 additions & 0 deletions docker/appserver/WildFly/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>ibis-adapterframework-docker-as-wildfly</artifactId>
<name>Frank!Framework Docker image for WildFly</name>
<packaging>pom</packaging>

<parent>
<groupId>org.ibissource</groupId>
<artifactId>ibis-adapterframework-docker-as</artifactId>
<version>${revision}</version>
</parent>

<dependencies>
<dependency>
<groupId>org.ibissource</groupId>
<artifactId>ibis-adapterframework-test</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>${oracle.driver.groupid}</groupId>
<artifactId>ojdbc${oracle.driver.jdkversion}</artifactId>
<version>${oracle.driver.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${mssql.driver.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.driver.version}</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb.driver.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.driver.version}</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-rar</artifactId>
<version>${activemq.driver.version}</version>
<type>rar</type>
</dependency>
<!-- Artemis is already part of WildFly, so not added explicitly -->
</dependencies>

<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<excludeTransitive>true</excludeTransitive>
<stripVersion>true</stripVersion>
<excludeClassifiers>configurations,resources,scenarios</excludeClassifiers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>prepare-as-dependencies</id>
<phase>package</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/scripts</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>prepare-package</id>
<phase>package</phase>
<inherited>false</inherited>
<configuration>
<target>
<exec executable="docker" failonerror="true">
<arg value="build"/>
<arg value="-t"/>
<arg value="iaf-test-as-wildfly"/>
<arg value="."/>
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
24 changes: 24 additions & 0 deletions docker/appserver/WildFly/src/configuration/configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os

# name of the module that war file will depend on
moduleName = "module.nl.nn.adapterframework"

# list of jar files
path_to_jars="/opt/jboss/wildfly/standalone/lib/ext/"
jarList = os.listdir(path_to_jars)

# resources that the module will be created upon
resources = ""
resourceDelimiter = ':'


for jarFile in jarList:
resources += path_to_jars+jarFile+resourceDelimiter

resources = resources[0:-1]

command="module add --name="+moduleName+" --resources="+resources

print(command)

os.system("/opt/jboss/wildfly/bin/jboss-cli.sh --command='"+command+"'")
Loading

0 comments on commit 399e9f8

Please sign in to comment.