Validated Patterns

Deploying the TravelOps pattern

Prerequisites

The use of this pattern depends on having at least one running Red Hat OpenShift cluster. However, consider creating a cluster for deploying the GitOps management hub assets and a separate cluster for the managed cluster.

If you do not have a running Red Hat OpenShift cluster, you can start one on a public or private cloud by using Red Hat Hybrid Cloud Console.

Procedure
  1. Fork the travelops repository on GitHub.

  2. Clone the forked copy of this repository.

    git clone git@github.com:your-username/travelops.git
  3. Create a local copy of the secret values file that can safely include credentials. Run the following commands:

    cp values-secret.yaml.template ~/values-secret-travelops.yaml
    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)
    
    secrets:
      - name: mysql-credentials
        vaultPrefixes:
        - global
        fields:
        - 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'

    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.

  4. Customize the deployment for your cluster. Run the following command:

    git switch -c my-branch
    vi values-hub.yaml
    git add values-hub.yaml
    git commit values-hub.yaml
    git push origin my-branch
  5. Deploy the pattern by running ./pattern.sh make install or by using the Validated Patterns Operator.

Deploying the cluster by using the pattern.sh file

To deploy the cluster by using the pattern.sh file, complete the following steps:

  1. Login to your cluster by running the following command:

     oc login

    Optional: Set the KUBECONFIG variable for the kubeconfig file path:

     export KUBECONFIG=~/<path_to_kubeconfig>
  2. Deploy the pattern to your cluster. Run the following command:

     ./pattern.sh make install

Verify TravelOps Pattern installation

  1. Verify that the Operators have been installed.

    1. To verify, in the OpenShift Container Platform web console, navigate to Operators → Installed Operators page.

    2. Set your project to All Projects and verify the operators are isntalled and have a status of Succeeded.

  2. Verify that all applications are synchronized. Under the project travelops-hub click the URL for the hub gitops server.

    ArgoCD Applications

    As part of this pattern, HashiCorp Vault has been installed. Refer to the section on Vault.

Verify installation by checking the TravelOps Dashboards

  1. Access the Kiali and Travel Control dashboards

    KIALI=https://$(oc get route -n istio-system kiali -o jsonpath='{.spec.host}')
    echo ${KIALI}
    
    CONTROL=http://$(oc get route -n istio-system istio-ingressgateway -o jsonpath='{.spec.host}')
    echo ${CONTROL}

    When we see the đź”’ icon next to our applications and in the top right hand corner of the dashboard it confirms that mTLS is enabled and active in the mesh.

    • The "đź”’" is present next to the logged in user in top right corner of the window.

    • 7 applications in the travel-agency tile with the "đź”’" next to Istio config

    • 1 application in the travel-control tile with the "đź”’" next to Istio config

    • 3 applications in the travel-portal tile with the "đź”’" next to Istio config

  2. Review your Kiali dashboard

    Kiali Dashboard

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 left hand menu:

  • click Graph

  • 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.

Travel Agency

Next Steps

To run through the demo, refer to Monitor the Mesh

Like what you see, but can’t quite put your finger on how you could use a Service Mesh? Check out Ways to customize the Mesh for some ideas!