Skip to content

Commit

Permalink
Microprofile default config and FP build
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdenise committed May 11, 2021
1 parent 4bb47d1 commit 7504281
Show file tree
Hide file tree
Showing 12 changed files with 257 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" ?>

<installation xmlns="urn:jboss:galleon:provisioning:3.0">
<!-- Use the image version, to avoid retrieving metadata.xml for un-released s2i FP-->
<feature-pack location="eap-s2i@maven(org.jboss.universe:s2i-universe)#3.0.0.Final">
<default-configs inherit="false">
<include model="standalone" name="standalone-microprofile-ha.xml"/>
</default-configs>
</feature-pack>
</installation>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>

<installation xmlns="urn:jboss:galleon:provisioning:3.0">
<!-- Use the image version, to avoid retrieving metadata.xml for un-released s2i FP-->
<feature-pack location="eap-s2i@maven(org.jboss.universe:s2i-universe)#3.0.0.Final">
<default-configs inherit="false">
<include model="standalone" name="standalone-microprofile-ha.xml"/>
</default-configs>
</feature-pack>
<options>
<option name="jboss-maven-dist" value="true"/>
</options>
</installation>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.eap.galleon.s2i</groupId>
<artifactId>eap-s2i-galleon-pack</artifactId>
<version>3.0.0.Final</version>
<packaging>pom</packaging>
<name>EAP Galleon feature-pack for OpenShift</name>

<description>EAP Galleon feature-pack for OpenShift</description>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>

<properties>
<version.org.wildfly>${env.WILDFLY_VERSION}</version.org.wildfly>
<version.org.wildfly.galleon-plugins>${env.GALLEON_WILDFLY_VERSION}</version.org.wildfly.galleon-plugins>
</properties>

<dependencies>
<dependency>
<groupId>org.jboss.eap</groupId>
<artifactId>wildfly-galleon-pack</artifactId>
<version>${version.org.wildfly}</version>
<type>zip</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.wildfly.galleon-plugins</groupId>
<artifactId>wildfly-galleon-maven-plugin</artifactId>
<version>${version.org.wildfly.galleon-plugins}</version>
<executions>
<execution>
<id>eap-openshift-feature-pack-build</id>
<goals>
<goal>build-user-feature-pack</goal>
</goals>
<phase>compile</phase>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>

<config xmlns="urn:jboss:galleon:config:1.0" model="standalone">
<props>
<prop name="--server-config" value="standalone-openshift.xml"/>
</props>
<packages>
<package name="eap.s2i.common"/>
<package name="org.jboss.as.patching.cli"/>
<!-- packages that append content to standalone.conf -->
<package name="wildfly.s2i.jolokia"/>
<package name="wildfly.s2i.java"/>
<package name="eap.s2i.hawkular"/>
<package name="eap.s2i.prometheus"/>
<package name="wildfly.s2i.mvn"/>
<package name="docs.licenses.merge"/>
<!-- that is a workaround waiting for WF to upgrade to Galleon-plugins 4.2.5+ -->
<package name="layers.conf" optional="true"/>
<!-- Although we don't have ejb present in the default configuration, although we don't have a layer for ejb,
we could end in a situation where a custom configuration bring ejb, so the statefulset.sh script that this package
brings should be provisioned in all cases. In 7.3.x this script is only provisioned with the default config.-->
<package name="wildfly.s2i.ejb.tx.recovery" optional="true"/>
</packages>
<layers>
<!-- required by operator to be monitored -->
<include name="operator-required"/>
<!-- required for termination and script execution -->
<include name="core-tools"/>
</layers>
</config>
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" ?>

<config xmlns="urn:jboss:galleon:config:1.0" name="standalone-microprofile-ha.xml" model="standalone">

<!-- sso packages -->
<feature-group name="sso"/>

<exclude feature-id="core-service.management.security-realm.server-identity.ssl:security-realm=ApplicationRealm"/>

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


