eap74

by joaquinito2051

Helm chartv1.1.2App 7.4

Build and deploy JBoss EAP 7.4 applications on OpenShift

About this chart

Helm Chart for EAP7.4

A Helm chart for building and deploying a JBoss EAP 7.4 application on OpenShift.

The Helm Chart for EAP 7.4 is a Technology Preview feature only.

Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information, see Technology Preview Features Support Scope.

Building and Deploying Applications

The build and deploy steps are configured in separate build and deploy values.

The input of the build step is a Git repository that contains the application code and the output is an ImageStreamTag resource that contains the built application image.

The input of the deploy step is an application image (coming from the build output or from an external Docker registry) and the output is a Deployment and other related resources to access the application from inside and outside OpenShift.

Prerequisites

Below are prerequisites that may apply to your use case.

Pull Secret

You will need to create a pull secret to pull the EAP Builder and Runtime images from the Red Hat Container Catalog that requires authentication. Use the following command as a reference to create your pull secret:

$ oc create secret docker-registry my-pull-secret --docker-server=registry.redhat.io --docker-username=$USERNAME --docker-password=$PASSWORD --docker-email=$EMAIL

You can use this secret by passing --set build.pullSecret=eap-pull-secret to helm install, or you can configure this in a values file:

build:
  pullSecret: eap-pull-secret

Push Secret

You will need to create a push secret if you want to push your image to an external registry. Use the following command as a reference to create your push secret:

oc create secret docker-registry my-push-secret --docker-server=$SERVER_URL --docker-username=$USERNAME --docker-password=$PASSWORD --docker-email=$EMAIL

You can use this secret by passing --set build.output.pushSecret=my-push-secret and --set build.output.kind=DockerImage, or you can configure these in a values file:

build:
  output:
    kind: DockerImage
    pushSecret: my-push-secret

Application Image

The configuration for the image that is built and deployed is configured in a image section.

ValueDescriptionDefaultAdditional Information
image.nameName of the image you want to build/deployDefaults to the Helm release name.The chart will create/reference an ImageStream based on this value.
image.tagTag that you want to build/deploylatestThe chart will create/reference an ImageStreamTag based on the name provided

Building the Application

The configuration to build the application image is configured in a build section.

ValueDescriptionDefaultAdditional Information
build.enabledDetermines if build-related resources should be created.trueSet this to false if you want to deploy a previously built image. Leave this set to true if you want to build and deploy a new image.
build.uri(required) Git URI that references your git repohttps://github.com/jboss-eap-up-and-running/eap7-getting-startedBe sure to specify this to build your own application.
build.refGit ref containing the application you want to build--
build.contextDirThe sub-directory where the application source code exists--
build.output.kindDetermines if the image will be pushed to an ImageStreamTag or a DockerImageImageStreamTagOpenShift Documentation
build.output.pushSecretPush secret name-The secret must exist in the same namespace or the chart will fail to install - Used only if build.output.kind is DockerImage
build.pullSecretImage pull secret-The secret must exist in the same namespace or the chart will fail to install - OpenShift documentation
build.modeDetermines the mode to build the application image with EAP 7s2iAllowed values: s2i
build.envFreeform env items-Kubernetes documentation. These environment variables will be used when the application is built. If you need to specify environment variables for the running application, use deploy.env instead.
build.resourcesFreeform resources items-Kubernetes documentation
build.imagesFreeform images injected in the source during build-OpenShift documentation
build.triggers.githubSecretName of the secret containing the WebHookSecretKey for the GitHub Webhook-The secret must exist in the same namespace or the chart will fail to install - OpenShift documentation
build.triggers.genericSecretName of the secret containing the WebHookSecretKey for the Generic Webhook-The secret must exist in the same namespace or the chart will fail to install - OpenShift documentation
build.s2iConfiguration specific to building with EAP S2I images--
build.s2i.versionVersion of the EAP S2I imagesDefaults to this chart AppVersion-
build.s2i.jdkJDK Version of the EAP S2I images"11"Allowed Values: "8", "11"
build.s2i.archArchitecture of the EAP S2I imagesamd64Allowed Values: amd64
build.s2i.amd64.jdk8.builderImageEAP S2I Builder image for JDK 8 (for amd64 arch)registry.redhat.io/jboss-eap-7/eap74-openjdk8-openshift-rhel7EAP Documentation
build.s2i.amd64.jdk8.runtimeImageEAP S2I Runtime image for JDK 8 (for amd64 arch)registry.redhat.io/jboss-eap-7/eap74-openjdk8-runtime-openshift-rhel7EAP Documentation
build.s2i.amd64.jdk11.builderImageEAP S2I Builder image for JDK 11 (for amd64 arch)registry.redhat.io/jboss-eap-7/eap74-openjdk11-openshift-rhel8EAP Documentation
build.s2i.amd64.jdk11.runtimeImageEAP S2I Runtime image for JDK 11 (for amd64 arch)registry.redhat.io/jboss-eap-7/eap74-openjdk11-runtime-openshift-rhel8EAP Documentation
build.s2i.galleonLayersA list of layer names to compose a EAP server-EAP Documentation
build.s2i.galleonDirDirectory relative to the root directory for the build that contains custom content for Galleon.-EAP Documentation - since EAP 7.4
build.s2i.featurePacksList of additional Galleon feature-packs identified by Maven coordinates (<groupId>:<artifactId>:<version>)-The value can be be either a string with a list of comma-separated Maven coordinate or an array where each item is the Maven coordinate of a feature pack - EAP Documentation - since EAP 7.4

Deploying the Application

The configuration to build the application image is configured in a deploy section.

ValueDescriptionDefaultAdditional Information
deploy.enabledDetermines if deployment-related resources should be created.trueSet this to false if you do not want to deploy an application image built by this chart.
deploy.replicasNumber of pod replicas to deploy.1OpenShift Documentation
deploy.route.enabledDetermines if a Route should be createdtrueAllows clients outside of OpenShift to access your application
deploy.route.tls.enabledDetermines if the Route should be TLS-encryptedtrueOpenShift Documentation
deploy.route.tls.terminationDetermines the type of TLS termination to useedgeAllowed values: edge, reencrypt, passthrough
deploy.route.tls.insecureEdgeTerminationPolicyDetermines if insecure traffic should be redirectedRedirectAllowed values: Allow, Disable, Redirect
deploy.envFreeform env items-Kubernetes documentation. These environment variables will be used when the application is running. If you need to specify environment variables when the application is built, use build.env instead.
deploy.envFromFreeform envFrom items-Kubernetes documentation. These environment variables will be used when the application is running. If you need to specify environment variables when the application is built, use build.envFrom instead.
deploy.resourcesFreeform resources items-Kubernetes documentation
deploy.livenessProbeFreeform livenessProbe field.HTTP Get on <ip>:admin/health/liveKubernetes documentation
deploy.readinessProbeFreeform readinessProbe field.HTTP Get on <ip>:admin/health/readyKubernetes documentation
deploy.volumeMountsFreeform volumeMounts items-Kubernetes Documentation
deploy.volumesFreeform volumes items-Kubernetes Documentation
deploy.initContainersFreeform initContainers items-Kubernetes Documentation
deploy.extraContainersFreeform extra containers items-Kubernetes Documentation

Deploy eap74 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has eap74 on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charteap74 is pinned at v1.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply