{"id":20381554,"url":"https://github.com/snowdrop/istio-distributed-tracing-example","last_synced_at":"2025-04-12T08:53:35.232Z","repository":{"id":45400126,"uuid":"126332103","full_name":"snowdrop/istio-distributed-tracing-example","owner":"snowdrop","description":"A booster demonstrating Istio Distributed Tracing functionality","archived":false,"fork":false,"pushed_at":"2025-01-13T11:04:48.000Z","size":1767,"stargazers_count":7,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"sb-2.7.x","last_synced_at":"2025-04-12T08:53:31.470Z","etag":null,"topics":["booster","distributed-tracing","example","istio","jaegertracing","kubernetes","openshift","opentracing","rhoar","spring-boot"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/snowdrop.png","metadata":{"files":{"readme":"README.adoc","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":"2018-03-22T12:30:07.000Z","updated_at":"2025-01-13T11:04:52.000Z","dependencies_parsed_at":"2023-02-13T22:16:34.873Z","dependency_job_id":"8ef42905-453d-4fa9-bfc8-ac84eeca6de9","html_url":"https://github.com/snowdrop/istio-distributed-tracing-example","commit_stats":null,"previous_names":[],"tags_count":236,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-distributed-tracing-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-distributed-tracing-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-distributed-tracing-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-distributed-tracing-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowdrop","download_url":"https://codeload.github.com/snowdrop/istio-distributed-tracing-example/tar.gz/refs/heads/sb-2.7.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543882,"owners_count":21121838,"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":["booster","distributed-tracing","example","istio","jaegertracing","kubernetes","openshift","opentracing","rhoar","spring-boot"],"created_at":"2024-11-15T02:14:17.120Z","updated_at":"2025-04-12T08:53:35.216Z","avatar_url":"https://github.com/snowdrop.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Istio Distributed Tracing Mission\n:icons: font\n:toc: left\n:toclevels: 2\n\n== Purpose\nShowcase Istio's Distributed Tracing via a (minimally) instrumented set of Spring Boot applications\n\n== Prerequisites\n. JDK 11+ installed with JAVA_HOME configured appropriately\n. Openshift 4.12 cluster\n. Istio installed on the aforementioned cluster using the link:https://docs.openshift.com/container-platform/4.12/service_mesh/v2x/installing-ossm.html[Red Hat OpenShift Service Mesh Operator].\n. Login to the cluster with the *admin* user\n\n[#environment-preparation]\n== Environment preparation\n\nCreate a new project/namespace on the cluster. This is where your application will be deployed.\n\n```bash\noc new-project \u003cwhatever valid project name you want\u003e\n```\n\nAdd the `\u003cwhatever valid project name you want\u003e` project to the Istio member roll. More information in this link:https://docs.openshift.com/container-platform/4.12/service_mesh/v2x/ossm-create-mesh.html#ossm-about-adding-namespace_ossm-create-mesh[link].\n\n== Build and deploy the application\n\n=== With Dekorate:\nExecute the following command to build the project and deploy it to OpenShift:\n```bash\nmvn clean verify -Popenshift -Ddekorate.deploy=true\n```\n\nThis configuration is used to define service names and deployments that control how pods are labeled/versioned on the OpenShift cluster. Labels and versions are key concepts for creating load-balanced or multi-versioned pods in a service.\n\n== Use Cases\n\n=== Access the application via the Istio ingress-gateway\n. Create a RouteRule to forward traffic from istio-ingress to the demo application\n+\n```bash\noc create -f rules/greeting-gateway.yml\n```\n. Access the application\n+\nRun the following command to determine the appropriate URL to access our demo. Make sure you access the url with the HTTP scheme. HTTPS is NOT enabled by default:\n+\n```bash\necho http://$(oc get route istio-ingressgateway -o jsonpath='{.spec.host}{\"\\n\"}' -n istio-system)/greeting/\n```\n+\nThe result of the above command is the istio-system istio-ingress URL, appended with the RouteRule path. Open this URL in your a web browser.\n. Follow the instructions in the application UI\n\n=== View application traces\n. Access the Jaeger tracing dashboard\n+\nThe traces from the invocation of the two endpoints should look like the following:\n+\nimage::spring-boot-istio-distributed-tracing-greeting-service/src/main/resources/static/traces.jpg[]\n+\nNote that it could take a few seconds for all the spans to be collected and presented in a trace that matches the picture above\n\n\n=== Undeploy the application\n\n==== Remove the namespace\nThis will delete the project from the OpenShift cluster\n```bash\noc delete project \u003cyour project name\u003e\n```\n\n== Integration tests\n\nTo run integration tests, first follow the steps on the \u003c\u003cenvironment-preparation\u003e\u003e section to create and prepare a new namespace.\n\n=== Remove Jaeger UI security\n\n[CAUTION]\n====\nFor the integration tests to work it is required that the Jaeger UI isn't secured by authentication, as it is in the default configuration.\n====\n\n[WARNING]\n=====\nDisabling security isn't the suggested configuration but it is required for the integration tests to work.\n=====\n\nBy default, when installing the Red Hat OpenShift distributed tracing platform operator, it will install a Jaeger instance with the security enabled:\n\n.Secured Jaeger UI configuration\n[source,yaml]\n----\n  ingress:\n    enabled: true\n    openshift:\n      htpasswdFile: /etc/proxy/htpasswd/auth\n      sar: '{\"namespace\": \"istio-system\", \"resource\": \"pods\", \"verb\": \"get\"}'\n    options: {}\n    resources: {}\n    security: oauth-proxy\n----\n\nDisabling security is accomplished by setting the `spec.ingress.security` on the Jaeger operator to `none`.\n\nThis can be done either by using the OpenShift console (`Installed operators \u003e Red Hat OpenShift distributed tracing platform \u003e Jaguer \u003e Edit Jaeger`) or using the CLI.\n\n[NOTE]\n====\nMore information on the Jaeger configuration at the link:https://docs.openshift.com/container-platform/4.12/service_mesh/v2x/ossm-reference-jaeger.html[Jaeger configuration reference page].\n====\n\nTo disable security execute the following CLI commands.\n\n.Set the `istio-system` as the default project\n[source,bash]\n----\noc project istio-system\n----\n\n.Patch jaeger to disable console security\n[source,bash]\n----\noc patch jaeger jaeger --patch '{\"spec\":{\"ingress\":{\"security\": \"none\" }}}' --type=merge\n----\n\nThe result should be:\n\n[source]\n----\njaeger.jaegertracing.io/jaeger patched\n----\n\nWhich will result in the following configuration.\n\n.Unsecured Jaeger UI configuration\n[source,yaml]\n----\n  ingress:\n    enabled: true\n    options: {}\n    resources: {}\n    security: none\n----\n\n=== Execute the Integration Tests\n\nAfter everything is set up, move back to the project where this example will be installed.\n\n[source,bash]\n----\noc project \u003cwhatever valid project name you want\u003e\n----\n\nThen run the following commands.\n\n.Commands to execute the integration tests\n[source,bash]\n----\nmvn clean verify -pl spring-boot-istio-distributed-tracing-cute-name-service -Popenshift -Ddekorate.deploy=true\nmvn clean verify -pl spring-boot-istio-distributed-tracing-greeting-service -Popenshift -Ddekorate.deploy=true\noc create -f rules/greeting-gateway.yml\nmvn clean verify -pl tests -Popenshift-it\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdrop%2Fistio-distributed-tracing-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowdrop%2Fistio-distributed-tracing-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdrop%2Fistio-distributed-tracing-example/lists"}