Skip to content

Instantly share code, notes, and snippets.

View jmesnil's full-sized avatar

Jeff Mesnil jmesnil

View GitHub Profile
@jmesnil
jmesnil / demo-wildfly-s2i-script.adoc
Last active May 6, 2021 12:11
Demo of wildfly-s2i script

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
#!/bin/bash
################################################
# Build an Application Image using WildFly S2I #
################################################
echo " _ ___ __ __________ ________ ____";
echo "| | / (_) /___/ / ____/ /_ __ / ___/__ \ / _/";
echo "| | /| / / / / __ / /_ / / / / / \__ \__/ / / / ";
echo "| |/ |/ / / / /_/ / __/ / / /_/ / ___/ / __/_/ / ";
# This configuration file can be used to build and deploy the todo-backend
# quickstart on OpenShift with the Helm Chart for WildFly.
build:
uri: https://github.com/wildfly/quickstart.git
mode: s2i
ref: master
s2i:
galleonLayers:
- cloud-server
- postgresql-datasource
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: hello-world.info
http:
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: microprofile-config-app
spec:
output:
to:
kind: ImageStreamTag
name: 'microprofile-config-app:latest'
strategy:
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: example
spec:
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
# HELP base_classloader_loadedClasses_total Displays the total number of classes that have been loaded since the Java virtual machine has started execution.
# TYPE base_classloader_loadedClasses_total counter
base_classloader_loadedClasses_total 21573.0
# HELP base_classloader_loadedClasses_count Displays the number of classes that are currently loaded in the Java virtual machine.
# TYPE base_classloader_loadedClasses_count gauge
base_classloader_loadedClasses_count 21517.0
# HELP base_classloader_unloadedClasses_total Displays the total number of classes unloaded since the Java virtual machine has started execution.
# TYPE base_classloader_unloadedClasses_total counter
base_classloader_unloadedClasses_total 57.0
# HELP base_cpu_availableProcessors Displays the number of processors available to the Java virtual machine. This value may change during a particular invocation of the virtual machine.
crc start --log-level debug
DEBU No new version available. The latest version is 1.11.0
INFO Checking if oc binary is cached
DEBU oc binary already cached
INFO Checking if podman remote binary is cached
DEBU Currently podman remote is not supported
INFO Checking if goodhosts binary is cached
DEBU goodhost binary already cached
INFO Checking if running as non-root
INFO Checking if HyperKit is installed
#!/bin/bash
set +x
EAP_VERSION=1.0
expose_openshift_internal_registry() {
OPENSHIFT_URL=`oc whoami --show-server`
oc patch configs.imageregistry.operator.openshift.io/cluster -p='{"spec":{"defaultRoute":true}}' --type=merge
oc create serviceaccount registry || echo "Service Account registry already exists"
oc adm policy add-cluster-role-to-user admin -z registry
<subsystem xmlns="urn:jboss:domain:infinispan:9.0">
<cache-container name="web" default-cache="repl" module="org.wildfly.clustering.web.infinispan">
<transport lock-timeout="60000"/>
<replicated-cache name="repl">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
<file-store/>
</replicated-cache>
<replicated-cache name="sso">
<locking isolation="REPEATABLE_READ"/>