1- = Solution Pattern: Name Template
1+ = Solution Pattern: Solution Patterns - Optimizing Traffic and Observability with OpenShift Service Mesh 3
22:sectnums:
33:sectlinks:
44:doctype: book
@@ -18,7 +18,8 @@ To provision the demo, you will perform the following steps, each explained in d
1818
1919To check if you have the CLI tools, open your terminal and use the following command:
2020
21- [.console]
21+ [.console-input]
22+ [source,shell script]
2223----
2324oc version
2425----
@@ -74,7 +75,7 @@ oc login --token=<token> --server=<server>
7475
7576* Clone the following Git repository:
7677
77- [.console]
78+ [.console-input ]
7879[source,shell script]
7980----
8081git clone https://github.com/bugbiteme/ossm-3-demo.git
@@ -86,7 +87,7 @@ Ensure you are in the top-level directory of the project: `./ossm-3-demo`.
8687
8788Run the following script to install the listed Operators and Gateway API, and wait for it to complete:
8889
89- [.console]
90+ [.console-input ]
9091[source,shell script]
9192----
9293sh ./install_operators.sh
@@ -98,7 +99,7 @@ Ensure you are in the top-level directory of the project: `./ossm-3-demo`.
9899
99100Run the following script to implement Service Mesh and the example applications, and wait for it to complete:
100101
101- [.console]
102+ [.console-input ]
102103[source,shell script]
103104----
104105sh ./install_ossm3_demo.sh
@@ -128,9 +129,11 @@ image::bookinfo-01.svg[width=100%]
128129
129130You can access the main bookinfo page using the Ingress route shown at the end of the demo install script, or run the command:
130131
132+ [.console-input]
133+ [source,shell script]
131134----
132135export INGRESSHOST=$(oc get route istio-ingressgateway -n istio-ingress -o=jsonpath='{.spec.host}')
133- echo http://${ INGRESSHOST} /productpage
136+ echo http://$INGRESSHOST/productpage
134137----
135138
136139And open the link in a web browser.
@@ -139,6 +142,8 @@ image::bookinfo-02.png[width=50%]
139142
140143`INGRESSHOST` is the URL provided by the Istio Gateway `istio-ingressgateway`, deployed in the `istio-ingress` namespace.
141144
145+ [.console-input]
146+ [source,shell script]
142147----
143148oc get deployment -n istio-ingress istio-ingressgateway -o yaml
144149----
@@ -254,10 +259,11 @@ We can get a better view of how our services are interacting with one another wh
254259
255260To obtain the Kiali URL, you can run the following commands:
256261
257- [source,bash]
262+ [.console-input]
263+ [source,shell script]
258264----
259265export KIALI_HOST=$(oc get route kiali -n istio-system -o=jsonpath='{.spec.host}')
260- echo https://${ KIALI_HOST}
266+ echo https://KIALI_HOST
261267----
262268
263269Open this URL in a new tab and login with your OpenShift cluster admin credentials
@@ -343,6 +349,8 @@ image::bookinfo-01.svg[width=100%]
343349
344350You can access the front end of the RestAPI using the Ingress route shown at the end of the demo install script, or run the command:
345351
352+ [.console-input]
353+ [source,shell script]
346354----
347355export GATEWAY=$(oc get gateway hello-gateway -n istio-ingress -o template --template='{{(index .status.addresses 0).value}}')
348356
@@ -355,6 +363,8 @@ curl -s $GATEWAY/hello-service
355363
356364Before we continue, be sure to run the script
357365
366+ [.console-input]
367+ [source,shell script]
358368----
359369sh scripts/generate-traffic.sh
360370----
@@ -476,7 +486,8 @@ From the OpenShift web console, when looking at the topology of the `rest-api-wi
476486
477487image::rest-01.png[width=75%]
478488
479-
489+ [.console-input]
490+ [source,shell script]
480491----
481492export GATEWAY=$(oc get gateway hello-gateway -n istio-ingress -o template --template='{{(index .status.addresses 0).value}}')
482493curl -s $GATEWAY/hello-service
@@ -575,6 +586,8 @@ image::canary-03.png[width=100%]
575586
576587In the second terminal, run the script `canary-rollout.sh`
577588
589+ [.console-input]
590+ [source,shell script]
578591----
579592sh scripts/canary-rollout.sh
580593----
@@ -593,6 +606,8 @@ image::canary-07.png[width=100%]
593606
594607If you would like to roll traffic back to `v1`, run the command:
595608
609+ [.console-input]
610+ [source,shell script]
596611----
597612oc apply -k ./resources/application/kustomize/overlays/pod
598613----
0 commit comments