<exclude feature-id="subsystem.datasources.data-source:data-source=ExampleDS"/>
<feature spec="subsystem.ee.service.default-bindings">
<unset param="datasource"/>
</feature>
<exclude spec="subsystem.microprofile-opentracing-smallrye"/>

<!-- jgroups -->
<exclude spec="subsystem.jgroups.channel"/>
<feature spec="subsystem.jgroups.channel">
<param name="channel" value="ee"/>
<param name="stack" value="tcp"/>
<unset param="cluster"/>
</feature>
<feature spec="subsystem.jgroups.stack.protocol.FD_SOCK">
<param name="stack" value="udp"/>
<unset param="socket-binding"/>
</feature>
<feature spec="subsystem.jgroups.stack.protocol.FD_SOCK">
<param name="stack" value="tcp"/>
<unset param="socket-binding"/>
</feature>
<exclude feature-id="subsystem.jgroups.stack.protocol:stack=udp,protocol=PING"/>
<exclude feature-id="subsystem.jgroups.stack.protocol.MPING:stack=tcp"/>

<!-- we need to reconstruct to remove jgroups and ajp -->
<exclude spec="socket-binding-group.socket-binding"/>
<feature spec="socket-binding-group">
<param name="socket-binding-group" value="standard-sockets" />
<param name="port-offset" value="0"/>
<param name="default-interface" value="public"/>
<feature-group name="standalone-sockets">
<exclude feature-id="socket-binding-group.socket-binding:name=standard-sockets,socket-binding=ajp"/>
<!-- we don't want it in mp -->
<exclude feature-id="socket-binding-group.remote-destination-outbound-socket-binding:name=standard-sockets,remote-destination-outbound-socket-binding=mail-smtp"/>
</feature-group>
<feature-group name="jgroups-sockets">
<exclude feature-id="socket-binding-group.socket-binding:name=standard-sockets,socket-binding=jgroups-udp-fd"/>
<exclude feature-id="socket-binding-group.socket-binding:name=standard-sockets,socket-binding=jgroups-tcp-fd"/>
</feature-group>
</feature>

<!-- inifinispan web hibernate cache-container changes -->
<feature-group name="os-infinispan-web-repl-cache"/>
<feature-group name="os-infinispan-hibernate"/>


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

</config>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
layers=openshift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" ?>

<package-spec xmlns="urn:jboss:galleon:package:2.0" name="layers.conf">
</package-spec>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" ?>

<tasks xmlns="urn:wildfly:wildfly-feature-pack-tasks:2.0">
<!-- that is a workaround waiting for WF to upgrade to Galleon-plugins 4.2.5+ -->
<mkdir name="modules/system/layers/openshift"/>
</tasks>

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2014, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<build xmlns="urn:wildfly:feature-pack-build:3.2" producer="org.jboss.eap.galleon.s2i:eap-s2i-galleon-pack">

<transitive>
<dependency group-id="org.jboss.eap" artifact-id="wildfly-ee-galleon-pack">
<name>org.wildfly:wildfly-ee-galleon-pack</name>
</dependency>
</transitive>
<dependencies>
<dependency group-id="org.jboss.eap" artifact-id="wildfly-galleon-pack">
<name>org.wildfly:wildfly-galleon-pack</name>
<packages inherit="true"/>
<default-configs inherit="true"/>
<!-- ##PATCHES## -->
</dependency>
</dependencies>
</build>
13 changes: 13 additions & 0 deletions jboss/container/eap/galleon/config/mp/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/mp/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.mp
version: '1.0'
description: Install Galleon descriptions and EAP s2i feature-pack for mp config

execute:
- script: configure.sh
2 changes: 1 addition & 1 deletion jboss/container/eap/galleon/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Install Galleon descriptions and EAP s2i feature-pack. Configure ga

envs:
- name: S2I_FP_VERSION
value: "21.0.0.Final"
value: "3.0.0.Final"
- name: GALLEON_DEFINITIONS
value: /opt/jboss/container/eap/galleon/definitions
- name: GALLEON_MAVEN_REPO_HOOK_SCRIPT
Expand Down

0 comments on commit 7504281

Please sign in to comment.