From c616b0e0236822a4d5111c15426f5c7983d54db6 Mon Sep 17 00:00:00 2001 From: Jeff Mesnil Date: Wed, 27 Nov 2024 13:49:20 +0100 Subject: [PATCH] Add example for EAP 8.1 Signed-off-by: Jeff Mesnil --- examples/eap81/getting-started/README.adoc | 61 ++++++++++++++++++++++ examples/eap81/getting-started/app.yaml | 2 + 2 files changed, 63 insertions(+) create mode 100644 examples/eap81/getting-started/README.adoc create mode 100644 examples/eap81/getting-started/app.yaml diff --git a/examples/eap81/getting-started/README.adoc b/examples/eap81/getting-started/README.adoc new file mode 100644 index 0000000..d55809c --- /dev/null +++ b/examples/eap81/getting-started/README.adoc @@ -0,0 +1,61 @@ +# Install a EAP 8.1 Application +:toc: left +:icons: font +:idprefix: +:idseparator: - +:keywords: openshift,wildfly,microprofile,helm + +This example shows how to deploy a Java application with EAP 8.1 on OpenShift. + +## Prerequisites + +## Source Code + +The source code for the backend is hosted at https://github.com/jboss-eap-up-and-running/eap81-getting-started.git + +It is a simple application that uses JAX-RS to exposes HTTP endpoint. + +## Installation + +[source,options="nowrap"] +---- +$ helm install eap81-app -f examples/eap81/getting-started/app.yaml ./charts/eap81 +---- + +## Deployment + +Once the chart is installed, let's wait for the application to be built and deployed: + +[source,options="nowrap"] +---- +$ oc get deployment/eap81-app -w +NAME READY UP-TO-DATE AVAILABLE AGE +eap81-app 0/1 1 0 27s +... +eap81-app 1/1 1 1 5m29s +---- + +## Use the application + +Once the application is deployed on OpenShift, it can be accessed from the route `eap81-app`. +Let's find the host that we can use to connect to this backend: + +[source,options="nowrap"] +---- +$ oc get route eap81-app -o jsonpath="{.spec.host}" +eap81-app-jmesnil1-dev.apps.sandbox.x8i5.p1.openshiftapps.com +---- + +This value will be different for every installation of the application. + +We can then query this application by calling its HTTP endpoint from the URL above. + +## Clean up + +The application can be deleted by running the command: + +[source,options="nowrap"] +---- +$ helm delete eap81-app +release "eap81-app " uninstalled +---- \ No newline at end of file diff --git a/examples/eap81/getting-started/app.yaml b/examples/eap81/getting-started/app.yaml new file mode 100644 index 0000000..bc07029 --- /dev/null +++ b/examples/eap81/getting-started/app.yaml @@ -0,0 +1,2 @@ +build: + uri: https://github.com/jboss-eap-up-and-running/eap81-getting-started.git \ No newline at end of file