From 2865baf97c154841f1eadfedb8f11a14fe781126 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 21 May 2024 14:15:37 +0200 Subject: [PATCH 01/13] [WFLY-19335] Initial README for k8s --- helloworld/README-source.adoc | 5 +- ...nd-run-the-quickstart-with-kubernetes.adoc | 27 ++++++ ...and-run-the-quickstart-with-openshift.adoc | 3 +- ...uickstart-for-cloud-platform-internal.adoc | 92 ++++++++++++++++++ .../build-the-quickstart-for-kubernetes.adoc | 6 ++ .../build-the-quickstart-for-openshift.adoc | 95 +------------------ shared-doc/helm-deploy-project.adoc | 63 ++++++++++-- ...m-getting-started-overview-kubernetes.adoc | 6 ++ ...m-getting-started-overview-openshift.adoc} | 0 shared-doc/helm-pre-requisites.adoc | 4 +- shared-doc/helm-undeploy-project.adoc | 2 +- ...run-integration-tests-with-kubernetes.adoc | 20 ++++ 12 files changed, 219 insertions(+), 104 deletions(-) create mode 100644 shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc create mode 100644 shared-doc/build-the-quickstart-for-cloud-platform-internal.adoc create mode 100644 shared-doc/build-the-quickstart-for-kubernetes.adoc create mode 100644 shared-doc/helm-getting-started-overview-kubernetes.adoc rename shared-doc/{helm-getting-started-overview.adoc => helm-getting-started-overview-openshift.adoc} (100%) create mode 100644 shared-doc/run-integration-tests-with-kubernetes.adoc diff --git a/helloworld/README-source.adoc b/helloworld/README-source.adoc index 8e8e2efe2b..979c7e1d29 100644 --- a/helloworld/README-source.adoc +++ b/helloworld/README-source.adoc @@ -44,4 +44,7 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProdxuctRelease,EAPXPRelease[] +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc b/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc new file mode 100644 index 0000000000..d9946203b7 --- /dev/null +++ b/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc @@ -0,0 +1,27 @@ +:cloud-platform: Kubernetes +:kubernetes: true +ifndef::helm-app-name[] +:helm-app-name: {artifactId} +endif::helm-app-name[] + +[[build_and_run_the_quickstart_on_kubernetes]] += Building and running the quickstart application with Kubernetes +// The openshift profile +include::../shared-doc/build-the-quickstart-for-kubernetes.adoc[leveloffset=+1] +// Getting Started with Helm +include::../shared-doc/helm-getting-started-overview-kubernetes.adoc[leveloffset=+1] + +ifdef::helm-install-prerequisites[] +// Additional steps needed before deploying in Helm +[[deploy_helm_prerequisites]] +include::{helm-install-prerequisites}[leveloffset=+1] +endif::helm-install-prerequisites[] + +//Prepare Helm for Quickstart Deployment +include::../shared-doc/helm-deploy-project.adoc[leveloffset=+1] + +// Testing on Openshift +include::../shared-doc/run-integration-tests-with-kubernetes.adoc[leveloffset=+1] + +//Prepare Helm for Quickstart Deployment +include::../shared-doc/helm-undeploy-project.adoc[leveloffset=+1] diff --git a/shared-doc/build-and-run-the-quickstart-with-openshift.adoc b/shared-doc/build-and-run-the-quickstart-with-openshift.adoc index 76c117ca14..e671fc65ef 100644 --- a/shared-doc/build-and-run-the-quickstart-with-openshift.adoc +++ b/shared-doc/build-and-run-the-quickstart-with-openshift.adoc @@ -1,3 +1,4 @@ +:cloud-platform: OpenShift ifndef::helm-app-name[] :helm-app-name: {artifactId} endif::helm-app-name[] @@ -7,7 +8,7 @@ endif::helm-app-name[] // The openshift profile include::../shared-doc/build-the-quickstart-for-openshift.adoc[leveloffset=+1] // Getting Started with Helm -include::../shared-doc/helm-getting-started-overview.adoc[leveloffset=+1] +include::../shared-doc/helm-getting-started-overview-openshift.adoc[leveloffset=+1] ifdef::helm-install-prerequisites[] // Additional steps needed before deploying in Helm diff --git a/shared-doc/build-the-quickstart-for-cloud-platform-internal.adoc b/shared-doc/build-the-quickstart-for-cloud-platform-internal.adoc new file mode 100644 index 0000000000..7a469d1d44 --- /dev/null +++ b/shared-doc/build-the-quickstart-for-cloud-platform-internal.adoc @@ -0,0 +1,92 @@ +ifndef::ProductRelease,EAPXPRelease[] +The server provisioning functionality is provided by the WildFly Maven Plugin, and you may find its configuration in the quickstart `pom.xml`: +endif::[] +ifdef::ProductRelease,EAPXPRelease[] +The server provisioning functionality is provided by the EAP Maven Plugin, and you may find its configuration in the quickstart `pom.xml`: +endif::[] + +ifndef::ProductRelease,EAPXPRelease[] + +[source,xml,subs="attributes+"] +---- + + openshift + + + + org.wildfly.plugins + wildfly-maven-plugin + + + ${version.server} + cloud + + + ROOT.war + ... + + + + + package + + + + + ... + + + +---- +You may note that unlike the `provisioned-server` profile it uses the cloud context which enables a configuration tuned for {cloud-platform} environment. + +The plugin uses https://github.com/wildfly/wildfly-glow[WildFly Glow] to discover the feature packs and layers required to run the application, and provisions a server containing those layers. + +If you get an error or the server is missing some functionality which cannot be auto-discovered, you can download the https://github.com/wildfly/wildfly-glow/releases[WildFly Glow CLI] and run the following command to see more information about what add-ons are available: +[source,shell] +---- +wildfly-glow show-add-ons +---- +endif::ProductRelease,EAPXPRelease[] + +ifdef::ProductRelease,EAPXPRelease[] +[source,xml,subs="attributes+"] +---- + + openshift + + + + org.jboss.eap.plugins + eap-maven-plugin + + ... + + + org.jboss.eap:wildfly-ee-galleon-pack + + + org.jboss.eap.cloud:eap-cloud-galleon-pack + + + ... + ROOT.war + + + + + package + + + + + ... + + + +---- +You may note that it uses the cloud feature pack which enables a configuration tuned for the {cloud-platform} environment. +endif::[] diff --git a/shared-doc/build-the-quickstart-for-kubernetes.adoc b/shared-doc/build-the-quickstart-for-kubernetes.adoc new file mode 100644 index 0000000000..b42063315f --- /dev/null +++ b/shared-doc/build-the-quickstart-for-kubernetes.adoc @@ -0,0 +1,6 @@ +[[build-the-quickstart-for-kubernetes]] +== Build the {productName} Quickstart to Kubernetes with Helm Charts + +For Kubernetes, the build with Apache Maven uses an `openshift` Maven profile to provision a {productName} server, suitable for running on Kubernetes. + +include::../shared-doc/build-the-quickstart-for-cloud-platform-internal.adoc[] diff --git a/shared-doc/build-the-quickstart-for-openshift.adoc b/shared-doc/build-the-quickstart-for-openshift.adoc index 50ba1441d6..625e07c315 100644 --- a/shared-doc/build-the-quickstart-for-openshift.adoc +++ b/shared-doc/build-the-quickstart-for-openshift.adoc @@ -1,97 +1,6 @@ [[build-the-quickstart-for-openshift]] -== Build the {productName} Source-to-Image (S2I) Quickstart to OpenShift with Helm Charts +== Build the {productName} Source-to-Image (S2I) Quickstart to {cloud-platform} with Helm Charts On OpenShift, the S2I build with Apache Maven uses an `openshift` Maven profile to provision a {productName} server, deploy and run the quickstart in OpenShift environment. -ifndef::ProductRelease,EAPXPRelease[] -The server provisioning functionality is provided by the WildFly Maven Plugin, and you may find its configuration in the quickstart `pom.xml`: -endif::[] -ifdef::ProductRelease,EAPXPRelease[] -The server provisioning functionality is provided by the EAP Maven Plugin, and you may find its configuration in the quickstart `pom.xml`: -endif::[] - -ifndef::ProductRelease,EAPXPRelease[] - -[source,xml,subs="attributes+"] ----- - - openshift - - - - org.wildfly.plugins - wildfly-maven-plugin - - - ${version.server} - cloud - - - ROOT.war - ... - - - - - package - - - - - ... - - - ----- -You may note that unlike the `provisioned-server` profile it uses the cloud context which enables a configuration tuned for OpenShift environment. - -The plugin uses https://github.com/wildfly/wildfly-glow[WildFly Glow] to discover the feature packs and layers required to run the application, and provisions a server containing those layers. - -If you get an error or the server is missing some functionality which cannot be auto-discovered, you can download the https://github.com/wildfly/wildfly-glow/releases[WildFly Glow CLI] and run the following command to see more information about what add-ons are available: -[source,shell] ----- -wildfly-glow show-add-ons ----- -endif::ProductRelease,EAPXPRelease[] - -ifdef::ProductRelease,EAPXPRelease[] -[source,xml,subs="attributes+"] ----- - - openshift - - - - org.jboss.eap.plugins - eap-maven-plugin - - ... - - - org.jboss.eap:wildfly-ee-galleon-pack - - - org.jboss.eap.cloud:eap-cloud-galleon-pack - - - ... - ROOT.war - - - - - package - - - - - ... - - - ----- -You may note that it uses the cloud feature pack which enables a configuration tuned for OpenShift environment. -endif::[] +include::../shared-doc/build-the-quickstart-for-cloud-platform-internal.adoc[] \ No newline at end of file diff --git a/shared-doc/helm-deploy-project.adoc b/shared-doc/helm-deploy-project.adoc index 37e29351c0..e84da4bde0 100644 --- a/shared-doc/helm-deploy-project.adoc +++ b/shared-doc/helm-deploy-project.adoc @@ -1,20 +1,58 @@ - ifeval::[{useHelmChartDir} == true] :helm_chart_values: charts endif::[] ifndef::useHelmChartDir[] :helm_chart_values: -f charts/helm.yaml {helmChartName} endif::[] +ifdef::kubernetes[] +:helm-extra-arguments: --set build.enabled=false --set deploy.route.enabled=false --set image.name="localhost:5000/{artifactId}" +:cloud-cli: kubectl +endif::[] +ifndef::kubernetes[] +:helm-extra-arguments: +:cloud-cli: oc +endif::[] [[deploy_helm]] -== Deploy the {ProductShortName} Source-to-Image (S2I) Quickstart to OpenShift with Helm Charts +== Deploy the {ProductShortName} Source-to-Image (S2I) Quickstart to {cloud-platform} with Helm Charts +ifndef::kubernetes[] Log in to your OpenShift instance using the `oc login` command. -The backend will be built and deployed on OpenShift with a Helm Chart for {productName}. +endif::[] +The backend will be built and deployed on {cloud-platform} with a Helm Chart for {productName}. + +ifndef::kubernetes[] Navigate to the root directory of this quickstart and run the following command: +endif::[] +ifdef::kubernetes[] +Navigate to the root directory of this quickstart and run the following commands: + +[source,options="nowrap",subs="+attributes"] +---- +mvn -Popenshift package wildfly:image +---- +This will use the `openshift` Maven profile we saw earlier to build the application, and create a Docker image containing the {productName} server with the application deployed. The name of the image will be `{artifactId}`. + +Next we need to tag the image and make it available to Kubernetes. You can push it to a registry like `quay.io`. In this case we tag as `localhost:5000/helloworld:latest` and push it to the internal registry in our Kubernetes instance: + +[source,options="nowrap",subs="+attributes"] +---- +# Tag the image +docker tag {artifactId} localhost:5000/{artifactId}:latest +# Push the image to the registry +docker push localhost:5000/{artifactId}:latest +---- + +In the below call to `helm install` which deploys our application to Kubernetes, we are passing in some extra arguments to tweak the Helm build: + +* `--set build.enabled=false` - This turns off the s2i build for the Helm chart since Kubernetes, unlike OpenShift, does not have s2i. Instead we are providing the image to use. +* `--set deploy.route.enabled=false` - This disables route creation normally performed by the Helm chart. On Kubernetes we will use port-forwards instead to access our application, since routes are an OpenShift specific concept and thus not available on Kubernetes. +* `--set image.name="localhost:5000/{artifactId}"` - This tells the Helm chart to use the image we built, tagged and pushed to Kubernetes' internal registry above. + +endif::[] [source,options="nowrap",subs="+attributes"] ---- -$ helm install {helm-app-name} {helm_chart_values} --wait --timeout=10m0s +$ helm install {helm-app-name} {helm_chart_values} --wait --timeout=10m0s {helm-extra-arguments} NAME: {helm-app-name} ... STATUS: deployed @@ -25,7 +63,7 @@ This command will return once the application has successfully deployed. In case [source,options="nowrap",subs="+attributes"] ---- -oc get deployment {helm-app-name} +{cloud-cli} get deployment {helm-app-name} ---- The Helm Chart for this quickstart contains all the information to build an image from the source code using S2I on Java 17: @@ -61,7 +99,7 @@ deploy: ---- endif::requires-http-route[] -This will create a new deployment on OpenShift and deploy the application. +This will create a new deployment on {cloud-platform} and deploy the application. If you want to see all the configuration elements to customize your deployment you can use the following command: [source,options="nowrap",subs="+attributes"] @@ -69,7 +107,7 @@ If you want to see all the configuration elements to customize your deployment y $ helm show readme {helmChartName} ---- - +ifndef::kubernetes[] Get the URL of the route to the deployment. [source,options="nowrap",subs="+attributes"] @@ -77,7 +115,18 @@ Get the URL of the route to the deployment. $ oc get route {helm-app-name} -o jsonpath="{.spec.host}" ---- Access the application in your web browser using the displayed URL. +endif::[] +ifdef::kubernetes[] +To be able to connect to our application running in Kubernetes from outside, we need to set up a port-forward to the `{helm-app-name}` service created for us by the Helm chart. + +This service will run on port `8080`, and we set up the port forward to also run on port `8080`. +[source,options="nowrap",subs="+attributes"] +---- +kubectl port-forward service/helloworld 8080:8080 +---- +The server can now be accessed via `http://localhost:8080` from outside Kubernetes +endif::[] [NOTE] ==== The Maven profile named `openshift` is used by the Helm chart to provision the server with the quickstart deployed on the root web context, and thus the application should be accessed with the URL without the `/{artifactId}` path segment after `HOST:PORT`. diff --git a/shared-doc/helm-getting-started-overview-kubernetes.adoc b/shared-doc/helm-getting-started-overview-kubernetes.adoc new file mode 100644 index 0000000000..c6a575c459 --- /dev/null +++ b/shared-doc/helm-getting-started-overview-kubernetes.adoc @@ -0,0 +1,6 @@ +[[getting_started_with_helm]] += Getting Started with Kubernetes and Helm Charts + +This section contains the basic instructions to build and deploy this quickstart to Kubernetes using Helm Charts. + +include::../shared-doc/helm-pre-requisites.adoc[] \ No newline at end of file diff --git a/shared-doc/helm-getting-started-overview.adoc b/shared-doc/helm-getting-started-overview-openshift.adoc similarity index 100% rename from shared-doc/helm-getting-started-overview.adoc rename to shared-doc/helm-getting-started-overview-openshift.adoc diff --git a/shared-doc/helm-pre-requisites.adoc b/shared-doc/helm-pre-requisites.adoc index 19d6b9550c..41dae8032e 100644 --- a/shared-doc/helm-pre-requisites.adoc +++ b/shared-doc/helm-pre-requisites.adoc @@ -1,8 +1,10 @@ [[prerequisites_helm_openshift]] == Prerequisites +ifndef::kubernetes[] * You must be logged in OpenShift and have an `oc` client to connect to OpenShift -* https://helm.sh[Helm] must be installed to deploy the backend on OpenShift. +endif::[] +* https://helm.sh[Helm] must be installed to deploy the backend on {cloud-platform}. Once you have installed Helm, you need to add the repository that provides Helm Charts for {productName}. diff --git a/shared-doc/helm-undeploy-project.adoc b/shared-doc/helm-undeploy-project.adoc index ba19b574f1..a27079d7cf 100644 --- a/shared-doc/helm-undeploy-project.adoc +++ b/shared-doc/helm-undeploy-project.adoc @@ -1,5 +1,5 @@ [[undeploy_helm]] -== Undeploy the {ProductShortName} Source-to-Image (S2I) Quickstart from OpenShift with Helm Charts +== Undeploy the {ProductShortName} Source-to-Image (S2I) Quickstart from {cloud-platform} with Helm Charts [source,options="nowrap",subs="+attributes"] ---- diff --git a/shared-doc/run-integration-tests-with-kubernetes.adoc b/shared-doc/run-integration-tests-with-kubernetes.adoc new file mode 100644 index 0000000000..813eef4058 --- /dev/null +++ b/shared-doc/run-integration-tests-with-kubernetes.adoc @@ -0,0 +1,20 @@ +[[run_the_integration_tests_with_kubernetes]] += Run the Integration Tests with Kubernetes +The integration tests included with this quickstart, which verify that the quickstart runs correctly, may also be run with the quickstart running on Kubernetes. +[NOTE] +==== +The integration tests expect a deployed application, so make sure you have deployed the quickstart on Kubernetes before you begin. +==== + +ifdef::extra-kubernetes-testing-actions[] +include::{extra-kubernetes-testing-actions}[leveloffset=+1] +endif::extra-kubernetes-testing-actions[] + +ifndef::extra-kubernetes-test-arguments[:extra-kubernetes-test-arguments:] + +Run the integration tests using the following command to run the `verify` goal with the `integration-testing` profile activated and the proper URL: +[source,options="nowrap",subs="+attributes"] +---- +$ mvn verify -Pintegration-testing -Dserver.host=http://localhost:8080 {extra-openshift-test-arguments} +---- + From 323c81eddc7c89828580337266e287040e768862 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 21 May 2024 17:24:13 +0100 Subject: [PATCH 02/13] [WFLY-19335] Add initial instructions for running Minikube --- ...m-getting-started-overview-kubernetes.adoc | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/shared-doc/helm-getting-started-overview-kubernetes.adoc b/shared-doc/helm-getting-started-overview-kubernetes.adoc index c6a575c459..b0aaa18cd4 100644 --- a/shared-doc/helm-getting-started-overview-kubernetes.adoc +++ b/shared-doc/helm-getting-started-overview-kubernetes.adoc @@ -3,4 +3,35 @@ This section contains the basic instructions to build and deploy this quickstart to Kubernetes using Helm Charts. +== Install Kubernetes +In this example we are using https://github.com/kubernetes/minikube[Minikube] as our Kubernetes provider. See the https://minikube.sigs.k8s.io/docs/start/[Minikube Getting Started guide] for how to install it. After installing it, we start it with 4GB of memory. + +[source,options="nowrap",subs="+attributes"] +---- +minikube start --memory='4gb' +---- +The above command should work if you have Docker installed on your machine. If, you are using https://podman-desktop.io[Podman] instead of Docker, you will also need to pass in `--driver=podman`, as covered in the https://minikube.sigs.k8s.io/docs/handbook/config/[Minikube documentation]. + +Once Minikube has started, we need to enable its https://minikube.sigs.k8s.io/docs/handbook/registry/[registry] since that is where we will push the image needed to deploy the quickstart, and where we will tell the Helm charts to download it from. + +[source,options="nowrap",subs="+attributes"] +---- +minikube addons enable registry +---- + +In order to be able to push images to the registry we need to make it accessible from outside Kubernetes. How we do this depends on your operating system. All the below examples will expose it at `localhost:5000` + +[source,options="nowrap",subs="+attributes"] +---- +# On Mac: +docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000" + +# On Linux: +kubectl port-forward --namespace kube-system service/registry 5000:80 & + +# On Windows: +kubectl port-forward --namespace kube-system service/registry 5000:80 +docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:host.docker.internal:5000" +---- + include::../shared-doc/helm-pre-requisites.adoc[] \ No newline at end of file From 484ba35272679919fca411d94e0072f0513c36b6 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 21 May 2024 20:34:19 +0100 Subject: [PATCH 03/13] [WFLY-19335] Add Kubernetes to the simple quickstarts --- batch-processing/README-source.adoc | 6 +++++- bmt/README-source.adoc | 5 ++++- cmt/README-source.adoc | 6 +++++- ee-security/README-source.adoc | 5 ++++- ejb-remote/README-source.adoc | 6 +++++- ejb-timer/README-source.adoc | 4 ++++ helloworld-mdb/README-source.adoc | 5 ++++- helloworld-singleton/README-source.adoc | 6 +++++- helloworld-ws/README-source.adoc | 6 +++++- helloworld/README-source.adoc | 3 ++- hibernate/README-source.adoc | 4 ++++ jaxrs-client/README-source.adoc | 4 ++++ jaxrs-jwt/README-source.adoc | 6 +++++- jaxws-ejb/README-source.adoc | 6 +++++- jaxws-retail/README-source.adoc | 6 +++++- jsonp/README-source.adoc | 5 ++++- kitchensink/README-source.adoc | 6 +++++- logging/README-source.adoc | 4 ++++ microprofile-config/README-source.adoc | 4 ++++ microprofile-fault-tolerance/README-source.adoc | 4 ++++ microprofile-jwt/README-source.adoc | 4 ++++ microprofile-lra/README-source.adoc | 4 ++++ microprofile-openapi/README-source.adoc | 4 ++++ microprofile-rest-client/README-source.adoc | 5 +++++ numberguess/README-source.adoc | 6 +++++- servlet-async/README-source.adoc | 6 +++++- servlet-filterlistener/README-source.adoc | 6 +++++- servlet-security/README-source.adoc | 4 ++++ spring-resteasy/README-source.adoc | 4 ++++ tasks-jsf/README-source.adoc | 6 +++++- temperature-converter/README-source.adoc | 6 +++++- thread-racing/README-source.adoc | 6 +++++- websocket-endpoint/README-source.adoc | 6 +++++- websocket-hello/README-source.adoc | 6 +++++- 34 files changed, 152 insertions(+), 22 deletions(-) diff --git a/batch-processing/README-source.adoc b/batch-processing/README-source.adoc index 9370abe18d..1f4573932c 100644 --- a/batch-processing/README-source.adoc +++ b/batch-processing/README-source.adoc @@ -141,4 +141,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/bmt/README-source.adoc b/bmt/README-source.adoc index 71312609a5..a884f8da42 100644 --- a/bmt/README-source.adoc +++ b/bmt/README-source.adoc @@ -75,7 +75,10 @@ include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] endif::[] - +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] //************************************************* // Product Release content only //************************************************* diff --git a/cmt/README-source.adoc b/cmt/README-source.adoc index 06c954fe75..f362e0b929 100644 --- a/cmt/README-source.adoc +++ b/cmt/README-source.adoc @@ -87,4 +87,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/ee-security/README-source.adoc b/ee-security/README-source.adoc index ecd5544742..a7c252be6f 100644 --- a/ee-security/README-source.adoc +++ b/ee-security/README-source.adoc @@ -130,4 +130,7 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] - +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/ejb-remote/README-source.adoc b/ejb-remote/README-source.adoc index 40c45d529b..877c2fbaa3 100644 --- a/ejb-remote/README-source.adoc +++ b/ejb-remote/README-source.adoc @@ -103,4 +103,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/ejb-timer/README-source.adoc b/ejb-timer/README-source.adoc index 14946c6e32..9781df4b0b 100644 --- a/ejb-timer/README-source.adoc +++ b/ejb-timer/README-source.adoc @@ -94,6 +94,10 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] === Using Timer Service within a cluster diff --git a/helloworld-mdb/README-source.adoc b/helloworld-mdb/README-source.adoc index 64ea3624de..5a5a40c4c7 100644 --- a/helloworld-mdb/README-source.adoc +++ b/helloworld-mdb/README-source.adoc @@ -90,7 +90,10 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] - +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Clustering diff --git a/helloworld-singleton/README-source.adoc b/helloworld-singleton/README-source.adoc index 0cf299d32f..e794954c51 100644 --- a/helloworld-singleton/README-source.adoc +++ b/helloworld-singleton/README-source.adoc @@ -51,4 +51,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/helloworld-ws/README-source.adoc b/helloworld-ws/README-source.adoc index bb3037832c..f4c53a3959 100644 --- a/helloworld-ws/README-source.adoc +++ b/helloworld-ws/README-source.adoc @@ -57,4 +57,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/helloworld/README-source.adoc b/helloworld/README-source.adoc index 979c7e1d29..eba3d1109a 100644 --- a/helloworld/README-source.adoc +++ b/helloworld/README-source.adoc @@ -45,6 +45,7 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] -ifndef::ProdxuctRelease,EAPXPRelease[] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] endif::[] \ No newline at end of file diff --git a/hibernate/README-source.adoc b/hibernate/README-source.adoc index 6cd4095312..1a7e60bf15 100644 --- a/hibernate/README-source.adoc +++ b/hibernate/README-source.adoc @@ -141,3 +141,7 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/jaxrs-client/README-source.adoc b/jaxrs-client/README-source.adoc index 1bbdbbe7cb..dac6740315 100644 --- a/jaxrs-client/README-source.adoc +++ b/jaxrs-client/README-source.adoc @@ -67,3 +67,7 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/jaxrs-jwt/README-source.adoc b/jaxrs-jwt/README-source.adoc index 21b74b2f39..afa94fbdc7 100644 --- a/jaxrs-jwt/README-source.adoc +++ b/jaxrs-jwt/README-source.adoc @@ -152,4 +152,8 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/jaxws-ejb/README-source.adoc b/jaxws-ejb/README-source.adoc index 9b87618fa1..ecdb28decb 100644 --- a/jaxws-ejb/README-source.adoc +++ b/jaxws-ejb/README-source.adoc @@ -49,4 +49,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/jaxws-retail/README-source.adoc b/jaxws-retail/README-source.adoc index 24a5279bbe..90fd386f69 100644 --- a/jaxws-retail/README-source.adoc +++ b/jaxws-retail/README-source.adoc @@ -46,4 +46,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/jsonp/README-source.adoc b/jsonp/README-source.adoc index c7ea1b6218..3c3a5110a6 100644 --- a/jsonp/README-source.adoc +++ b/jsonp/README-source.adoc @@ -51,4 +51,7 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/kitchensink/README-source.adoc b/kitchensink/README-source.adoc index 17edd0d02a..7ee38bef58 100644 --- a/kitchensink/README-source.adoc +++ b/kitchensink/README-source.adoc @@ -148,4 +148,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/logging/README-source.adoc b/logging/README-source.adoc index 717d39a31d..85ea2240cb 100644 --- a/logging/README-source.adoc +++ b/logging/README-source.adoc @@ -163,3 +163,7 @@ include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] \ No newline at end of file diff --git a/microprofile-config/README-source.adoc b/microprofile-config/README-source.adoc index 59130ade08..649cf0bf8a 100644 --- a/microprofile-config/README-source.adoc +++ b/microprofile-config/README-source.adoc @@ -802,6 +802,10 @@ include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[level // Openshift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Conclusion diff --git a/microprofile-fault-tolerance/README-source.adoc b/microprofile-fault-tolerance/README-source.adoc index e60b74a65e..373ebac584 100644 --- a/microprofile-fault-tolerance/README-source.adoc +++ b/microprofile-fault-tolerance/README-source.adoc @@ -633,6 +633,10 @@ include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[level // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Conclusion diff --git a/microprofile-jwt/README-source.adoc b/microprofile-jwt/README-source.adoc index fffa5a51a2..57bfa8758d 100644 --- a/microprofile-jwt/README-source.adoc +++ b/microprofile-jwt/README-source.adoc @@ -715,6 +715,10 @@ include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[level // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Conclusion diff --git a/microprofile-lra/README-source.adoc b/microprofile-lra/README-source.adoc index 3405618ed1..4572bbc2fa 100644 --- a/microprofile-lra/README-source.adoc +++ b/microprofile-lra/README-source.adoc @@ -164,6 +164,10 @@ include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[level // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] [[creating-new-project]] == Creating the Maven Project diff --git a/microprofile-openapi/README-source.adoc b/microprofile-openapi/README-source.adoc index 721cd30d0a..4881493836 100644 --- a/microprofile-openapi/README-source.adoc +++ b/microprofile-openapi/README-source.adoc @@ -157,3 +157,7 @@ include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[level // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/microprofile-rest-client/README-source.adoc b/microprofile-rest-client/README-source.adoc index 65d67d0cbd..22b2fd8a46 100644 --- a/microprofile-rest-client/README-source.adoc +++ b/microprofile-rest-client/README-source.adoc @@ -173,6 +173,11 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+1] include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[leveloffset=+1] // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] + == Conclusion diff --git a/numberguess/README-source.adoc b/numberguess/README-source.adoc index 52e94537c2..3284eba714 100644 --- a/numberguess/README-source.adoc +++ b/numberguess/README-source.adoc @@ -45,4 +45,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/servlet-async/README-source.adoc b/servlet-async/README-source.adoc index b25d1f48f7..9ffa3e2fb9 100644 --- a/servlet-async/README-source.adoc +++ b/servlet-async/README-source.adoc @@ -49,4 +49,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/servlet-filterlistener/README-source.adoc b/servlet-filterlistener/README-source.adoc index 53acc4f786..e80ee1183a 100644 --- a/servlet-filterlistener/README-source.adoc +++ b/servlet-filterlistener/README-source.adoc @@ -96,4 +96,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/servlet-security/README-source.adoc b/servlet-security/README-source.adoc index fad6e780c2..cc1929fde9 100644 --- a/servlet-security/README-source.adoc +++ b/servlet-security/README-source.adoc @@ -222,3 +222,7 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/spring-resteasy/README-source.adoc b/spring-resteasy/README-source.adoc index ce8656365f..1ed180f4f2 100644 --- a/spring-resteasy/README-source.adoc +++ b/spring-resteasy/README-source.adoc @@ -76,3 +76,7 @@ ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/tasks-jsf/README-source.adoc b/tasks-jsf/README-source.adoc index 9eb0c8fd72..979493c391 100644 --- a/tasks-jsf/README-source.adoc +++ b/tasks-jsf/README-source.adoc @@ -69,4 +69,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/temperature-converter/README-source.adoc b/temperature-converter/README-source.adoc index 8b9b2d8e4f..058dc16c68 100644 --- a/temperature-converter/README-source.adoc +++ b/temperature-converter/README-source.adoc @@ -59,4 +59,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/thread-racing/README-source.adoc b/thread-racing/README-source.adoc index 63c6f5c0e6..6ef7e33e57 100644 --- a/thread-racing/README-source.adoc +++ b/thread-racing/README-source.adoc @@ -72,4 +72,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/websocket-endpoint/README-source.adoc b/websocket-endpoint/README-source.adoc index 1b9622ef1f..298d2dbd50 100644 --- a/websocket-endpoint/README-source.adoc +++ b/websocket-endpoint/README-source.adoc @@ -57,4 +57,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/websocket-hello/README-source.adoc b/websocket-hello/README-source.adoc index f64a5ea94c..692e1a4e4e 100644 --- a/websocket-hello/README-source.adoc +++ b/websocket-hello/README-source.adoc @@ -63,4 +63,8 @@ include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] ifndef::ProductRelease,EAPXPRelease[] include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] endif::[] -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] \ No newline at end of file +include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] From 4cb8d79834959c2053bec6448bda814da4041193 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 21 May 2024 20:46:26 +0100 Subject: [PATCH 04/13] [WFLY-19335] Rename helm-install-prerequisites to helm-install-prerequisites-openshift --- micrometer/README-source.adoc | 2 +- ...sites.adoc => helm-install-prerequisites-openshift.adoc} | 0 microprofile-reactive-messaging-kafka/README-source.adoc | 2 +- ...sites.adoc => helm-install-prerequisites-openshift.adoc} | 0 opentelemetry-tracing/README-source.adoc | 2 +- ...sites.adoc => helm-install-prerequisites-openshift.adoc} | 0 .../build-and-run-the-quickstart-with-kubernetes.adoc | 6 +++--- shared-doc/build-and-run-the-quickstart-with-openshift.adoc | 6 +++--- todo-backend/README-source.adoc | 2 +- ...sites.adoc => helm-install-prerequisites-openshift.adoc} | 0 10 files changed, 10 insertions(+), 10 deletions(-) rename micrometer/{helm-install-prerequisites.adoc => helm-install-prerequisites-openshift.adoc} (100%) rename microprofile-reactive-messaging-kafka/{helm-install-prerequisites.adoc => helm-install-prerequisites-openshift.adoc} (100%) rename opentelemetry-tracing/{helm-install-prerequisites.adoc => helm-install-prerequisites-openshift.adoc} (100%) rename todo-backend/{helm-install-prerequisites.adoc => helm-install-prerequisites-openshift.adoc} (100%) diff --git a/micrometer/README-source.adoc b/micrometer/README-source.adoc index d50ca6741f..246abe599e 100644 --- a/micrometer/README-source.adoc +++ b/micrometer/README-source.adoc @@ -14,7 +14,7 @@ The `micrometer` quickstart demonstrates the use of the Micrometer library in {p :archiveType: war :archiveName: {artifactId} :restoreScriptName: restore-configuration.cli -:helm-install-prerequisites: ../micrometer/helm-install-prerequisites.adoc +:helm-install-prerequisites-openshift: ../micrometer/helm-install-prerequisites-openshift.adoc == What is it? diff --git a/micrometer/helm-install-prerequisites.adoc b/micrometer/helm-install-prerequisites-openshift.adoc similarity index 100% rename from micrometer/helm-install-prerequisites.adoc rename to micrometer/helm-install-prerequisites-openshift.adoc diff --git a/microprofile-reactive-messaging-kafka/README-source.adoc b/microprofile-reactive-messaging-kafka/README-source.adoc index 072caf4af0..9c73becd61 100644 --- a/microprofile-reactive-messaging-kafka/README-source.adoc +++ b/microprofile-reactive-messaging-kafka/README-source.adoc @@ -11,7 +11,7 @@ The `microprofile-reactive-messaging-kafka` quickstart demonstrates the use of t :standalone-server-type: microprofile :archiveType: war :archiveName: {artifactId} -:helm-install-prerequisites: ../microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc +:helm-install-prerequisites-openshift: ../microprofile-reactive-messaging-kafka/helm-install-prerequisites-openshift.adoc :helm-app-name: mp-rm-qs :strimzi-version: v1beta2 :portedToGlow: true diff --git a/microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc b/microprofile-reactive-messaging-kafka/helm-install-prerequisites-openshift.adoc similarity index 100% rename from microprofile-reactive-messaging-kafka/helm-install-prerequisites.adoc rename to microprofile-reactive-messaging-kafka/helm-install-prerequisites-openshift.adoc diff --git a/opentelemetry-tracing/README-source.adoc b/opentelemetry-tracing/README-source.adoc index 808aea589a..4d7f0ef77c 100644 --- a/opentelemetry-tracing/README-source.adoc +++ b/opentelemetry-tracing/README-source.adoc @@ -16,7 +16,7 @@ The `opentelemetry-tracing` quickstart demonstrates the use of the OpenTelemetry <<<<<<< HEAD :portedToGlow: true ======= -:helm-install-prerequisites: ../opentelemetry-tracing/helm-install-prerequisites.adoc +:helm-install-prerequisites-openshift: ../opentelemetry-tracing/helm-install-prerequisites-openshift.adoc >>>>>>> upstream/main diff --git a/opentelemetry-tracing/helm-install-prerequisites.adoc b/opentelemetry-tracing/helm-install-prerequisites-openshift.adoc similarity index 100% rename from opentelemetry-tracing/helm-install-prerequisites.adoc rename to opentelemetry-tracing/helm-install-prerequisites-openshift.adoc diff --git a/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc b/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc index d9946203b7..596043149e 100644 --- a/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc +++ b/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc @@ -11,11 +11,11 @@ include::../shared-doc/build-the-quickstart-for-kubernetes.adoc[leveloffset=+1] // Getting Started with Helm include::../shared-doc/helm-getting-started-overview-kubernetes.adoc[leveloffset=+1] -ifdef::helm-install-prerequisites[] +ifdef::helm-install-prerequisites-kubernetes[] // Additional steps needed before deploying in Helm [[deploy_helm_prerequisites]] -include::{helm-install-prerequisites}[leveloffset=+1] -endif::helm-install-prerequisites[] +include::{helm-install-prerequisites-kubernetes}[leveloffset=+1] +endif::helm-install-prerequisites-kubernetes[] //Prepare Helm for Quickstart Deployment include::../shared-doc/helm-deploy-project.adoc[leveloffset=+1] diff --git a/shared-doc/build-and-run-the-quickstart-with-openshift.adoc b/shared-doc/build-and-run-the-quickstart-with-openshift.adoc index e671fc65ef..fd0b0896f9 100644 --- a/shared-doc/build-and-run-the-quickstart-with-openshift.adoc +++ b/shared-doc/build-and-run-the-quickstart-with-openshift.adoc @@ -10,11 +10,11 @@ include::../shared-doc/build-the-quickstart-for-openshift.adoc[leveloffset=+1] // Getting Started with Helm include::../shared-doc/helm-getting-started-overview-openshift.adoc[leveloffset=+1] -ifdef::helm-install-prerequisites[] +ifdef::helm-install-prerequisites-openshift[] // Additional steps needed before deploying in Helm [[deploy_helm_prerequisites]] -include::{helm-install-prerequisites}[leveloffset=+1] -endif::helm-install-prerequisites[] +include::{helm-install-prerequisites-openshift}[leveloffset=+1] +endif::helm-install-prerequisites-openshift[] //Prepare Helm for Quickstart Deployment include::../shared-doc/helm-deploy-project.adoc[leveloffset=+1] diff --git a/todo-backend/README-source.adoc b/todo-backend/README-source.adoc index ad5456cb9b..372a68c174 100644 --- a/todo-backend/README-source.adoc +++ b/todo-backend/README-source.adoc @@ -11,7 +11,7 @@ include::../shared-doc/attributes.adoc[] :openshift: true :archiveType: war :useHelmChartDir: true -:helm-install-prerequisites: ../todo-backend/helm-install-prerequisites.adoc +:helm-install-prerequisites-openshift: ../todo-backend/helm-install-prerequisites-openshift.adoc :portedToGlow: true [abstract] diff --git a/todo-backend/helm-install-prerequisites.adoc b/todo-backend/helm-install-prerequisites-openshift.adoc similarity index 100% rename from todo-backend/helm-install-prerequisites.adoc rename to todo-backend/helm-install-prerequisites-openshift.adoc From 6a6d8d4534d587c00047d7854e7dc471d8140e39 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 21 May 2024 21:18:46 +0100 Subject: [PATCH 05/13] [WFLY-19335] Prerequisites for micrometer --- micrometer/README-source.adoc | 6 +++- .../helm-install-prerequisites-common.adoc | 35 +++++++++++++++++++ ...helm-install-prerequisites-kubernetes.adoc | 2 ++ .../helm-install-prerequisites-openshift.adoc | 24 ++----------- 4 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 micrometer/helm-install-prerequisites-common.adoc create mode 100644 micrometer/helm-install-prerequisites-kubernetes.adoc diff --git a/micrometer/README-source.adoc b/micrometer/README-source.adoc index 246abe599e..32195f885c 100644 --- a/micrometer/README-source.adoc +++ b/micrometer/README-source.adoc @@ -15,6 +15,7 @@ The `micrometer` quickstart demonstrates the use of the Micrometer library in {p :archiveName: {artifactId} :restoreScriptName: restore-configuration.cli :helm-install-prerequisites-openshift: ../micrometer/helm-install-prerequisites-openshift.adoc +:helm-install-prerequisites-kubernetes: ../micrometer/helm-install-prerequisites-kubernetes.adoc == What is it? @@ -272,7 +273,10 @@ endif::[] include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[leveloffset=+1] // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] - +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Conclusion Micrometer provides a de facto standard way of capturing and publishing metrics to the monitoring solution of your choice. {productName} provides a convenient, out-of-the-box integration of Micrometer to make it easier to capture those metrics and monitor your application's health and performance. For more information on Micrometer, please refer to the project's https://micrometer.io[website]. diff --git a/micrometer/helm-install-prerequisites-common.adoc b/micrometer/helm-install-prerequisites-common.adoc new file mode 100644 index 0000000000..24cd3552f3 --- /dev/null +++ b/micrometer/helm-install-prerequisites-common.adoc @@ -0,0 +1,35 @@ +ifdef::prereq-openshift[] +:prereq-cloud-platform: OpenShift +:prereq-cloud-cli: oc +:prereq-suffix: openshift +endif::[] +ifdef::prereq-kubernetes[] +:prereq-cloud-platform: Kubernetes +:prereq-cloud-cli: kubectl +:prereq-suffix: kubernetes +endif::[] + + + +=== Install OpenTelemetry Collector on OpenShift + +The functionality of this quickstart depends on a running instance of the https://opentelemetry.io/docs/collector/[OpenTelemetry Collector]. + +To deploy and configure the OpenTelemetry Collector, you will need to apply a set of configurations to your {prereq-cloud-platform} cluster: + +[source,options="nowrap",subs="+attributes"] +---- +include::charts/opentelemetry-collector-openshift.yaml[] +---- + +To make things simpler, you can find these commands in `charts/opentelemetry-collector-openshift.yaml`, and to apply them run the following command in your terminal: + +[source,options="nowrap",subs="+attributes"] +---- +$ {prereq-cloud-cli} apply -f charts/opentelemetry-collector-{prereq-suffix}.yaml +---- + +[NOTE] +==== +When done with the quickstart, the `{prereq-cloud-cli} delete -f charts/opentelemetry-collector-{prereq-suffix}.yaml` command may be used to revert the applied changes. +==== \ No newline at end of file diff --git a/micrometer/helm-install-prerequisites-kubernetes.adoc b/micrometer/helm-install-prerequisites-kubernetes.adoc new file mode 100644 index 0000000000..1a9075d1f2 --- /dev/null +++ b/micrometer/helm-install-prerequisites-kubernetes.adoc @@ -0,0 +1,2 @@ +:prereq-kubernetes: true +include::./helm-install-prerequisites-common.adoc[] diff --git a/micrometer/helm-install-prerequisites-openshift.adoc b/micrometer/helm-install-prerequisites-openshift.adoc index a4dedae0e9..ef988f429c 100644 --- a/micrometer/helm-install-prerequisites-openshift.adoc +++ b/micrometer/helm-install-prerequisites-openshift.adoc @@ -1,22 +1,2 @@ -=== Install OpenTelemetry Collector on OpenShift - -The functionality of this quickstart depends on a running instance of the https://opentelemetry.io/docs/collector/[OpenTelemetry Collector]. - -To deploy and configure the OpenTelemetry Collector, you will need to apply a set of configurations to your OpenShift cluster: - -[source,options="nowrap",subs="+attributes"] ----- -include::charts/opentelemetry-collector-openshift.yaml[] ----- - -To make things simpler, you can find these commands in `charts/opentelemetry-collector-openshift.yaml`, and to apply them run the following command in your terminal: - -[source] ----- -$ oc apply -f charts/opentelemetry-collector-openshift.yaml ----- - -[NOTE] -==== -When done with the quickstart, the `oc delete -f charts/opentelemetry-collector-openshift.yaml` command may be used to revert the applied changes. -==== \ No newline at end of file +:prereq-openshift: true +include::./helm-install-prerequisites-common.adoc[] From 136455b05091b753bcee322fec9f14923945081e Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Tue, 21 May 2024 21:35:15 +0100 Subject: [PATCH 06/13] [WFLY-19335] Prerequisites for opentelemetry-tracing --- opentelemetry-tracing/README-source.adoc | 9 ++--- .../helm-install-prerequisites-common.adoc | 36 +++++++++++++++++++ ...helm-install-prerequisites-kubernetes.adoc | 2 ++ .../helm-install-prerequisites-openshift.adoc | 27 ++------------ 4 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 opentelemetry-tracing/helm-install-prerequisites-common.adoc create mode 100644 opentelemetry-tracing/helm-install-prerequisites-kubernetes.adoc diff --git a/opentelemetry-tracing/README-source.adoc b/opentelemetry-tracing/README-source.adoc index 4d7f0ef77c..58fe2ba5da 100644 --- a/opentelemetry-tracing/README-source.adoc +++ b/opentelemetry-tracing/README-source.adoc @@ -13,11 +13,8 @@ The `opentelemetry-tracing` quickstart demonstrates the use of the OpenTelemetry :archiveType: war :archiveName: {artifactId} :restoreScriptName: restore-configuration.cli -<<<<<<< HEAD -:portedToGlow: true -======= :helm-install-prerequisites-openshift: ../opentelemetry-tracing/helm-install-prerequisites-openshift.adoc ->>>>>>> upstream/main +:helm-install-prerequisites-kubernetes: ../opentelemetry-tracing/helm-install-prerequisites-kubernetes.adoc == What is it? @@ -236,6 +233,10 @@ endif::[] include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[leveloffset=+1] // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Conclusion diff --git a/opentelemetry-tracing/helm-install-prerequisites-common.adoc b/opentelemetry-tracing/helm-install-prerequisites-common.adoc new file mode 100644 index 0000000000..7219c9125a --- /dev/null +++ b/opentelemetry-tracing/helm-install-prerequisites-common.adoc @@ -0,0 +1,36 @@ +ifdef::prereq-openshift[] +:prereq-cloud-platform: OpenShift +:prereq-cloud-cli: oc +:prereq-suffix: openshift +endif::[] +ifdef::prereq-kubernetes[] +:prereq-cloud-platform: Kubernetes +:prereq-cloud-cli: kubectl +:prereq-suffix: kubernetes +endif::[] + +=== Install OpenTelemetry Collector on {prereq-cloud-platform} + +The functionality of this quickstart depends on a running instance of the https://opentelemetry.io/docs/collector/[OpenTelemetry Collector]. + +To deploy and configure the OpenTelemetry Collector, you will need to apply a set of configurations to your {prereq-cloud-platform} cluster, to configure the OpenTelemetry Collector as well as any external routes needed: + +[source,options="nowrap",subs="+attributes"] +---- +include::charts/opentelemetry-collector-openshift.yaml[] +---- + +To make things simpler, you can find these commands in `charts/opentelemetry-collector-openshift.yaml`, and to apply them run the following command in your terminal: + +[source,options="nowrap",subs="+attributes"] +---- +$ {prereq-cloud-cli} apply -f charts/opentelemetry-collector-{prereq-suffix}.yaml +---- + +[NOTE] +==== +When done with the quickstart, the `{prereq-cloud-cli} delete -f charts/opentelemetry-collector-{prereq-suffix}.yaml` command may be used to revert the applied changes. +==== + + + diff --git a/opentelemetry-tracing/helm-install-prerequisites-kubernetes.adoc b/opentelemetry-tracing/helm-install-prerequisites-kubernetes.adoc new file mode 100644 index 0000000000..1a9075d1f2 --- /dev/null +++ b/opentelemetry-tracing/helm-install-prerequisites-kubernetes.adoc @@ -0,0 +1,2 @@ +:prereq-kubernetes: true +include::./helm-install-prerequisites-common.adoc[] diff --git a/opentelemetry-tracing/helm-install-prerequisites-openshift.adoc b/opentelemetry-tracing/helm-install-prerequisites-openshift.adoc index c4d4637dba..ef988f429c 100644 --- a/opentelemetry-tracing/helm-install-prerequisites-openshift.adoc +++ b/opentelemetry-tracing/helm-install-prerequisites-openshift.adoc @@ -1,25 +1,2 @@ -=== Install OpenTelemetry Collector on OpenShift - -The functionality of this quickstart depends on a running instance of the https://opentelemetry.io/docs/collector/[OpenTelemetry Collector]. - -To deploy and configure the OpenTelemetry Collector, you will need to apply a set of configurations to your OpenShift cluster, to configure the OpenTelemetry Collector as well as any external routes needed: - -[source,options="nowrap",subs="+attributes"] ----- -include::charts/opentelemetry-collector-openshift.yaml[] ----- - -To make things simpler, you can find these commands in `charts/opentelemetry-collector-openshift.yaml`, and to apply them run the following command in your terminal: - -[source] ----- -$ oc apply -f charts/opentelemetry-collector-openshift.yaml ----- - -[NOTE] -==== -When done with the quickstart, the `oc delete -f charts/opentelemetry-collector-openshift.yaml` command may be used to revert the applied changes. -==== - - - +:prereq-openshift: true +include::./helm-install-prerequisites-common.adoc[] From 43f16fb88cbea42fca39a73568d92f57502ac131 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Wed, 22 May 2024 16:59:49 +0100 Subject: [PATCH 07/13] [WFLY-19335] Prerequisites for microprofile-reactive-messaging A bit of cleanup in some of the common files --- .../overridable-functions.sh | 57 ++------------ .../README-source.adoc | 6 ++ .../charts/kafka-on-kubernetes.yaml | 35 +++++++++ .../charts/strimzi-on-kubernetes.yaml | 2 + ...helm-install-prerequisites-kubernetes.adoc | 74 +++++++++++++++++++ shared-doc/helm-deploy-project.adoc | 4 +- 6 files changed, 127 insertions(+), 51 deletions(-) create mode 100644 microprofile-reactive-messaging-kafka/charts/kafka-on-kubernetes.yaml create mode 100644 microprofile-reactive-messaging-kafka/helm-install-prerequisites-kubernetes.adoc diff --git a/.github/workflows/scripts/kubernetes/qs-overrides/microprofile-reactive-messaging-kafka/overridable-functions.sh b/.github/workflows/scripts/kubernetes/qs-overrides/microprofile-reactive-messaging-kafka/overridable-functions.sh index ecbd69f92b..2331635dc5 100644 --- a/.github/workflows/scripts/kubernetes/qs-overrides/microprofile-reactive-messaging-kafka/overridable-functions.sh +++ b/.github/workflows/scripts/kubernetes/qs-overrides/microprofile-reactive-messaging-kafka/overridable-functions.sh @@ -42,59 +42,23 @@ function installPrerequisites() application="${1}" echo "Installing Strimzi operator" - kubectl apply -f charts/strimzi-on-kubernetes.yaml + kubectl apply -f charts/strimzi-on-kubernetes.yaml --wait --timeout=10m0s - seconds=120 + seconds=300 now=$(date +%s) end=$(($seconds + $now)) - echo "Looping for 2 minutes until the 'kafka' CRD is available " + echo "Looping for 5 minutes until the 'kafka' CRD is available " while [ $now -lt $end ]; do - # It takes a while for the kafka CRD to be ready sleep 5 - echo "Trying to create my-cluster" - kubectl apply -f - < Date: Wed, 22 May 2024 18:56:45 +0100 Subject: [PATCH 08/13] [WFLY-19335] Instructions to run todo-backend on Kubernetes --- shared-doc/helm-deploy-project.adoc | 15 +++- todo-backend/README-source.adoc | 90 +++++-------------- todo-backend/additional-readme-cloud.adoc | 74 +++++++++++++++ .../additional-readme-kubernetes.adoc | 4 + todo-backend/additional-readme-openshift.adoc | 4 + ...t.adoc => helm-install-prerequisites.adoc} | 0 6 files changed, 113 insertions(+), 74 deletions(-) create mode 100644 todo-backend/additional-readme-cloud.adoc create mode 100644 todo-backend/additional-readme-kubernetes.adoc create mode 100644 todo-backend/additional-readme-openshift.adoc rename todo-backend/{helm-install-prerequisites-openshift.adoc => helm-install-prerequisites.adoc} (100%) diff --git a/shared-doc/helm-deploy-project.adoc b/shared-doc/helm-deploy-project.adoc index fd20073a23..3ea7ea8694 100644 --- a/shared-doc/helm-deploy-project.adoc +++ b/shared-doc/helm-deploy-project.adoc @@ -1,3 +1,7 @@ +ifndef::helmSetWildFlyArgumentPrefix[] +// For use with nested Helm charts +:helmSetWildFlyArgumentPrefix: +endif::[] ifeval::[{useHelmChartDir} == true] :helm_chart_values: charts endif::[] @@ -5,7 +9,10 @@ ifndef::useHelmChartDir[] :helm_chart_values: -f charts/helm.yaml {helmChartName} endif::[] ifdef::kubernetes[] -:helm-extra-arguments: --set build.enabled=false --set deploy.route.enabled=false --set image.name="localhost:5000/{artifactId}" +:helm-set-build-enabled: --set {helmSetWildFlyArgumentPrefix}build.enabled=false +:helm-set-deploy-route-enabled: --set {helmSetWildFlyArgumentPrefix}deploy.route.enabled=false +:helm-set-image-name: --set {helmSetWildFlyArgumentPrefix}image.name="localhost:5000/{artifactId}" +:helm-extra-arguments: {helm-set-build-enabled} {helm-set-deploy-route-enabled} {helm-set-image-name} :cloud-cli: kubectl endif::[] ifndef::kubernetes[] @@ -45,9 +52,9 @@ docker push localhost:5000/{artifactId}:latest In the below call to `helm install` which deploys our application to Kubernetes, we are passing in some extra arguments to tweak the Helm build: -* `--set build.enabled=false` - This turns off the s2i build for the Helm chart since Kubernetes, unlike OpenShift, does not have s2i. Instead we are providing the image to use. -* `--set deploy.route.enabled=false` - This disables route creation normally performed by the Helm chart. On Kubernetes we will use port-forwards instead to access our application, since routes are an OpenShift specific concept and thus not available on Kubernetes. -* `--set image.name="localhost:5000/{artifactId}"` - This tells the Helm chart to use the image we built, tagged and pushed to Kubernetes' internal registry above. +* `{helm-set-build-enabled}` - This turns off the s2i build for the Helm chart since Kubernetes, unlike OpenShift, does not have s2i. Instead, we are providing the image to use. +* `{helm-set-deploy-route-enabled}` - This disables route creation normally performed by the Helm chart. On Kubernetes we will use port-forwards instead to access our application, since routes are an OpenShift specific concept and thus not available on Kubernetes. +* `{helm-set-image-name}` - This tells the Helm chart to use the image we built, tagged and pushed to Kubernetes' internal registry above. endif::[] [source,options="nowrap",subs="+attributes"] diff --git a/todo-backend/README-source.adoc b/todo-backend/README-source.adoc index 372a68c174..178382c2b7 100644 --- a/todo-backend/README-source.adoc +++ b/todo-backend/README-source.adoc @@ -11,8 +11,10 @@ include::../shared-doc/attributes.adoc[] :openshift: true :archiveType: war :useHelmChartDir: true -:helm-install-prerequisites-openshift: ../todo-backend/helm-install-prerequisites-openshift.adoc +:helm-install-prerequisites-openshift: ../todo-backend/helm-install-prerequisites.adoc +:helm-install-prerequisites-kubernetes: ../todo-backend/helm-install-prerequisites.adoc :portedToGlow: true +:helmSetWildFlyArgumentPrefix: wildfly. [abstract] The `todo-backend` quickstart demonstrates how to implement a backend that exposes a HTTP API with JAX-RS @@ -209,80 +211,28 @@ $ curl http://localhost:8080 :extraStartParams: -DPOSTGRESQL_DATABASE=todos -DPOSTGRESQL_SERVICE_HOST=localhost -DPOSTGRESQL_SERVICE_PORT=5432 -DPOSTGRESQL_USER=todos -DPOSTGRESQL_PASSWORD=mysecretpassword -DPOSTGRESQL_DATASOURCE=ToDos include::../shared-doc/run-integration-tests-with-provisioned-server.adoc[leveloffset=+1] - +//=========================================================== +// Openshift - START == Run the Backend on OpenShift // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] - -=== Environment variables for PostgreSQL - -The Helm Chart also contains the environment variables required to connect to the PostgreSQL database. - -ifndef::ProductRelease[] -In local deployment the credentials were passed directly as the values of the environment variables. +include::../todo-backend/additional-readme-openshift.adoc[leveloffset=+1] +// OpenShift - END +//=========================================================== + +//=========================================================== +// Kubernetes - START +ifndef::ProductRelease,EAPXPRelease[] +== Run the Backend on Kubernetes + +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +include::../todo-backend/additional-readme-kubernetes.adoc[leveloffset=+1] endif::[] +// Kubernetes - END +//=========================================================== -For OpenShift, we rely on secrets so that the credentials are never copied outside OpenShift: - -[source,options="nowrap"] ----- -deploy: - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - key: database-password - name: todo-backend-db ----- - -When the application is deployed, the value for the `POSTGRESQL_PASSWORD` will be taken from the key `database-password` -in the secret `todo-backend-db`. - -// Testing on Openshift -include::../shared-doc/run-integration-tests-with-openshift.adoc[leveloffset=+1] - -=== Use the todobackend Web Frontend - -Once the backend is deployed on OpenShift, it can be accessed from the route `todo-backend`. -Let's find the host that we can use to connect to this backend: - -[source,options="nowrap"] ----- -$ oc get route todo-backend -o jsonpath="{.spec.host}" -todo-backend-jmesnil1-dev.apps.sandbox.x8i5.p1.openshiftapps.com ----- - -This value will be different for every installation of the backend. - -[WARNING] -==== -Make sure to prepend the host with `https://` to be able to connect to the backend from the ToDo Backend Specs or Client. -The host must also be publicly accessible. -==== - -We can verify that this application is properly working as a ToDo Backend by running its https://todobackend.com/specs/index.html[specs] on it. - - -Once all tests passed, we can use the https://todobackend.com/client/index.html[todobackend client] to have a Web application connected to the backend. - -[NOTE] -==== -https://todobackend.com/[todobackend.com] is an external service used to showcase this quickstart. -It might not always be functional but does not impact the availability of this backend. -==== - -=== Clean Up - -==== Remove the Backend - -The backend can be deleted from OpenShift by running the command: - -[source,options="nowrap"] ----- -$ helm uninstall todo-backend -release "todo-backend" uninstalled ----- == Conclusion @@ -291,5 +241,5 @@ of a {productName} Jakarta EE backend on OpenShift to connect to an external dat ifndef::ProductRelease[] The use of a Server Provisioned deployment makes it seamless to move from a local deployment for development to a -deployment on OpenShift. +deployment on cloud platforms such as OpenShift and Kubernetes. endif::[] \ No newline at end of file diff --git a/todo-backend/additional-readme-cloud.adoc b/todo-backend/additional-readme-cloud.adoc new file mode 100644 index 0000000000..86183341b1 --- /dev/null +++ b/todo-backend/additional-readme-cloud.adoc @@ -0,0 +1,74 @@ +ifdef::additional-readme-openshift[] +:additional-readme-cloud-platform: OpenShift +endif::[] +ifdef::additional-readme-kubernetes[] +:additional-readme-cloud-platform: Kubernetes +endif::[] + +=== Environment variables for PostgreSQL + +The Helm Chart also contains the environment variables required to connect to the PostgreSQL database. + +ifndef::ProductRelease[] +In local deployment the credentials were passed directly as the values of the environment variables. +endif::[] + +For {additional-readme-cloud-platform}, we rely on secrets so that the credentials are never copied outside {additional-readme-cloud-platform}: + +[source,options="nowrap"] +---- +deploy: + env: + - name: POSTGRESQL_PASSWORD + valueFrom: + secretKeyRef: + key: database-password + name: todo-backend-db +---- + +When the application is deployed, the value for the `POSTGRESQL_PASSWORD` will be taken from the key `database-password` +in the secret `todo-backend-db`. + +ifdef::additional-readme-openshift[] +== Use the todobackend Web Frontend + +Once the backend is deployed on {additional-readme-cloud-platform}, it can be accessed from the route `todo-backend`. +Let's find the host that we can use to connect to this backend: + +[source,options="nowrap"] +---- +$ oc get route todo-backend -o jsonpath="{.spec.host}" +todo-backend-jmesnil1-dev.apps.sandbox.x8i5.p1.openshiftapps.com +---- + +This value will be different for every installation of the backend. + +[WARNING] +==== +Make sure to prepend the host with `https://` to be able to connect to the backend from the ToDo Backend Specs or Client. +The host must also be publicly accessible. +==== + +We can verify that this application is properly working as a ToDo Backend by running its https://todobackend.com/specs/index.html[specs] on it. + + +Once all tests passed, we can use the https://todobackend.com/client/index.html[todobackend client] to have a Web application connected to the backend. + +[NOTE] +==== +https://todobackend.com/[todobackend.com] is an external service used to showcase this quickstart. +It might not always be functional but does not impact the availability of this backend. +==== +endif::[] + +== Clean Up + +=== Remove the Backend + +The backend can be deleted from {additional-readme-cloud-platform} by running the command: + +[source,options="nowrap"] +---- +$ helm uninstall todo-backend +release "todo-backend" uninstalled +---- \ No newline at end of file diff --git a/todo-backend/additional-readme-kubernetes.adoc b/todo-backend/additional-readme-kubernetes.adoc new file mode 100644 index 0000000000..1894d7279b --- /dev/null +++ b/todo-backend/additional-readme-kubernetes.adoc @@ -0,0 +1,4 @@ +:additional-readme-kubernetes: true +include::../todo-backend/additional-readme-cloud.adoc[] +// Unset the attribute +:!additional-readme-kubernetes: \ No newline at end of file diff --git a/todo-backend/additional-readme-openshift.adoc b/todo-backend/additional-readme-openshift.adoc new file mode 100644 index 0000000000..144ab7f3fc --- /dev/null +++ b/todo-backend/additional-readme-openshift.adoc @@ -0,0 +1,4 @@ +:additional-readme-openshift: true +include::../todo-backend/additional-readme-cloud.adoc[] +// Unset the attribute +:!additional-readme-openshift: \ No newline at end of file diff --git a/todo-backend/helm-install-prerequisites-openshift.adoc b/todo-backend/helm-install-prerequisites.adoc similarity index 100% rename from todo-backend/helm-install-prerequisites-openshift.adoc rename to todo-backend/helm-install-prerequisites.adoc From c7adf902cd2e8a3206cce63de7537e5fdf60b01c Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Wed, 22 May 2024 21:12:15 +0100 Subject: [PATCH 09/13] [WFLY-19335] Add Kubernetes instructions for remote-helloworld-mdb --- remote-helloworld-mdb/README-source.adoc | 28 ++++------------ .../helm-install-prerequisites-cloud.adoc | 32 +++++++++++++++++++ ...helm-install-prerequisites-kubernetes.adoc | 3 ++ .../helm-install-prerequisites-openshift.adoc | 2 ++ 4 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 remote-helloworld-mdb/helm-install-prerequisites-cloud.adoc create mode 100644 remote-helloworld-mdb/helm-install-prerequisites-kubernetes.adoc create mode 100644 remote-helloworld-mdb/helm-install-prerequisites-openshift.adoc diff --git a/remote-helloworld-mdb/README-source.adoc b/remote-helloworld-mdb/README-source.adoc index 419c1f884d..98cdf30393 100644 --- a/remote-helloworld-mdb/README-source.adoc +++ b/remote-helloworld-mdb/README-source.adoc @@ -10,6 +10,8 @@ include::../shared-doc/attributes.adoc[] :standalone-server-type: full :archiveType: war :restoreScriptName: remove-remote-broker.cli +:helm-install-prerequisites-openshift: ../remote-helloworld-mdb/helm-install-prerequisites-openshift.adoc +:helm-install-prerequisites-kubernetes: ../remote-helloworld-mdb/helm-install-prerequisites-kubernetes.adoc ifdef::ProductRelease,EAPXPRelease[] :BrokerImageName: registry.redhat.io/amq7/amq-broker-rhel8:7.10 :BrokerProductName: Red Hat AMQ @@ -153,27 +155,9 @@ include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc endif::[] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] -=== Deploy a {BrokerProductName} instance on OpenShift -[source,options="nowrap",subs="+attributes"] ----- -$ oc run artemis --env AMQ_USER=admin --env AMQ_PASSWORD=admin --image={BrokerImageName} --port=61616 --expose=true ----- - -This will create a broker instance named `artemis` on OpenShift that can be accessed on the port `61616` on the service `artemis` with the account *admin/admin*. -//Prepare Helm for Quickstart Deployment - -include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] - -==== Clean Up - -The broker instance can be deleted from OpenShift by running the command: - -[source,options="nowrap"] ----- -$ oc delete service artemis -service "artemis" deleted -$ oc delete pod artemis -pod "artemis" deleted ----- +ifndef::ProductRelease,EAPXPRelease[] +//Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] diff --git a/remote-helloworld-mdb/helm-install-prerequisites-cloud.adoc b/remote-helloworld-mdb/helm-install-prerequisites-cloud.adoc new file mode 100644 index 0000000000..6fc3bf364f --- /dev/null +++ b/remote-helloworld-mdb/helm-install-prerequisites-cloud.adoc @@ -0,0 +1,32 @@ +ifdef::prereq-openshift[] +:prereq-cloud-platform: OpenShift +:prereq-cloud-cli: oc +endif::[] +ifdef::prereq-kubernetes[] +:prereq-cloud-platform: Kubernetes +:prereq-cloud-cli: kubectl +endif::[] + +=== Deploy a {BrokerProductName} instance on {prereq-cloud-platform} + +[source,options="nowrap",subs="+attributes"] +---- +$ {prereq-cloud-cli} run artemis --env AMQ_USER=admin --env AMQ_PASSWORD=admin --image={BrokerImageName} --port=61616 --expose=true +---- + +This will create a broker instance named `artemis` on {prereq-cloud-platform} that can be accessed on the port `61616` on the service `artemis` with the account *admin/admin*. + +==== Clean Up + +NOTE: This should be done *after* the application on {prereq-cloud-platform} has been stopped. + +The broker instance can be deleted from {prereq-cloud-platform} by running the commands: + +[source,options="nowrap",subs="+attributes"] +---- +$ {prereq-cloud-cli} delete service artemis +service "artemis" deleted +$ {prereq-cloud-cli} delete pod artemis +pod "artemis" deleted +---- + diff --git a/remote-helloworld-mdb/helm-install-prerequisites-kubernetes.adoc b/remote-helloworld-mdb/helm-install-prerequisites-kubernetes.adoc new file mode 100644 index 0000000000..528beccc0d --- /dev/null +++ b/remote-helloworld-mdb/helm-install-prerequisites-kubernetes.adoc @@ -0,0 +1,3 @@ +:prereq-kubernetes: true +include::./helm-install-prerequisites-cloud.adoc[] + diff --git a/remote-helloworld-mdb/helm-install-prerequisites-openshift.adoc b/remote-helloworld-mdb/helm-install-prerequisites-openshift.adoc new file mode 100644 index 0000000000..511e170e03 --- /dev/null +++ b/remote-helloworld-mdb/helm-install-prerequisites-openshift.adoc @@ -0,0 +1,2 @@ +:prereq-openshift: true +include::./helm-install-prerequisites-cloud.adoc[] From 4059ef7747f6851841d06c0c51041b0a15498d0b Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Wed, 22 May 2024 21:28:31 +0100 Subject: [PATCH 10/13] [WFLY-19335] Improve the text around port forwards, and include instructions to stop it --- shared-doc/helm-deploy-project.adoc | 5 +++-- shared-doc/helm-undeploy-project.adoc | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shared-doc/helm-deploy-project.adoc b/shared-doc/helm-deploy-project.adoc index 3ea7ea8694..594728717b 100644 --- a/shared-doc/helm-deploy-project.adoc +++ b/shared-doc/helm-deploy-project.adoc @@ -126,13 +126,14 @@ endif::[] ifdef::kubernetes[] To be able to connect to our application running in Kubernetes from outside, we need to set up a port-forward to the `{helm-app-name}` service created for us by the Helm chart. -This service will run on port `8080`, and we set up the port forward to also run on port `8080`. +This service will run on port `8080`, and we set up the port forward to also run on port `8080`: [source,options="nowrap",subs="+attributes"] ---- kubectl port-forward service/{helm-app-name} 8080:8080 ---- -The server can now be accessed via `http://localhost:8080` from outside Kubernetes +The server can now be accessed via `http://localhost:8080` from outside Kubernetes. Note that the command to create the port-forward will not return, so it is easiest to run this in a separate terminal. + endif::[] [NOTE] ==== diff --git a/shared-doc/helm-undeploy-project.adoc b/shared-doc/helm-undeploy-project.adoc index a27079d7cf..c42eedea06 100644 --- a/shared-doc/helm-undeploy-project.adoc +++ b/shared-doc/helm-undeploy-project.adoc @@ -5,3 +5,6 @@ ---- $ helm uninstall {helm-app-name} ---- +ifdef::kubernetes[] +Stop the port forward you created earlier with `kubectl port-forward service/{helm-app-name} 8080:8080`. +endif::[] From cce13a7eb7f90f1562d28f6b39d0043805ff5ade Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Thu, 23 May 2024 17:24:55 +0100 Subject: [PATCH 11/13] [WFLY-19335] Add Kubernetes README for microprofile-health --- microprofile-health/README-source.adoc | 17 +++++++++++--- .../expose-management-port-kubernetes.adoc | 5 ++++ .../expose-management-port-openshift.adoc | 5 ++++ .../expose-management-port.adoc | 23 +++++++++++++++++-- ...nd-run-the-quickstart-with-kubernetes.adoc | 3 +++ ...and-run-the-quickstart-with-openshift.adoc | 4 ++++ shared-doc/helm-deploy-project.adoc | 11 +++++---- ...run-integration-tests-with-kubernetes.adoc | 10 ++++---- .../run-integration-tests-with-openshift.adoc | 12 +++++----- 9 files changed, 70 insertions(+), 20 deletions(-) create mode 100644 microprofile-health/expose-management-port-kubernetes.adoc create mode 100644 microprofile-health/expose-management-port-openshift.adoc diff --git a/microprofile-health/README-source.adoc b/microprofile-health/README-source.adoc index 6de3f1a95b..c6aa5eed8e 100644 --- a/microprofile-health/README-source.adoc +++ b/microprofile-health/README-source.adoc @@ -5,9 +5,16 @@ include::../shared-doc/attributes.adoc[] :level: Beginner :technologies: MicroProfile Health :management-port-openshift: -:post-helm-install-actions: ../microprofile-health/expose-management-port.adoc -:extra-openshift-testing-actions: ../microprofile-health/expose-management-port.adoc -:extra-openshift-test-arguments: -Dserver.management.host=https://$(oc get route {artifactId}-management --template='{{ .spec.host }}') + +// Additional Info for OpenShift +:post-helm-install-actions-openshift: ../microprofile-health/expose-management-port-openshift.adoc +:extra-testing-actions-openshift: {post-helm-install-actions-openshift} +:extra-test-arguments-openshift: -Dserver.management.host=https://$(oc get route {artifactId}-management --template='{{ .spec.host }}') + +// Additional Info for Kubernetes +:post-helm-install-actions-kubernetes: ../microprofile-health/expose-management-port-kubernetes.adoc +:extra-testing-actions-kubernetes: {post-helm-install-actions-kubernetes} +:extra-test-arguments-kubernetes: -Dserver.management.host=http://localhost:9990 [abstract] The `microprofile-health` quickstart demonstrates the use of the MicroProfile Health specification in {productName}. @@ -455,6 +462,10 @@ include::../shared-doc/build-and-run-the-quickstart-with-bootable-jar.adoc[level // OpenShift include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] +ifndef::ProductRelease,EAPXPRelease[] +// Kubernetes +include::../shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc[leveloffset=+1] +endif::[] == Conclusion diff --git a/microprofile-health/expose-management-port-kubernetes.adoc b/microprofile-health/expose-management-port-kubernetes.adoc new file mode 100644 index 0000000000..8b7b782854 --- /dev/null +++ b/microprofile-health/expose-management-port-kubernetes.adoc @@ -0,0 +1,5 @@ +:expose-mgmt-port-kubernetes: true +include::expose-management-port.adoc[] + +//Unset the attribute +:!expose-mgmt-port-kubernetes: \ No newline at end of file diff --git a/microprofile-health/expose-management-port-openshift.adoc b/microprofile-health/expose-management-port-openshift.adoc new file mode 100644 index 0000000000..b665ce7a4f --- /dev/null +++ b/microprofile-health/expose-management-port-openshift.adoc @@ -0,0 +1,5 @@ +:expose-mgmt-port-openshift: true +include::expose-management-port.adoc[] + +// Unset the attribute +:!expose-mgmt-port-openshift: \ No newline at end of file diff --git a/microprofile-health/expose-management-port.adoc b/microprofile-health/expose-management-port.adoc index 745e2fcab1..b6ebb54aea 100644 --- a/microprofile-health/expose-management-port.adoc +++ b/microprofile-health/expose-management-port.adoc @@ -1,16 +1,35 @@ +ifdef::expose-mgmt-port-openshift[] +:expose-mgmt-port-cli: oc +:expose-mgmt-port-yaml-suffix: openshift +endif::[] +ifdef::expose-mgmt-port-kubernetes[] +:expose-mgmt-port-cli: kubectl +:expose-mgmt-port-yaml-suffix: kubernetes +endif::[] + This quickstart requires the management port (9990) to be exposed for demo purposes and testing. We do this only to demonstrate the concepts and ease the testing. IMPORTANT: It is **not** recommended to expose the management port in a production environment! -To expose the management porte to manually exposes our service on port 9990 we deploying the following file: +To expose the management port to manually expose our service on port 9990 we deploy the following file: [source,options="nowrap",subs="+attributes"] ---- -oc apply -f charts/management-openshift.yml +{expose-mgmt-port-cli} apply -f charts/management-{expose-mgmt-port-yaml-suffix}.yml ---- Once this is deployed you will be able to access the management port via the created `microprofile-health-management` route. +ifdef::expose-mgmt-port-openshift[] To get the address of the `microprofile-health-management` route, execute: [source,options="nowrap",subs="+attributes"] ---- $ oc get route microprofile-health -o jsonpath="{.spec.host}" ---- +endif::[] +ifdef::expose-mgmt-port-kubernetes[] +To access the management port from outside the cluster, we need to set up a Kubernetes port forward. This is done with the command: +[source,options="nowrap",subs="+attributes"] +---- +{expose-mgmt-port-cli} port-forward service/microprofile-health-management 9990:9990 +---- +Note that the command to create the port-forward will not return, so it is easiest to run this in a separate terminal. +endif::[] diff --git a/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc b/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc index 596043149e..b2a5911db0 100644 --- a/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc +++ b/shared-doc/build-and-run-the-quickstart-with-kubernetes.adoc @@ -25,3 +25,6 @@ include::../shared-doc/run-integration-tests-with-kubernetes.adoc[leveloffset=+1 //Prepare Helm for Quickstart Deployment include::../shared-doc/helm-undeploy-project.adoc[leveloffset=+1] + +// Unset the attribute +:!kubernetes: diff --git a/shared-doc/build-and-run-the-quickstart-with-openshift.adoc b/shared-doc/build-and-run-the-quickstart-with-openshift.adoc index fd0b0896f9..dc838cd60c 100644 --- a/shared-doc/build-and-run-the-quickstart-with-openshift.adoc +++ b/shared-doc/build-and-run-the-quickstart-with-openshift.adoc @@ -1,4 +1,5 @@ :cloud-platform: OpenShift +:openshift: true ifndef::helm-app-name[] :helm-app-name: {artifactId} endif::helm-app-name[] @@ -24,3 +25,6 @@ include::../shared-doc/run-integration-tests-with-openshift.adoc[leveloffset=+1] //Prepare Helm for Quickstart Deployment include::../shared-doc/helm-undeploy-project.adoc[leveloffset=+1] + +// Unset the attribute +:!openshift: diff --git a/shared-doc/helm-deploy-project.adoc b/shared-doc/helm-deploy-project.adoc index 594728717b..8fbff12fd1 100644 --- a/shared-doc/helm-deploy-project.adoc +++ b/shared-doc/helm-deploy-project.adoc @@ -114,7 +114,7 @@ If you want to see all the configuration elements to customize your deployment y $ helm show readme {helmChartName} ---- -ifndef::kubernetes[] +ifdef::openshift[] Get the URL of the route to the deployment. [source,options="nowrap",subs="+attributes"] @@ -140,6 +140,9 @@ endif::[] The Maven profile named `openshift` is used by the Helm chart to provision the server with the quickstart deployed on the root web context, and thus the application should be accessed with the URL without the `/{artifactId}` path segment after `HOST:PORT`. ==== -ifdef::post-helm-install-actions[] -include::{post-helm-install-actions}[leveloffset=+1] -endif::post-helm-install-actions[] +ifdef::openshift,post-helm-install-actions-openshift[] +include::{post-helm-install-actions-openshift}[leveloffset=+1] +endif::openshift,post-helm-install-actions-openshift[] +ifdef::kubernetes,post-helm-install-actions-kubernetes[] +include::{post-helm-install-actions-kubernetes}[leveloffset=+1] +endif::kubernetes,post-helm-install-actions-kubernetes[] diff --git a/shared-doc/run-integration-tests-with-kubernetes.adoc b/shared-doc/run-integration-tests-with-kubernetes.adoc index 813eef4058..bdafc2ee73 100644 --- a/shared-doc/run-integration-tests-with-kubernetes.adoc +++ b/shared-doc/run-integration-tests-with-kubernetes.adoc @@ -6,15 +6,15 @@ The integration tests included with this quickstart, which verify that the quick The integration tests expect a deployed application, so make sure you have deployed the quickstart on Kubernetes before you begin. ==== -ifdef::extra-kubernetes-testing-actions[] -include::{extra-kubernetes-testing-actions}[leveloffset=+1] -endif::extra-kubernetes-testing-actions[] +ifdef::extra-testing-actions-kubernetes[] +include::{extra-testing-actions-kubernetes}[leveloffset=+1] +endif::extra-testing-actions-kubernetes[] -ifndef::extra-kubernetes-test-arguments[:extra-kubernetes-test-arguments:] +ifndef::extra-test-arguments-kubernetes[:extra-test-arguments-kubernetes:] Run the integration tests using the following command to run the `verify` goal with the `integration-testing` profile activated and the proper URL: [source,options="nowrap",subs="+attributes"] ---- -$ mvn verify -Pintegration-testing -Dserver.host=http://localhost:8080 {extra-openshift-test-arguments} +$ mvn verify -Pintegration-testing -Dserver.host=http://localhost:8080 {extra-test-arguments-kubernetes} ---- diff --git a/shared-doc/run-integration-tests-with-openshift.adoc b/shared-doc/run-integration-tests-with-openshift.adoc index 5d9a87487b..17e3271622 100644 --- a/shared-doc/run-integration-tests-with-openshift.adoc +++ b/shared-doc/run-integration-tests-with-openshift.adoc @@ -6,23 +6,23 @@ The integration tests included with this quickstart, which verify that the quick The integration tests expect a deployed application, so make sure you have deployed the quickstart on OpenShift before you begin. ==== -ifdef::extra-openshift-testing-actions[] -include::{extra-openshift-testing-actions}[leveloffset=+1] -endif::extra-openshift-testing-actions[] +ifdef::extra-testing-actions-openshift[] +include::{extra-testing-actions-openshift}[leveloffset=+1] +endif::extra-testing-actions-openshift[] -ifndef::extra-openshift-test-arguments[:extra-openshift-test-arguments:] +ifndef::extra-test-arguments-openshift[:extra-test-arguments-openshift:] Run the integration tests using the following command to run the `verify` goal with the `integration-testing` profile activated and the proper URL: ifndef::requires-http-route[] [source,options="nowrap",subs="+attributes"] ---- -$ mvn verify -Pintegration-testing -Dserver.host=https://$(oc get route {helm-app-name} --template='{{ .spec.host }}') {extra-openshift-test-arguments} +$ mvn verify -Pintegration-testing -Dserver.host=https://$(oc get route {helm-app-name} --template='{{ .spec.host }}') {extra-test-arguments-openshift} ---- endif::requires-http-route[] ifdef::requires-http-route[] [source,options="nowrap",subs="+attributes"] ---- -$ mvn verify -Pintegration-testing -Dserver.host=http://$(oc get route {helm-app-name} --template='{{ .spec.host }}') {extra-openshift-test-arguments} +$ mvn verify -Pintegration-testing -Dserver.host=http://$(oc get route {helm-app-name} --template='{{ .spec.host }}') {extra-test-arguments-openshift} ---- endif::requires-http-route[] From 5fd46e6d083cbe80796d9b9a0c85212fefe1dbd4 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Mon, 17 Jun 2024 17:06:44 +0200 Subject: [PATCH 12/13] [WFLY-19335] labels should be a child of metadata, not a sibling --- .../charts/kafka-on-kubernetes.yaml | 4 ++-- .../charts/kafka-on-openshift.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/microprofile-reactive-messaging-kafka/charts/kafka-on-kubernetes.yaml b/microprofile-reactive-messaging-kafka/charts/kafka-on-kubernetes.yaml index 7e58e9984a..fc864521d9 100644 --- a/microprofile-reactive-messaging-kafka/charts/kafka-on-kubernetes.yaml +++ b/microprofile-reactive-messaging-kafka/charts/kafka-on-kubernetes.yaml @@ -28,8 +28,8 @@ apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaTopic metadata: name: testing -labels: - strimzi.io/cluster: my-cluster + labels: + strimzi.io/cluster: my-cluster spec: partitions: 3 replicas: 3 \ No newline at end of file diff --git a/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml b/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml index 7e58e9984a..fc864521d9 100644 --- a/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml +++ b/microprofile-reactive-messaging-kafka/charts/kafka-on-openshift.yaml @@ -28,8 +28,8 @@ apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaTopic metadata: name: testing -labels: - strimzi.io/cluster: my-cluster + labels: + strimzi.io/cluster: my-cluster spec: partitions: 3 replicas: 3 \ No newline at end of file From 65a06c224d845f1fae4dae4a3a3b93044eb404c2 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Mon, 17 Jun 2024 17:37:18 +0200 Subject: [PATCH 13/13] [WFLY-19335] Fixes from code review to improve rendering --- shared-doc/helm-deploy-project.adoc | 8 ++++---- shared-doc/helm-undeploy-project.adoc | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/shared-doc/helm-deploy-project.adoc b/shared-doc/helm-deploy-project.adoc index 8fbff12fd1..f04d1035ab 100644 --- a/shared-doc/helm-deploy-project.adoc +++ b/shared-doc/helm-deploy-project.adoc @@ -140,9 +140,9 @@ endif::[] The Maven profile named `openshift` is used by the Helm chart to provision the server with the quickstart deployed on the root web context, and thus the application should be accessed with the URL without the `/{artifactId}` path segment after `HOST:PORT`. ==== -ifdef::openshift,post-helm-install-actions-openshift[] +ifdef::openshift+post-helm-install-actions-openshift[] include::{post-helm-install-actions-openshift}[leveloffset=+1] -endif::openshift,post-helm-install-actions-openshift[] -ifdef::kubernetes,post-helm-install-actions-kubernetes[] +endif::openshift+post-helm-install-actions-openshift[] +ifdef::kubernetes+post-helm-install-actions-kubernetes[] include::{post-helm-install-actions-kubernetes}[leveloffset=+1] -endif::kubernetes,post-helm-install-actions-kubernetes[] +endif::kubernetes+post-helm-install-actions-kubernetes[] diff --git a/shared-doc/helm-undeploy-project.adoc b/shared-doc/helm-undeploy-project.adoc index c42eedea06..078d91513e 100644 --- a/shared-doc/helm-undeploy-project.adoc +++ b/shared-doc/helm-undeploy-project.adoc @@ -6,5 +6,9 @@ $ helm uninstall {helm-app-name} ---- ifdef::kubernetes[] -Stop the port forward you created earlier with `kubectl port-forward service/{helm-app-name} 8080:8080`. -endif::[] +To stop the port forward you created earlier use: +[source,options="nowrap",subs="+attributes"] +---- +$ kubectl port-forward service/{helm-app-name} 8080:8080 +---- +endif::[] \ No newline at end of file