{"id":24849220,"url":"https://github.com/bugbiteme/ossm-3-demo","last_synced_at":"2025-07-05T20:08:08.322Z","repository":{"id":267502796,"uuid":"901457492","full_name":"bugbiteme/ossm-3-demo","owner":"bugbiteme","description":"OpenShift Service Mesh 3 Demo/Quckstart","archived":false,"fork":false,"pushed_at":"2025-03-11T16:54:24.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T11:29:32.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugbiteme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-10T17:35:56.000Z","updated_at":"2025-02-27T19:39:45.000Z","dependencies_parsed_at":"2024-12-10T18:58:28.046Z","dependency_job_id":"608c828a-2d9f-4ea2-865a-e7a741909423","html_url":"https://github.com/bugbiteme/ossm-3-demo","commit_stats":null,"previous_names":["bugbiteme/ossm-3-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fossm-3-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fossm-3-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fossm-3-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fossm-3-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugbiteme","download_url":"https://codeload.github.com/bugbiteme/ossm-3-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602312,"owners_count":21131616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-31T12:30:15.521Z","updated_at":"2025-04-12T17:07:18.512Z","avatar_url":"https://github.com/bugbiteme.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ossm-3-demo\nOpenShift Service Mesh 3 Demo/Quckstart with Gateway API for ingress.\n\n## For Red Hatters\nUse the following demo:\n[AWS with OpenShift Open Environment](https://catalog.demo.redhat.com/catalog?item=babylon-catalog-prod/sandboxes-gpte.sandbox-ocp.prod)\n\nMinimal OCP config:\n- Control Plane Count: `1`\n- Control Plane Instance Type: `m6a.4xlarge` (resources to handle OSSM and observability overhead)\n\n\n# Quickstart: OSSM3 with Kiali, Tempo, Bookinfo\n- Based off of https://github.com/mkralik3/sail-operator/tree/quickstart/docs/ossm/quickstarts/ossm3-kiali-tempo-bookinfo\n  \n  \nThis quickstart guide provides step-by-step instructions on how to set up OSSM3 with Kiali, Tempo, Open Telemetry, and Bookinfo app. It also includes an example of using the next generation of ingress with the Kuberntetes Gateway API to access an example RestAPI.  \n  \nBy the end of this quickstart, you will have installed OSSM3, where tracing information is collected by Open Telemetry Collector and Tempo, and monitoring is managed by an in-cluster monitoring stack. The Bookinfo sample application will be included in the service mesh, with a traffic generator sending one request per second to simualte traffic. Additionally, the Kiali UI and OSSMC plugin will be set up to provide a graphical overview.\n\n***Note: Bookinfo uses the istio gateway for ingress. The RestAPI uses Kubernetes Gateway API for ingress***\n\n## Prerequisites\n- The OpenShift Service Mesh 3, Kiali, Tempo, Red Hat build of OpenTelemetry operators have been installed (you can install it by `./install_operators.sh` script which installs the particular operator versions (see subscriptions.yaml))\n- The above listed script also enables the `Gateway API`, which will be included with OCP in a future release (TBD)\n- The cluster that has available Persistent Volumes or supports dynamic provisioning storage (for installing MiniO)\n- You are logged into OpenShift via the CLI\n\n## What is located where\nThe quickstart \n  * installs MiniO and Tempo to `tracing-system` namespace\n  * installs OpenTelemetryCollector to `opentelemetrycollector` namespace\n  * installs OSSM3 (Istio CR) with Kiali and OSSMC to `istio-system` namespace\n  * installs IstioCNI to `istio-cni` namespace\n  * installs Istio ingress gateway to `istio-ingress` namespace\n  * installs Gateway API ingress gateway to `istio-ingress` namespace\n  * installs bookinfo app with traffic generator in `bookinfo` namespace\n  * installs RestAPI app in `rest-api-with-mesh` namespace\n\n## Shortcut to the end\nTo skip all the following steps and set everything up automatically (e.g., for demo purposes), simply run the prepared `./install_ossm3_demo.sh` script which will perform all steps automatically.\n\n## Steps\nAll required YAML resources are in the `./resources` folder.\nFor a more detailed description about what is set and why, see OpenShift Service Mesh documentation.\n  \nEnable Gateway API  (only if you did not run the `./install_operators.sh` script)\n------------  \n```bash\noc get crd gateways.gateway.networking.k8s.io \u0026\u003e /dev/null ||  { oc kustomize \"github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.0.0\" | oc apply -f -; }\n```\n\nSet up Tempo and OpenTelemetryCollector  \n------------  \n```bash\noc new-project tracing-system\n```\nFirst, set up MiniO storage which is used by Tempo to store data (or you can use S3 storage, see Tempo documentation)\n```bash\noc apply -f ./resources/TempoOtel/minio.yaml -n tracing-system\noc wait --for condition=Available deployment/minio --timeout 150s -n tracing-system\n```\nThen, set up Tempo CR\n```bash\noc apply -f ./resources/TempoOtel/tempo.yaml -n tracing-system\noc wait --for condition=Ready TempoStack/sample --timeout 150s -n tracing-system\noc wait --for condition=Available deployment/tempo-sample-compactor --timeout 150s -n tracing-system\n```\nExpose Jaeger UI route which will be used in the Kiali CR later\n```bash\noc expose svc tempo-sample-query-frontend --port=jaeger-ui --name=tracing-ui -n tracing-system\n```\nNext, set up OpenTelemetryCollector\n```bash\noc new-project opentelemetrycollector\noc apply -f ./resources/TempoOtel/opentelemetrycollector.yaml -n opentelemetrycollector\noc wait --for condition=Available deployment/otel-collector --timeout 60s -n opentelemetrycollector\n```\n\nSet up OSSM3\n------------\n```bash\noc new-project istio-system\n```\nFirst, install Istio custom resource\n\u003e **_NOTE:_**  In this example, the `.spec.version` is missing so the istio version is automatically set by OSSM operator. You can specify the version manually, but it must be one that is supported by the operator; otherwise, a validation error will occur.\n```bash\noc apply -f ./resources/OSSM3/istiocr.yaml  -n istio-system\noc wait --for condition=Ready istio/default --timeout 60s  -n istio-system\n```\nThen, set up Telemetry resource to enable tracers defined in Istio custom resource\n```bash\noc apply -f ./resources/TempoOtel/istioTelemetry.yaml  -n istio-system\n```\nThe opentelemetrycollector namespace needs to be added as a member of the mesh\n```bash\noc label namespace opentelemetrycollector istio-injection=enabled\n```\n\u003e **_NOTE:_** `istio-injection=enabled` label works only when the name of Istio CR is `default`. If you use a different name as `default`, you need to use `istio.io/rev=\u003cistioCR_NAME\u003e` label instead of `istio-injection=enabled` in the all next steps of this example. Also, you will need to update values `config_map_name`, `istio_sidecar_injector_config_map_name`, `istiod_deployment_name`, `url_service_version` in the Kiali CR.\n\nThen, install IstioCNI\n\u003e **_NOTE:_**  In this example, the `.spec.version` is missing so the istio version is automatically set by OSSM operator. the `.spec.version` is missing so the istio version is automatically set by OSSM operator. You can specify the version manually, but it must be one that is supported by the operator.\n```bash\noc new-project istio-cni\noc apply -f ./resources/OSSM3/istioCni.yaml -n istio-cni\noc wait --for condition=Ready istiocni/default --timeout 60s -n istio-cni\n```\n\nSet up the ingress gateway via istio in a different namespace as istio-system.\nAdd that namespace as a member of the mesh.\n```bash\noc new-project istio-ingress\noc label namespace istio-ingress istio-injection=enabled\noc apply -f ./resources/OSSM3/istioIngressGateway.yaml  -n istio-ingress\noc wait --for condition=Available deployment/istio-ingressgateway --timeout 60s -n istio-ingress\n```\nExpose Istio ingress route which will be used in the bookinfo traffic generator later (and via that URL, we will be accessing to the bookinfo app)\n```bash\noc expose svc istio-ingressgateway --port=http2 --name=istio-ingressgateway -n istio-ingress\n```\nSet up the ingress gateway via Gateway API (this will live next to the previously created gateway in the same namespace)\n```bash\noc apply -k ./resources/gateway\n```\n\nSet up OCP user monitoring workflow\n------------\nFirst, OCP user monitoring needs to be enabled\n```bash\noc apply -f ./resources/Monitoring/ocpUserMonitoring.yaml\n```\nThen, create service monitor and pod monitor for istio namespaces\n```bash\noc apply -f ./resources/Monitoring/serviceMonitor.yaml -n istio-system\noc apply -f ./resources/Monitoring/podMonitor.yaml -n istio-system\noc apply -f ./resources/Monitoring/podMonitor.yaml -n istio-ingress\n```\n\nSet up Kiali\n------------\nCreate cluster role binding for kiali to be able to read ocp monitoring\n```bash\noc apply -f ./resources/Kiali/kialiCrb.yaml -n istio-system\n```\nSet up Kiali CR. The URL for Jaeger UI (which was exposed earlier) needs to be set to Kiali CR in `.spec.external_services.tracing.url`\n\u003e **_NOTE:_**  In this example, the `.spec.version` is missing so the istio version is automatically set by Kiali operator. You can specify the version manually, but it must be one that is supported by the operator; otherwise, an error will appear in events on the Kiali resource.\n```bash\nexport TRACING_INGRESS_ROUTE=\"http://$(oc get -n tracing-system route tracing-ui -o jsonpath='{.spec.host}')\"\ncat ./resources/Kiali/kialiCr.yaml | JAEGERROUTE=\"${TRACING_INGRESS_ROUTE}\" envsubst | oc -n istio-system apply -f -\noc wait --for condition=Successful kiali/kiali --timeout 150s -n istio-system \n```\nIncrease timeout for the Kiali ui route in OCP since big queries for spans can take longer\n```bash\noc annotate route kiali haproxy.router.openshift.io/timeout=60s -n istio-system\n```\nOptionally, OSSMC plugin can be installed as well\n\u003e **_NOTE:_**  In this example, the `.spec.version` is missing so the istio version is automatically set by Kiali operator. You can specify the version manually, but it must be one that is supported by the operator and the version needs to be **the same as Kiali CR**.\n```bash\noc apply -f ./resources/Kiali/kialiOssmcCr.yaml -n istio-system\noc wait -n istio-system --for=condition=Successful OSSMConsole ossmconsole --timeout 120s\n```\n\nSet up BookInfo\n------------\nCreate bookinfo namespace and add that namespace as a member of the mesh\n```bash\noc new-project bookinfo\noc label namespace bookinfo istio-injection=enabled\n```\nCreate pod monitor for bookinfo namespaces\n```bash\noc apply -f ./resources/Monitoring/podMonitor.yaml -n bookinfo\n```\n\u003e **_NOTE(shortcut):_**  It takes some time till pod monitor shows in Metrics targets, you can check it in OCP console Observe-\u003eTargets. The Kiali UI will not show the metrics till the targets are ready.\n \nInstall the Bookinfo app (the bookinfo resources are from `release-1.23` istio release branch)\n```bash\noc apply -f ./resources/Bookinfo/bookinfo.yaml -n bookinfo\noc apply -f ./resources/Bookinfo/bookinfo-gateway.yaml -n bookinfo\noc wait --for=condition=Ready pods --all -n bookinfo --timeout 60s\n```\n\nOptionally, install a traffic generator for booking app which every second generates a request to simulate traffic\n```bash\nexport INGRESSHOST=$(oc get route istio-ingressgateway -n istio-ingress -o=jsonpath='{.spec.host}')\ncat ./resources/Bookinfo/traffic-generator-configmap.yaml | ROUTE=\"http://${INGRESSHOST}/productpage\" envsubst | oc -n bookinfo apply -f - \noc apply -f ./resources/Bookinfo/traffic-generator.yaml -n bookinfo\n```\n  \nSet up sample RestAPI    \n------------  \n\nInstall the sample RestAPI `hello-service` via Kustomize\n```bash\noc apply -k ./resources/application/kustomize/overlays/pod \n```\n\nTest that everything works correctly\n------------\nNow, everything should be set.  \n\nCheck the Bookinfo app via the ingress route\n```bash\nINGRESSHOST=$(oc get route istio-ingressgateway -n istio-ingress -o=jsonpath='{.spec.host}')\necho \"http://${INGRESSHOST}/productpage\"\n```\n  \nCheck the RestAPI\n```bash\nexport GATEWAY=$(oc get gateway hello-gateway -n istio-ingress -o template --template='{{(index .status.addresses 0).value}}')\n\ncurl -s $GATEWAY/hello | jq\ncurl -s $GATEWAY/hello-service | jq\n```\n\nCheck Kiali UI\n```bash\nKIALI_HOST=$(oc get route kiali -n istio-system -o=jsonpath='{.spec.host}')\necho \"https://${KIALI_HOST}\"\n```\nYou can check all namespaces that all pods running correctly:\n```bash\noc get pods -n tracing-system\noc get pods -n opentelemetrycollector\noc get pods -n istio-system\noc get pods -n istio-cni\noc get pods -n istio-ingress\noc get pods -n bookinfo\noc get pods -n rest-api-with-mesh    \n```\nOutput (the number of istio-cni pods is equals to the number of OCP nodes):\n```bash\nNAME                                           READY   STATUS    RESTARTS   AGE\nminio-6f8c5c79-fmjpd                           1/1     Running   0          10m\ntempo-sample-compactor-dcffd76dc-7mnll         1/1     Running   0          10m\ntempo-sample-distributor-7dbbf4b5d7-xw5w5      1/1     Running   0          10m\ntempo-sample-ingester-0                        1/1     Running   0          10m\ntempo-sample-querier-7bbcc6dd9b-gtl4q          1/1     Running   0          10m\ntempo-sample-query-frontend-5885fff6bf-cklc5   2/2     Running   0          10m\n\nNAME                              READY   STATUS    RESTARTS   AGE\notel-collector-77b6b4b58d-dwk6q   1/1     Running   0          9m23s\n\nNAME                           READY   STATUS    RESTARTS   AGE\nistiod-6847b886d5-s8vz8        1/1     Running   0          9m8s\nkiali-6b7dbdf67b-cczm5         1/1     Running   0          7m56s\nossmconsole-7b64979c75-f9fbf   1/1     Running   0          7m22s\n\nNAME                   READY   STATUS    RESTARTS   AGE\nistio-cni-node-8h4mr   1/1     Running   0          8m44s\nistio-cni-node-qvmw4   1/1     Running   0          8m44s\nistio-cni-node-vpv9v   1/1     Running   0          8m44s\nistio-cni-node-wml9b   1/1     Running   0          8m44s\nistio-cni-node-x8np2   1/1     Running   0          8m44s\n\nNAME                                    READY   STATUS    RESTARTS   AGE\nhello-gateway-istio-8449867f56-zsqk5    1/1     Running   0          33m\nistio-ingressgateway-7f8878b6b4-bq64q   1/1     Running   0          32m\nistio-ingressgateway-7f8878b6b4-d7m5p   1/1     Running   0          33m\n\nNAME                             READY   STATUS    RESTARTS   AGE\ndetails-v1-65cfcf56f9-72k5p      2/2     Running   0          3m4s\nkiali-traffic-generator-cblht    2/2     Running   0          77s\nproductpage-v1-d5789fdfb-rlkhl   2/2     Running   0          3m\nratings-v1-7c9bd4b87f-5qmmp      2/2     Running   0          3m3s\nreviews-v1-6584ddcf65-mhd75      2/2     Running   0          3m2s\nreviews-v2-6f85cb9b7c-q8mc2      2/2     Running   0          3m2s\nreviews-v3-6f5b775685-ctb65      2/2     Running   0          3m1s\n\nNAME                            READY   STATUS    RESTARTS   AGE\nservice-b-v1-6c8c645587-krn87   2/2     Running   0          31m\nservice-b-v2-68f956ddc6-v62jf   2/2     Running   0          31m\nweb-front-end-9446fc49d-t8zh7   2/2     Running   0          31m\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fossm-3-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugbiteme%2Fossm-3-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fossm-3-demo/lists"}