Note: To automate these steps, see README.ansible.provisioning.md.
Set the context name for the cluster.
Log into the OpenShift cluster, then run:
oc config current-context
oc config rename-context $(oc config current-context) admin-east
oc config use-context admin-eastOptional banner to identify web console (can be customized first):
oc apply -f manifests/cluster/east/console-notification.yamlsource scripts/00-env.shVerify the context is reachable:
oc --context="${CTX_EAST}" cluster-info
oc --context="${CTX_EAST}" versionoc --context="${CTX_EAST}" apply -k manifests/operators/Check that Subscriptions exist and have an installed CSV.
Wait until OSSM and Kiali are ready (PHASE Succeeded):
oc --context="${CTX_EAST}" get csv -n openshift-operators -o custom-columns=NAME:.metadata.name,PHASE:.status.phaseOpenShift's built-in Prometheus stack does not scrape user namespaces by default. Enable it:
oc --context="${CTX_EAST}" apply \
-f manifests/monitoring/user-workload-monitoring.yamlEnsure user workload monitoring is up and running:
Wait for the user workload Prometheus StatefulSet to be rolled out (blocks until ready):
oc --context="${CTX_EAST}" rollout status statefulset prometheus-user-workload \
-n openshift-user-workload-monitoringOptional: List pods in the user workload monitoring namespace to confirm all are Running:
oc --context="${CTX_EAST}" get pods -n openshift-user-workload-monitoringoc --context="${CTX_EAST}" apply -k manifests/tracing-system/This will install S3 storage (MinIO) as well as the Tempo stack for distributed tracing.
Wait for the Tempo stack to be ready (Tempo takes time to provision; errors are expected until it stabilizes):
oc --context="${CTX_EAST}" wait --for=condition=Ready tempostack/sample -n tracing-system --timeout=300soc --context="${CTX_EAST}" apply -k manifests/ossm/istio-cni/
oc --context="${CTX_EAST}" rollout status daemonset istio-cni-node -n istio-cnimeshIDidentifies the mesh.clusterNameandnetworkare set for the east overlay.discoverySelectorsscope istiod to only watch labeled namespaces.
oc --context="${CTX_EAST}" apply -k manifests/ossm/istio-system/overlays/eastNote: This also includes OpenTelemetry components.
Wait for the control plane to be ready:
oc --context="${CTX_EAST}" wait --for=condition=Ready istio/default \
-n istio-system --timeout=300sDeploy the ingress gateway (via Kubernetes Gateway API) in the ingress-gateway namespace (namespace will be created automatically):
oc --context="${CTX_EAST}" apply -f manifests/ingress-gateway/Check the status and FQDN of the load balancer pointed to the gateway:
oc --context="${CTX_EAST}" get gtw prod-gateway -n ingress-gatewayExample output:
NAME CLASS ADDRESS PROGRAMMED AGE
prod-gateway istio a27962850ossm15awesomecf13afed-641463735.eu-central-1.elb.amazonaws.com True 9m12s
Note: If no value is returned, check the status details of the Gateway resource to see if it is stuck in the PENDING state.
Create a new cacert secret in istio-system using ca.crt from the tracing-system namespace.
Note: cacert must be created before applying the Kiali CR. The tempo-sample-signing-ca secret must exist first (i.e., tracing-system must be deployed and Tempo must be ready).
oc --context="${CTX_EAST}" get secret tempo-sample-signing-ca -n tracing-system \
-o jsonpath='{.data.tls\.crt}' | base64 -d > certs/ca.crt
oc --context="${CTX_EAST}" create secret generic cacert --from-file=ca.crt=certs/ca.crt -n istio-systemApply the Kiali CR:
oc --context="${CTX_EAST}" apply -f manifests/ossm/kiali/Wait for Kiali to be ready (this can take a moment to start):
oc --context="${CTX_EAST}" rollout status deployment kiali -n istio-systemoc --context="${CTX_EAST}" apply -k manifests/bookinfo/app/eastGet gateway address and port:
export INGRESS_HOST=$(oc --context="${CTX_EAST}" get gtw prod-gateway -n ingress-gateway -o jsonpath='{.status.addresses[0].value}')
export INGRESS_PORT=$(oc --context="${CTX_EAST}" get gtw prod-gateway -n ingress-gateway -o jsonpath='{.spec.listeners[?(@.name=="http")].port}')
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
echo "http://${GATEWAY_URL}/productpage"Verify the productpage:
curl -so - -w "%{http_code}\n" http://${GATEWAY_URL}/productpage | grep "<title>Simple Bookstore App</title>"curl -so - -w "%{http_code}\n" http://${GATEWAY_URL}/api/v1/products/0/ratings | jqsh scripts/loadgen-web.sh
sh scripts/loadgen-api.shAllow a moment for data to start populating in Kiali.
To inject a fault (75% return of HTTP status 503), apply the Envoy filter to ratings:
oc --context="${CTX_EAST}" -n bookinfo apply -f manifests/bookinfo/ratings-fault.yamlOnce applied, Kiali will start showing errors after a minute. The output from scripts/loadgen-api.sh will immediately show a periodic message:
{
"error": "Sorry, product ratings are currently unavailable for this book."
}Apply a VirtualService to ratings to add a retry policy:
retries:
attempts: 3
perTryTimeout: 2s
retryOn: gateway-error,connect-failure,refused-stream,5xxoc --context="${CTX_EAST}" -n bookinfo apply -f manifests/bookinfo/ratings-vs.yamlThe load generator output will stop showing the error message.
For outlier detection and temporarily removing a service from the load-balancing pool, apply a DestinationRule with a circuit breaker:
spec:
host: ratings.bookinfo.svc.cluster.local
trafficPolicy:
outlierDetection:
consecutive5xxErrors: 1
interval: 10s
baseEjectionTime: 30s
maxEjectionPercent: 100If one 5xx error is detected in a 10s interval, the pod is ejected for 30s before being rechecked (you can adjust these values to experiment).
oc --context="${CTX_EAST}" -n bookinfo apply -f manifests/bookinfo/ratings-dr.yamlAfter applying, ratings will periodically disappear in Kiali while the circuit breaker is active.