From 37e5060395fa1d84f251178c6624bacb5359c603 Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Fri, 15 Jan 2021 18:34:38 +0100 Subject: [PATCH] Add JBoss EAP XP 2.0 * for full provisionned server * for bootable jar --- devfiles/index.json | 38 +++ .../devfile.yaml | 173 ++++++++++++++ .../java-jboss-eap-xp-bootable-jar/meta.yaml | 6 + devfiles/java-jboss-eap-xp/devfile.yaml | 221 ++++++++++++++++++ devfiles/java-jboss-eap-xp/meta.yaml | 6 + 5 files changed, 444 insertions(+) create mode 100644 devfiles/java-jboss-eap-xp-bootable-jar/devfile.yaml create mode 100644 devfiles/java-jboss-eap-xp-bootable-jar/meta.yaml create mode 100644 devfiles/java-jboss-eap-xp/devfile.yaml create mode 100644 devfiles/java-jboss-eap-xp/meta.yaml diff --git a/devfiles/index.json b/devfiles/index.json index 6014f65..b6c2a5d 100644 --- a/devfiles/index.json +++ b/devfiles/index.json @@ -1,4 +1,42 @@ [ + { + "name": "java-jboss-eap-xp", + "displayName": "JBoss EAP XP 2.0", + "description": "Java stack with EAP XP 2.0, OpenJDK 11 and Maven 3.5", + "tags": [ + "RHEL8", + "Java", + "OpenJDK", + "Maven", + "EAP", + "Microprofile", + "EAP XP" + ], + "projectType": "JBoss EAP XP", + "language": "java", + "links": { + "self": "/devfiles/java-jboss-eap-xp/devfile.yaml" + } + }, + { + "name": "java-jboss-eap-xp-bootable-jar", + "displayName": "JBoss EAP XP 2.0 Bootable Jar", + "description": "Java stack with EAP XP 2.0 in bootable Jar mode, OpenJDK 11 and Maven 3.5", + "tags": [ + "RHEL8", + "Java", + "OpenJDK", + "Maven", + "EAP", + "Microprofile", + "EAP XP Bootable" + ], + "projectType": "JBoss EAP XP", + "language": "java", + "links": { + "self": "/devfiles/java-jboss-eap-xp-bootable-jar/devfile.yaml" + } + }, { "name": "java-maven", "displayName": "Maven Java", diff --git a/devfiles/java-jboss-eap-xp-bootable-jar/devfile.yaml b/devfiles/java-jboss-eap-xp-bootable-jar/devfile.yaml new file mode 100644 index 0000000..87830a0 --- /dev/null +++ b/devfiles/java-jboss-eap-xp-bootable-jar/devfile.yaml @@ -0,0 +1,173 @@ +schemaVersion: 2.0.0 +metadata: + name: java-jboss-eap-xp-bootable-jar + version: 1.0.0 + website: https://access.redhat.com/products/red-hat-jboss-enterprise-application-platform/ +starterProjects: + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile Config Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-config + - name: microprofile-fault-tolerance + description: EAP XP 2.0 Eclipse Microprofile Fault Tolerance Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-fault-tolerance + - name: microprofile-health + description: EAP XP 2.0 Eclipse Microprofile Health Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-health + - name: microprofile-jwt + description: EAP XP 2.0 Eclipse Microprofile JWT Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-jwt + - name: microprofile-metrics + description: EAP XP 2.0 Eclipse Microprofile Metrics Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-metrics + - name: microprofile-openapi + description: EAP XP 2.0 Eclipse Microprofile OpenAPI Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-openapi + - name: microprofile-opentracing + description: EAP XP 2.0 Eclipse Microprofile OpenTracing Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-opentracing + - name: microprofile-rest-client + description: EAP XP 2.0 Eclipse Microprofile REST Client Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-rest-client +components: + - name: jaeger + container: + image: quay.io/jaegertracing/all-in-one:1.21.0 + memoryLimit: 128Mi + endpoints: + - name: 'tracing-ui' + targetPort: 16686 + - name: eap-xp + container: + image: registry.access.redhat.com/ubi8/openjdk-11 + memoryLimit: 1512Mi + mountSources: true + volumeMounts: + - name: m2-repository + path: /home/jboss/.m2/repository + env: + # Enabling Jaeger tracing + - name: WILDFLY_TRACING_ENABLED + value: 'true' + # Define the Jaeger service name + - name: JAEGER_SERVICE_NAME + value: 'microprofile-opentracing' + # Configure Jaeger traces + - name: JAEGER_REPORTER_LOG_SPANS + value: 'true' + - name: JAEGER_SAMPLER_TYPE + value: 'const' + - name: JAEGER_SAMPLER_PARAM + value: '1' + - name: GC_METASPACE_SIZE + value: '96' + - name: GC_MAX_METASPACE_SIZE + value: '256' + - name: JAVA_OPTS + value: '-Djava.security.egd=file:/dev/urandom' + - name: MVN_ARGS_APPEND + value: '-Pbootable-jar -s /home/jboss/.m2/settings.xml -Dmaven.repo.local=/home/jboss/.m2/repository -Dcom.redhat.xpaas.repo.jbossorg' + endpoints: + - name: 'http' + targetPort: 8080 + - name: m2-repository + volume: + size: 3Gi +commands: + - id: build + exec: + component: eap-xp + commandLine: mvn ${MVN_ARGS_APPEND} clean package + workingDir: $PROJECTS_ROOT + group: + kind: build + isDefault: true + - id: run + exec: + component: eap-xp + commandLine: mvn ${MVN_ARGS_APPEND} -Dwildfly.bootable.arguments="-b=0.0.0.0" wildfly-jar:run + workingDir: $PROJECTS_ROOT + group: + kind: run + isDefault: true + - id: debug + exec: + component: eap-xp + commandLine: mvn ${MVN_ARGS_APPEND} -Dwildfly.bootable.arguments="-b=0.0.0.0" -Dwildfly.bootable.jvmArguments="-agentlib:jdwp=transport=dt_socket,address=0.0.0.0:${DEBUG_PORT},server=y,suspend=n" wildfly-jar:run + workingDir: $PROJECTS_ROOT + group: + kind: debug + isDefault: true + - id: dev-build + exec: + component: eap-xp + commandLine: mvn ${MVN_ARGS_APPEND} -Dmaven.test.skip=true -Ddev package + workingDir: $PROJECTS_ROOT + group: + kind: build + isDefault: false + - id: dev-run + exec: + component: eap-xp + commandLine: mvn ${MVN_ARGS_APPEND} wildfly-jar:dev + workingDir: $PROJECTS_ROOT + hotReloadCapable: true + group: + kind: run + isDefault: false + - id: dev-debug + exec: + component: eap-xp + commandLine: mvn ${MVN_ARGS_APPEND} -Dwildfly.bootable.arguments="-b=0.0.0.0" -Dwildfly.bootable.jvmArguments="-agentlib:jdwp=transport=dt_socket,address=0.0.0.0:${DEBUG_PORT},server=y,suspend=n" wildfly-jar:dev + workingDir: $PROJECTS_ROOT + hotReloadCapable: true + group: + kind: debug + isDefault: false diff --git a/devfiles/java-jboss-eap-xp-bootable-jar/meta.yaml b/devfiles/java-jboss-eap-xp-bootable-jar/meta.yaml new file mode 100644 index 0000000..0303f35 --- /dev/null +++ b/devfiles/java-jboss-eap-xp-bootable-jar/meta.yaml @@ -0,0 +1,6 @@ +name: java-jboss-eap-xp-bootable-jar +displayName: JBoss EAP XP 2.0 Bootable Jar +description: Java stack with EAP XP 2.0 in bootable Jar mode, OpenJDK 11 and Maven 3.5 +tags: ["RHEL8", "Java", "OpenJDK", "Maven", "EAP", "Microprofile", "EAP XP Bootable"] +projectType: "JBoss EAP XP" +language: "java" diff --git a/devfiles/java-jboss-eap-xp/devfile.yaml b/devfiles/java-jboss-eap-xp/devfile.yaml new file mode 100644 index 0000000..0130aec --- /dev/null +++ b/devfiles/java-jboss-eap-xp/devfile.yaml @@ -0,0 +1,221 @@ +schemaVersion: 2.0.0 +metadata: + name: java-jboss-eap-xp + version: 1.0.0 + website: https://access.redhat.com/products/red-hat-jboss-enterprise-application-platform/ +starterProjects: + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile Config Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-config + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile Fault Tolerance Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-fault-tolerance + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile Health Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-health + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile JWT Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-jwt + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile Metrics Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-metrics + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile OpenAPI Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-openapi + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile OpenTracing Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-opentracing + - name: microprofile-config + description: EAP XP 2.0 Eclipse Microprofile REST Client Quickstart + git: + checkoutFrom: + remote: jboss-developer + revision: xp-2.0.x + remotes: + jboss-developer: https://github.com/jboss-developer/jboss-eap-quickstarts.git + subDir: microprofile-rest-client +components: + - name: eap-xp + container: + image: registry.redhat.io/jboss-eap-7/eap-xp2-openjdk11-openshift-rhel8 + memoryLimit: 1512Mi + mountSources: true + volumeMounts: + - name: m2-repository + path: /home/jboss/.m2/repository + env: + - name: GC_METASPACE_SIZE + value: '96' + - name: GC_MAX_METASPACE_SIZE + value: '256' + - name: GALLEON_PROVISION_LAYERS + value: 'jaxrs-server,microprofile-platform' + - name: S2I_DESTINATION_DIR + value: '/projects' + - name: STANDALONE_RESTORE + value: /home/jboss/.m2/.lucky +#Overriding s2i image config to use the copied contents and thus avoid the file permissions issue. + - name: GALLEON_LOCAL_MAVEN_REPO + value: '/tmp/galleon-m2-repository' + - name: JBOSS_HOME + value: '/projects/eap' + endpoints: + - name: 'http' + targetPort: 8080 + - name: m2-repository + volume: + size: 3Gi + - name: jaeger + container: + image: quay.io/jaegertracing/all-in-one:1.21.0 + memoryLimit: 128Mi + endpoints: + - name: 'tracing-ui' + targetPort: 16686 +commands: + - id: build + composite: + label: Build and deploy on JBoss EAP-XP Server. + commands: + - compile + - copy-artifact + parallel: false + group: + kind: build + isDefault: true + - id: compile + exec: + label: Compile and package the application + component: eap-xp + commandLine: mvn -Dmaven.test.skip=true -Dcom.redhat.xpaas.repo.jbossorg -s /home/jboss/.m2/settings.xml clean package + workingDir: $PROJECTS_ROOT + group: + kind: build + isDefault: false + - id: copy-artifact + exec: + label: Copy application artifact + component: eap-xp + commandLine: cp target/*.war $JBOSS_HOME/standalone/deployments/ROOT.war + workingDir: $PROJECTS_ROOT + group: + kind: build + isDefault: false + - id: run + exec: + label: Launch JBoss EAP-XP Server + component: eap-xp + commandLine: cp -f $STANDALONE_RESTORE/standalone-openshift.xml $JBOSS_HOME/standalone/configuration/standalone-openshift.xml && $JBOSS_HOME/bin/openshift-launch.sh + workingDir: $PROJECTS_ROOT + hotReloadCapable: true + group: + kind: run + isDefault: true + - id: debug + exec: + label: Launch JBoss EAP-XP Server with debug enabled + component: eap-xp + commandLine: cp -f $STANDALONE_RESTORE/standalone-openshift.xml $JBOSS_HOME/standalone/configuration/standalone-openshift.xml && $JBOSS_HOME/bin/openshift-launch.sh + workingDir: $PROJECTS_ROOT + hotReloadCapable: true + env: + - name: JAVA_OPTS_APPEND + value: '-Xrunjdwp:transport=dt_socket,address=0.0.0.0:$DEBUG_PORT,server=y,suspend=n -Dsun.util.logging.disableCallerCheck=true' + group: + kind: debug + isDefault: true + - id: provision-server + exec: + component: eap-xp + commandLine: /usr/local/s2i/assemble && cp -Rf $JBOSS_HOME . + workingDir: $PROJECTS_ROOT + env: + - name: JBOSS_HOME + value: '/tmp/eap' + group: + kind: build + isDefault: false + - id: store-config + exec: + component: eap-xp + commandLine: mkdir $STANDALONE_RESTORE && cp -f $JBOSS_HOME/standalone/configuration/standalone-openshift.xml $STANDALONE_RESTORE/standalone-openshift.xml + workingDir: $PROJECTS_ROOT + env: + - name: JBOSS_HOME + value: /tmp/eap + group: + kind: build + isDefault: false +#Hack to avoid the file permissions issue with the random openshift user + - id: copy-galleon + exec: + component: eap-xp + commandLine: cp -Rf /opt/jboss/container/wildfly/s2i/galleon/galleon-m2-repository /tmp/. && cp -Rf /opt/eap /tmp/. + workingDir: $PROJECTS_ROOT + group: + kind: build + isDefault: false + - id: init-server + composite: + label: Provision JBoss EAP-XP Server on post-start. + commands: + - copy-galleon + - provision-server + - store-config + parallel: false + group: + kind: build + isDefault: false + - id: cleanup + exec: + component: eap-xp + commandLine: rm -Rf eap + workingDir: $PROJECTS_ROOT + group: + kind: build + isDefault: false +events: + postStart: + - "init-server" \ No newline at end of file diff --git a/devfiles/java-jboss-eap-xp/meta.yaml b/devfiles/java-jboss-eap-xp/meta.yaml new file mode 100644 index 0000000..aa95755 --- /dev/null +++ b/devfiles/java-jboss-eap-xp/meta.yaml @@ -0,0 +1,6 @@ +name: java-jboss-eap-xp +displayName: JBoss EAP XP 2.0 +description: Java stack with EAP XP 2.0, OpenJDK 11 and Maven 3.5 +tags: ["RHEL8", "Java", "OpenJDK", "Maven", "EAP", "Microprofile", "EAP XP"] +projectType: "JBoss EAP XP" +language: "java"