Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeff Mesnil jmesnil

View GitHub Profile
@jmesnil
jmesnil / wildfly-tekton-pipeline.yaml
Created January 30, 2023 12:03
A Tekton pipeline to build and deploy WildFly application
View wildfly-tekton-pipeline.yaml
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: wildfly-s2i-build-task
spec:
description: >-
WildFly s2i build task. This tasks operates an S2I build then generates a DockerFile to produce a runtime image
containing the provision WildFly server and deployments (if any).
This task creates a dockerFile result and a dockerBuildContext result to be consumed by following task in the pipeline
in order to build the runtime image.
View app.yaml
# helm upgrade my-app -f ./helm.yaml ./charts/wildfly
build:
uri: https://github.com/jfdenise/2-phases-s2i
contextDir: application
s2i:
builderImage: jaxrs-builder:latest
builderKind: ImageStreamTag
@jmesnil
jmesnil / import-eap-s2i-openjdk11.sh
Created June 29, 2022 10:09
Import EAP S2I JDK11 images in OpenShift
View import-eap-s2i-openjdk11.sh
#!/bin/bash
##########################################
# Import EAP S2I JDK11 images in OpenShift
##########################################
#
# This script is used import unreleased S2I images in OpenShift image registry.
# It accepts 3 parameters:
#
# 1. the unreleased EAP S2I Builder image (e.g. registry-proxy.engineering.redhat.com/...)
@jmesnil
jmesnil / my-custom-fix-channel.yaml
Last active April 1, 2022 09:23
Channels for WildFly 27
View my-custom-fix-channel.yaml
name: Custom channel to use a specific fix for Undertow
requires:
# Stick to a specific version of WildFly
- groupId: org.wildfly
artifactId: wildfly-ee-galleon-pack
version: 27.0.0.Beta1-SNAPSHOT
streams:
# This version of Undertow will override the one specificied in the org.wildfly:wildfly-ee-galleon-pack channel
- groupId: io.undertow
artifactId: undertow-core
@jmesnil
jmesnil / local.log
Last active September 14, 2021 09:46
View local.log
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/jmesnil/Applications/apache-maven
Java version: 1.8.0_212, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/jre
Default locale: en_FR, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.annotation.* < plexus.core
[DEBUG] Imported: javax.annotation.security.* < plexus.core
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
View gist:14da71966a22787730350c485ba44839
$ make install
customresourcedefinition.apiextensions.k8s.io/wildflyservers.wildfly.org created
$ make deploy
serviceaccount/wildfly-operator created
service/wildfly-operator created
rolebinding.rbac.authorization.k8s.io/wildfly-operator-view created
deployment.apps/wildfly-operator created
@jmesnil
jmesnil / reactive-messaging-qs.yaml
Last active August 24, 2021 11:19
reactive-messaging-qs
View reactive-messaging-qs.yaml
build:
uri: https://github.com/kabir/quickstart.git
ref: WFLY-14800-reactive-features
contextDir: microprofile-reactive-messaging-kafka
s2i:
version: latest
builderImage: quay.io/kabirk/reactive-features
galleonLayers:
- cloud-server
- h2-default-datasource
View deployment.yaml
oc get deployment/reactive-messaging-qs -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "3"
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"reactive-messaging-qs:latest","namespace":"kkhan1-dev"},"fieldPath":"spec.template.spec.containers[?(@.name==\"reactive-messaging-qs\")].image"}]'
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: "2021-08-23T14:08:04Z"
generation: 4
@jmesnil
jmesnil / demo-wildfly-s2i-script.adoc
Last active May 6, 2021 12:11
Demo of wildfly-s2i script
View demo-wildfly-s2i-script.adoc

Install the script

$ cd ~/tmp
$ curl -Lo wildfly-s2i https://github.com/jmesnil/wildfly-s2i/releases/download/22.x/wildfly-s2i \
    && chmod u+x wildfly-s2i

Get some help

@jmesnil
jmesnil / wildfly-s2i
Last active May 5, 2021 10:27
Build an application image with WildFly S2I
View wildfly-s2i
#!/bin/bash
################################################
# Build an Application Image using WildFly S2I #
################################################
echo " _ ___ __ __________ ________ ____";
echo "| | / (_) /___/ / ____/ /_ __ / ___/__ \ / _/";
echo "| | /| / / / / __ / /_ / / / / / \__ \__/ / / / ";
echo "| |/ |/ / / / /_/ / __/ / / /_/ / ___/ / __/_/ / ";