From 47c2daa584b4129776d20e0134137e9c65fb5d82 Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Mon, 10 Mar 2025 14:47:23 +0000 Subject: [PATCH 1/7] TELCODOCS-2228 Updates based on audit travelops --- modules/mcg-deploying-mcg-pattern.adoc | 2 +- modules/trvlops-deploying.adoc | 117 +++++++++++++++++++------ 2 files changed, 92 insertions(+), 27 deletions(-) diff --git a/modules/mcg-deploying-mcg-pattern.adoc b/modules/mcg-deploying-mcg-pattern.adoc index 316726e12..e291274d3 100644 --- a/modules/mcg-deploying-mcg-pattern.adoc +++ b/modules/mcg-deploying-mcg-pattern.adoc @@ -249,7 +249,7 @@ $ cd /path/to/your/repository + [source,terminal] ---- -$ oc login --token=sha256~AUv_4DGQoFMVzmdO3cg3v4vnUuaV3lYcy6N2SCwVOz4 --server=https://api..:6443 +$ oc login --token= --server=https://api..:6443 ---- . Alternatively log in by running the following command: diff --git a/modules/trvlops-deploying.adoc b/modules/trvlops-deploying.adoc index 02d6ffe9f..b1d51da45 100644 --- a/modules/trvlops-deploying.adoc +++ b/modules/trvlops-deploying.adoc @@ -8,8 +8,25 @@ * An OpenShift cluster ** To create an OpenShift cluster, go to the https://console.redhat.com/[Red Hat Hybrid Cloud console]. - ** Select *Services \-> Containers \-> Create cluster*. - ** The cluster must have a dynamic `StorageClass` to provision `PersistentVolumes`. See link:../../multicloud-gitops/mcg-cluster-sizing[sizing your cluster]. + ** Select *OpenShift \-> Red Hat OpenShift Container Platform \-> Create cluster*. + ** The cluster must have a dynamic `StorageClass` to provision `PersistentVolumes`. Verify that a dynamic `StorageClass` exists before creating one by running the following command: ++ +[source,terminal] +---- +$ oc get storageclass -o custom-columns=NAME:.metadata.name,PROVISIONER:.provisioner,DEFAULT:.metadata.annotations."storageclass\.kubernetes\.io/is-default-class" +---- ++ +.Example output ++ +[source,terminal] +---- +NAME PROVISIONER DEFAULT +gp2-csi ebs.csi.aws.com +gp3-csi ebs.csi.aws.com true +---- ++ +For more information about creating a dynamic `StorageClass`, see the https://docs.openshift.com/container-platform/latest/storage/dynamic-provisioning.html[Dynamic provisioning] documentation. + * Optional: A second OpenShift cluster for multicloud demonstration. //Replaced git and podman prereqs with the tooling dependencies page * https://validatedpatterns.io/learn/quickstart/[Install the tooling dependencies]. @@ -22,22 +39,57 @@ public or private cloud by using https://console.redhat.com/openshift/create[Red .Procedure . Fork the https://github.com/validatedpatterns-sandbox/travelops[travelops] repository on GitHub. + . Clone the forked copy of this repository. + [source,terminal] ---- -git clone git@github.com:your-username/travelops.git +$ git clone git@github.com:your-username/travelops.git ---- +. Go to your repository: Ensure you are in the root directory of your Git repository by using: ++ +[source,terminal] +---- +$ cd /path/to/your/repository +---- + +. Run the following command to set the upstream repository: ++ +[source,terminal] +---- +$ git remote add -f upstream git@github.com:validatedpatterns-sandbox/travelops.git +---- + +. Verify the setup of your remote repositories by running the following command: ++ +[source,terminal] +---- +$ git remote -v +---- ++ +.Example output ++ +[source,terminal] +---- +origin git@github.com:/travelops.git (fetch) +origin git@github.com:/travelops.git (push) +upstream https://github.com/validatedpatterns-sandbox/travelops.git (fetch) +upstream https://github.com/validatedpatterns-sandbox/travelops.git (push) +---- + . Create a local copy of the secret values file that can safely include credentials. Run the following commands: + [source,terminal] ---- -cp values-secret.yaml.template ~/values-secret-travelops.yaml +$ cp values-secret.yaml.template ~/values-secret-travelops.yaml ---- + [source,yaml] ---- +# A more formal description of this format can be found here: +# https://github.com/hybrid-cloud-patterns/common/tree/main/ansible/roles/vault_utils#values-secret-file-format + version: "2.0" # Ideally you NEVER COMMIT THESE VALUES TO GIT (although if all passwords are # automatically generated inside the vault this should not really matter) @@ -50,14 +102,6 @@ secrets: - name: rootpasswd onMissingValue: generate vaultPolicy: validatedPatternDefaultPolicy - -# Uncomment the following if you want to enable HTPasswd oAuth -# - name: htpasswd -# vaultPrefixes: -# - global -# fields: -# - name: htpasswd -# path: '/path/to/users.htpasswd' ---- + [WARNING] @@ -65,59 +109,80 @@ secrets: Do not commit this file. You do not want to push personal credentials to GitHub. If you do not want to customize the secrets, these steps are not needed. The framework generates a random password for the config-demo application. ==== -. Customize the deployment for your cluster. Run the following command: +. Customize the deployment for your cluster by following these steps: + +.. Creates a new branch named my-branch and switch to it by running the following command: + [source,terminal] ---- -git switch -c my-branch +$ git switch -c my-branch ---- + +.. Edit the `values-hub.yaml` file to customize the deployment for your cluster by running the following command: + [source,terminal] ---- -vi values-hub.yaml +$ vi values-hub.yaml ---- + +.. Commit the changes to the `values-hub.yaml` file by running the following commands: + [source,terminal] ---- -git add values-hub.yaml +$ git add values-hub.yaml ---- + +.. Commit the changes to the `values-hub.yaml` file by running the following commands: + [source,terminal] ---- -git commit values-hub.yaml +$ git commit values-hub.yaml ---- + +.. Push the changes to the `values-hub.yaml` file by running the following command: + [source,terminal] ---- -git push origin my-branch +$ git push origin my-branch ---- . Deploy the pattern by running `./pattern.sh make install` or by using the link:/infrastructure/using-validated-pattern-operator/[Validated Patterns Operator]. [id="deploying-cluster-using-patternsh-file"] -== Deploying the cluster by using the pattern.sh file +== Deploying the cluster by using the pattern.sh script -To deploy the cluster by using the `pattern.sh` file, complete the following steps: +To deploy the cluster by using the `pattern.sh` script, complete the following steps: -. Login to your cluster by running the following command: +. Navigate to the root directory of the cloned repository by running the following command: + [source,terminal] ---- - oc login +$ cd /path/to/your/repository ---- + +. Log in to your cluster by running the following this procedure: + +.. Obtain an API token by visiting https://oauth-openshift.apps../oauth/token/request + +.. Log in with this retrieved token by running the following command: + -Optional: Set the `KUBECONFIG` variable for the `kubeconfig` file path: +[source,terminal] +---- +$ oc login --token= --server=https://api..:6443 +---- + +. Alternatively log in by running the following command: + [source,terminal] ---- - export KUBECONFIG=~/ +$ export KUBECONFIG=~/ ---- -. Deploy the pattern to your cluster. Run the following command: +. Deploy the pattern to your cluster by running the following command: + [source,terminal] ---- - ./pattern.sh make install +$ ./pattern.sh make install ---- [id="verify-trvlops-pattern-install"] From d2eafd422786bdabe659c613de7fc2ac323e9f3b Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Mon, 10 Mar 2025 15:14:12 +0000 Subject: [PATCH 2/7] making more updates based on doing --- modules/trvlops-deploying.adoc | 41 +++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/modules/trvlops-deploying.adoc b/modules/trvlops-deploying.adoc index b1d51da45..fd8a1f36d 100644 --- a/modules/trvlops-deploying.adoc +++ b/modules/trvlops-deploying.adoc @@ -153,13 +153,6 @@ $ git push origin my-branch To deploy the cluster by using the `pattern.sh` script, complete the following steps: -. Navigate to the root directory of the cloned repository by running the following command: -+ -[source,terminal] ----- -$ cd /path/to/your/repository ----- - . Log in to your cluster by running the following this procedure: .. Obtain an API token by visiting https://oauth-openshift.apps../oauth/token/request @@ -189,9 +182,14 @@ $ ./pattern.sh make install == Verify TravelOps Pattern installation . Verify that the Operators have been installed. + .. To verify, in the OpenShift Container Platform web console, navigate to *Operators → Installed Operators* page. - .. Set your project to `All Projects` and verify the operators are isntalled and have a status of `Succeeded`. -. Verify that all applications are synchronized. Under the project `travelops-hub` click the URL for the `hub` gitops `server`. + + .. Set your project to `All Projects` and verify the operators are installed and have a status of `Succeeded`. + +. Verify that all applications are synchronized. Under *Networking \-> Routes* select the *Location URL* associated with the *hub-gitops-server* . All application are report status as `Synched`. + +. Verify that all applications are synchronized. Under the project `travelops-hub` click the URL for the `hub-gitops-server`. + image::travelops/ossm-sync-success.png[ArgoCD Applications,link="/images/travelops/ossm-sync-success.png"] @@ -202,14 +200,25 @@ As part of this pattern, HashiCorp Vault has been installed. Refer to the sectio [id="verify-trvlops-dashboards"] == Verify installation by checking the TravelOps Dashboards -. Access the Kiali and Travel Control dashboards - +. Access the Kiali control dashboards by running the following commands: + [source, terminal] ---- KIALI=https://$(oc get route -n istio-system kiali -o jsonpath='{.spec.host}') echo ${KIALI} +---- ++ +.Example output ++ +[source,terminal] +---- +https://kiali-istio-system.apps.. +---- +. Access the Travel Control dashboards by running the following commands: ++ +[source, terminal] +---- CONTROL=http://$(oc get route -n istio-system istio-ingressgateway -o jsonpath='{.spec.host}') echo ${CONTROL} ---- @@ -233,10 +242,12 @@ In the Kiali dashboard we can see how all of the various components interact wit In the left hand menu: -* click Graph -* in the `Namespace` dropdown, select `travel-agency` -* exit the menu +. Cilck *Graph*. -You should see all of the deployments and services that make up the travel-agency application. +. In the `Namespace` dropdown, select `travel-agency`. +. Exit the menu + +You should see all of the deployments and services that make up the travel-agency application. ++ image:travelops/travel-agency-svc-kiali.png[Travel Agency,link="/images/travelops/travel-agency-svc-kiali.png"] From 6c8521f0d08c407c97ccc6eb514520775dc961e6 Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Tue, 11 Mar 2025 12:24:13 +0000 Subject: [PATCH 3/7] adding more updates 5 --- content/patterns/travelops/getting-started.adoc | 4 +--- modules/trvlops-deploying.adoc | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/content/patterns/travelops/getting-started.adoc b/content/patterns/travelops/getting-started.adoc index 9f4774f25..e54b30cc8 100644 --- a/content/patterns/travelops/getting-started.adoc +++ b/content/patterns/travelops/getting-started.adoc @@ -14,6 +14,4 @@ include::modules/trvlops-deploying.adoc[leveloffset=1] [id="next-steps_getting-started"] == Next Steps -To run through the demo, refer to link:..//demo-script[Monitor the Mesh] - -Like what you see, but can't quite put your finger on how you could use a Service Mesh? Check out link:../ideas-for-customization[Ways to customize the Mesh] for some ideas! +See link:../ideas-for-customization[Ways to customize the Mesh] for some ideas on how to customize the pattern. diff --git a/modules/trvlops-deploying.adoc b/modules/trvlops-deploying.adoc index fd8a1f36d..be46a93d0 100644 --- a/modules/trvlops-deploying.adoc +++ b/modules/trvlops-deploying.adoc @@ -187,9 +187,7 @@ $ ./pattern.sh make install .. Set your project to `All Projects` and verify the operators are installed and have a status of `Succeeded`. -. Verify that all applications are synchronized. Under *Networking \-> Routes* select the *Location URL* associated with the *hub-gitops-server* . All application are report status as `Synched`. - -. Verify that all applications are synchronized. Under the project `travelops-hub` click the URL for the `hub-gitops-server`. +. Verify that all applications are synchronized. Under *Networking* -> *Routes* with the project set to *travelops-hub* select the *Location URL* associated with the *hub-gitops-server* . All application are report status as `Synched`. + image::travelops/ossm-sync-success.png[ArgoCD Applications,link="/images/travelops/ossm-sync-success.png"] From 998da93c510eff845a0aae908efe502284521256 Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Tue, 11 Mar 2025 14:23:53 +0000 Subject: [PATCH 4/7] removing demo-script --- content/patterns/travelops/_index.adoc | 2 +- content/patterns/travelops/demo-script.adoc | 12 ------------ modules/trvlops-about.adoc | 2 +- modules/trvlops-deploying.adoc | 2 +- 4 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 content/patterns/travelops/demo-script.adoc diff --git a/content/patterns/travelops/_index.adoc b/content/patterns/travelops/_index.adoc index 452e87fa5..ad0f0e096 100644 --- a/content/patterns/travelops/_index.adoc +++ b/content/patterns/travelops/_index.adoc @@ -30,5 +30,5 @@ include::modules/trvlops-architecture.adoc[leveloffset=+1] [id="next-steps_trvlops-index"] == Next steps -* link:getting-started[Deploy the Pattern] using Helm. +* link:getting-started[Deploy the Pattern]. diff --git a/content/patterns/travelops/demo-script.adoc b/content/patterns/travelops/demo-script.adoc deleted file mode 100644 index 98aafc505..000000000 --- a/content/patterns/travelops/demo-script.adoc +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Demo Script -weight: 60 -aliases: /travelops/demo/ ---- - -:toc: -:imagesdir: /images -:_content-type: REFERENCE -include::modules/comm-attributes.adoc[] - -include::modules/trvlops-demo.adoc[leveloffset=+1] diff --git a/modules/trvlops-about.adoc b/modules/trvlops-about.adoc index 78b18aac6..31d53fc12 100644 --- a/modules/trvlops-about.adoc +++ b/modules/trvlops-about.adoc @@ -17,7 +17,7 @@ Based on the requirements of a specific implementation, certain details might di Background:: -The {trvlops-pattern} deployed using OpenShift GitOps and is comprised of Red Hat Service Mesh (RHSM), Kiali for the Service Mesh console, Jaeger for distributed tracing, and elasticsearch for logging and analytics. The application deployed is from the Kiali traveldemo tutorial. This pattern isn't as much about the demo as it is about the capabilities that are enabled with a few simple configurations. Service Mesh's are being incorporated across multiple platforms to provide secure communications between services. +The {trvlops-pattern} deployed using OpenShift GitOps and is comprised of Red Hat Service Mesh (RHSM), Kiali for the Service Mesh console, Jaeger for distributed tracing, and elasticsearch for logging and analytics. The application deployed is from the link:https://kiali.io/docs/tutorials/travels/[Kiali traveldemo]tutorial. This pattern is not as much about the demo as it is about the capabilities that are enabled with a few simple configurations. Service Mesh's are being incorporated across multiple platforms to provide secure communications between services. //In this pattern we implement Mutual TLS (mTLS) which is completed per namespace. To enable a namespace in the mesh you must add the namespace to the list under `serviceMeshMemberNamespaces` in `values-travelops.yaml`. This will create a Service Mesh Member (SMM) resource, which tells the Service Mesh that resources in the namespace are authorized in the mesh. diff --git a/modules/trvlops-deploying.adoc b/modules/trvlops-deploying.adoc index be46a93d0..71f7c6816 100644 --- a/modules/trvlops-deploying.adoc +++ b/modules/trvlops-deploying.adoc @@ -236,7 +236,7 @@ image:travelops/ossm-kiali-db-arrows.png[Kiali Dashboard,link="/images/travelops [id="review-travelops-agency-svc"] == Review Travel Agency Application Graph -In the Kiali dashboard we can see how all of the various components interact with each other within the service mesh. Just to get a glimpse of what we are able to see let's take a look at the applications and services in the `travel-agency` namespace. +In the Kiali dashboard you can see how all of the various components interact with each other within the service mesh. Just to get a glimpse of what we are able to see let's take a look at the applications and services in the `travel-agency` namespace. In the left hand menu: From e374b1f9363d86de5cc8e501cc98da8487069e71 Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Tue, 11 Mar 2025 14:40:49 +0000 Subject: [PATCH 5/7] minor update adding link to kali demo --- modules/trvlops-about.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/trvlops-about.adoc b/modules/trvlops-about.adoc index 31d53fc12..e6d154cc1 100644 --- a/modules/trvlops-about.adoc +++ b/modules/trvlops-about.adoc @@ -17,7 +17,7 @@ Based on the requirements of a specific implementation, certain details might di Background:: -The {trvlops-pattern} deployed using OpenShift GitOps and is comprised of Red Hat Service Mesh (RHSM), Kiali for the Service Mesh console, Jaeger for distributed tracing, and elasticsearch for logging and analytics. The application deployed is from the link:https://kiali.io/docs/tutorials/travels/[Kiali traveldemo]tutorial. This pattern is not as much about the demo as it is about the capabilities that are enabled with a few simple configurations. Service Mesh's are being incorporated across multiple platforms to provide secure communications between services. +The {trvlops-pattern} deployed using OpenShift GitOps and is comprised of Red Hat Service Mesh (RHSM), Kiali for the Service Mesh console, Jaeger for distributed tracing, and elasticsearch for logging and analytics. The application deployed is from the link:https://kiali.io/docs/tutorials/travels/[Kiali traveldemo]. This pattern is not as much about the demo as it is about the capabilities that are enabled with a few simple configurations. Service Mesh's are being incorporated across multiple platforms to provide secure communications between services. //In this pattern we implement Mutual TLS (mTLS) which is completed per namespace. To enable a namespace in the mesh you must add the namespace to the list under `serviceMeshMemberNamespaces` in `values-travelops.yaml`. This will create a Service Mesh Member (SMM) resource, which tells the Service Mesh that resources in the namespace are authorized in the mesh. From 2688467650f6729b46a6359d9ca80f42097795ee Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Wed, 12 Mar 2025 10:37:03 +0000 Subject: [PATCH 6/7] adding SME review comments --- modules/trvlops-deploying.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/trvlops-deploying.adoc b/modules/trvlops-deploying.adoc index 71f7c6816..0e00893fe 100644 --- a/modules/trvlops-deploying.adoc +++ b/modules/trvlops-deploying.adoc @@ -88,7 +88,7 @@ $ cp values-secret.yaml.template ~/values-secret-travelops.yaml [source,yaml] ---- # A more formal description of this format can be found here: -# https://github.com/hybrid-cloud-patterns/common/tree/main/ansible/roles/vault_utils#values-secret-file-format +# https://github.com/validatedpatterns/rhvp.cluster_utils/tree/main/roles/vault_utils#values-secret-file-format version: "2.0" # Ideally you NEVER COMMIT THESE VALUES TO GIT (although if all passwords are @@ -111,7 +111,7 @@ Do not commit this file. You do not want to push personal credentials to GitHub. . Customize the deployment for your cluster by following these steps: -.. Creates a new branch named my-branch and switch to it by running the following command: +.. Create a new branch named my-branch and switch to it by running the following command: + [source,terminal] ---- @@ -125,7 +125,7 @@ $ git switch -c my-branch $ vi values-hub.yaml ---- -.. Commit the changes to the `values-hub.yaml` file by running the following commands: +.. Stage the changes to the `values-hub.yaml` file by running the following commands: + [source,terminal] ---- @@ -136,7 +136,7 @@ $ git add values-hub.yaml + [source,terminal] ---- -$ git commit values-hub.yaml +$ git commit -m "update deployment for my-branch" ---- .. Push the changes to the `values-hub.yaml` file by running the following command: @@ -149,11 +149,11 @@ $ git push origin my-branch . Deploy the pattern by running `./pattern.sh make install` or by using the link:/infrastructure/using-validated-pattern-operator/[Validated Patterns Operator]. [id="deploying-cluster-using-patternsh-file"] -== Deploying the cluster by using the pattern.sh script +== Deploying the pattern by using the pattern.sh script -To deploy the cluster by using the `pattern.sh` script, complete the following steps: +To deploy the pattern by using the `pattern.sh` script, complete the following steps: -. Log in to your cluster by running the following this procedure: +. Log in to your cluster by running the following: .. Obtain an API token by visiting https://oauth-openshift.apps../oauth/token/request From 892d7498b875657052a7fa9f143568160b816a8e Mon Sep 17 00:00:00 2001 From: Kevin Quinn Date: Wed, 12 Mar 2025 10:59:04 +0000 Subject: [PATCH 7/7] adding SME review comments 2 --- modules/trvlops-about.adoc | 2 +- modules/trvlops-deploying.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/trvlops-about.adoc b/modules/trvlops-about.adoc index e6d154cc1..3f654c4a5 100644 --- a/modules/trvlops-about.adoc +++ b/modules/trvlops-about.adoc @@ -17,7 +17,7 @@ Based on the requirements of a specific implementation, certain details might di Background:: -The {trvlops-pattern} deployed using OpenShift GitOps and is comprised of Red Hat Service Mesh (RHSM), Kiali for the Service Mesh console, Jaeger for distributed tracing, and elasticsearch for logging and analytics. The application deployed is from the link:https://kiali.io/docs/tutorials/travels/[Kiali traveldemo]. This pattern is not as much about the demo as it is about the capabilities that are enabled with a few simple configurations. Service Mesh's are being incorporated across multiple platforms to provide secure communications between services. +The {trvlops-pattern} deployed using OpenShift GitOps and is comprised of Red Hat Service Mesh (RHSM), Kiali for the Service Mesh console, Jaeger for distributed tracing, and elasticsearch for logging and analytics. The application deployed is from the link:https://kiali.io/docs/tutorials/travels/[Kiali traveldemo]. This pattern focuses on demonstrating capabilities enabled through simple configurations, rather than the demo itself. Service Mesh technology is adopted across multiple platforms to ensure secure communication between services. //In this pattern we implement Mutual TLS (mTLS) which is completed per namespace. To enable a namespace in the mesh you must add the namespace to the list under `serviceMeshMemberNamespaces` in `values-travelops.yaml`. This will create a Service Mesh Member (SMM) resource, which tells the Service Mesh that resources in the namespace are authorized in the mesh. diff --git a/modules/trvlops-deploying.adoc b/modules/trvlops-deploying.adoc index 0e00893fe..a1752d3cb 100644 --- a/modules/trvlops-deploying.adoc +++ b/modules/trvlops-deploying.adoc @@ -106,7 +106,7 @@ secrets: + [WARNING] ==== -Do not commit this file. You do not want to push personal credentials to GitHub. If you do not want to customize the secrets, these steps are not needed. The framework generates a random password for the config-demo application. +Do not commit this file. Committing it may expose personal credentials to GitHub. If you do not want to customize the secrets, skip these steps. The framework generates a random password for the `config-demo` application. ==== . Customize the deployment for your cluster by following these steps: