Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/patterns/travelops/_index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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].

12 changes: 0 additions & 12 deletions content/patterns/travelops/demo-script.adoc

This file was deleted.

4 changes: 1 addition & 3 deletions content/patterns/travelops/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion modules/mcg-deploying-mcg-pattern.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ $ cd /path/to/your/repository
+
[source,terminal]
----
$ oc login --token=sha256~AUv_4DGQoFMVzmdO3cg3v4vnUuaV3lYcy6N2SCwVOz4 --server=https://api.<your-cluster>.<domain>:6443
$ oc login --token=<retrieved-token> --server=https://api.<your-cluster>.<domain>:6443
----

. Alternatively log in by running the following command:
Expand Down
2 changes: 1 addition & 1 deletion modules/trvlops-about.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]. 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.

Expand Down
146 changes: 110 additions & 36 deletions modules/trvlops-deploying.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <none>
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].
Expand All @@ -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 [email protected]:your-username/travelops.git
$ git clone [email protected]: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 [email protected]: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 [email protected]:<your-username>/travelops.git (fetch)
origin [email protected]:<your-username>/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)
Expand All @@ -50,83 +102,92 @@ 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]
====
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:
. Log in to your cluster by running the following this procedure:

.. Obtain an API token by visiting https://oauth-openshift.apps.<your-cluster>.<domain>/oauth/token/request

.. Log in with this retrieved token by running the following command:
+
[source,terminal]
----
oc login
$ oc login --token=<retrieved-token> --server=https://api.<your-cluster>.<domain>:6443
----
+
Optional: Set the `KUBECONFIG` variable for the `kubeconfig` file path:

. Alternatively log in by running the following command:
+
[source,terminal]
----
export KUBECONFIG=~/<path_to_kubeconfig>
$ export KUBECONFIG=~/<path_to_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"]
== 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* 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"]

Expand All @@ -137,14 +198,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.<cluster_id>.<cluster_domain>
----

. 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}
----
Expand All @@ -164,14 +236,16 @@ 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:

* 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"]