ServiceMesh Lab
Last updated
Was this helpful?
Last updated
Was this helpful?
Login and checkout Example Bank github repo.
Note: Verify the creditdb
database pod is in Running state before running the SQL schema loader.
Deploy front end service and SQL data schema.
Verify schema loaded to ensure the database is ready to use.
Deploy back-end services:
Deploy the Serverless (knative) service.
Verify it's running:
At this point we can verify the app is running prior to setting up service mesh. We are using an OpenShift route.
Visit URL for the mobile simulator route.
Open up the OpenShift console, navigate to the the OperatorHub, install operators in this order:
Elastic Search (choose version 4.3)
Jaeger Operator
Kiali
Service Mesh Operator
Create a new project called istio-system
.
Go to installed operators, and wait until they become available in this namespace.
While waiting, check out the service-mesh
branch:
Create Control Plane instance.
Create ServiceMeshMemberRolls
Verify install:
oc get smmr -o yaml --all-namespaces | egrep -A2 'ControlPlane|configuredMembers'
Open up a second terminal to watch pods: watch -n1 oc get pods
Deploy with sidecar enabled:
Patch database pod to inject the Istio sidecar.
Delete route and replace with Istio ingress gateway:
Force mTLS between database and other services:
Enable knative-serving with Istio.
This sets the appropriate labels in the knative-serving
namespace allowing the knative service to be triggered.
Redeploy the knative service with the Istio sidecar annotation.
We are updating the cleanup utility because we need to send a signal to the Envoy sidecar to exit after the job completes.
Expose access via OpenShift secured route. Go to istio-system namespace in Admin console.
Set port 80 -> 8080, Edge, Redirect. Default OpenShift certs can be used, or you can upload your own certificates.
Click on URL, e.g. https://example-bank-istio-system.first-test-cluster-f8c169e6934c89d328b2b987ec7f7018-0000.us-south.containers.appdomain.cloud/
Click on "Padlock" to examine certs.
Use bank simulator. Note that all relevant pods have extra container.
Open up Kiali from App square to view traffic flow.
After completion of the workshop, you can collect your badge