git clone git@github.com:your-username/travelops.git
Deploying the TravelOps pattern
An OpenShift cluster
To create an OpenShift cluster, go to the Red Hat Hybrid Cloud console.
Select Services -> Containers -> Create cluster.
The cluster must have a dynamic
StorageClass
to provisionPersistentVolumes
. See sizing your cluster.
Optional: A second OpenShift cluster for multicloud demonstration.
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.
Fork the travelops repository on GitHub.
Clone the forked copy of this repository.
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.
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
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:
Login to your cluster by running the following command:
oc login
Optional: Set the
KUBECONFIG
variable for thekubeconfig
file path:export KUBECONFIG=~/<path_to_kubeconfig>
Deploy the pattern to your cluster. Run the following command:
./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 ofSucceeded
.
Verify that all applications are synchronized. Under the project
travelops-hub
click the URL for thehub
gitopsserver
.As part of this pattern, HashiCorp Vault has been installed. Refer to the section on Vault.
Verify installation by checking the TravelOps Dashboards
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 toIstio config
1 application in the
travel-control
tile with the "đź”’" next toIstio config
3 applications in the
travel-portal
tile with the "đź”’" next toIstio config
Review your 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, selecttravel-agency
exit the menu
You should see all of the deployments and services that make up the travel-agency application.
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!