diff --git a/README.md b/README.md index e3b338c414..55fe529688 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![Commits](https://img.shields.io/github/commits-since/open-telemetry/opentelemetry-demo/latest?color=ff69b4&include_prereleases)](https://github.com/open-telemetry/opentelemetry-demo/graphs/commit-activity) [![Downloads](https://img.shields.io/docker/pulls/otel/demo)](https://hub.docker.com/r/otel/demo) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=red)](https://github.com/open-telemetry/opentelemetry-demo/blob/main/LICENSE) +[![Integration Tests](https://github.com/open-telemetry/opentelemetry-demo/actions/workflows/run-integration-tests.yml/badge.svg)](https://github.com/open-telemetry/opentelemetry-demo/actions/workflows/run-integration-tests.yml) ## Welcome to the OpenTelemetry Astronomy Shop Demo @@ -33,6 +34,10 @@ guidance](./CONTRIBUTING.md). If you'd like to extend this demo or maintain a fork of it, read our [fork guidance](https://opentelemetry.io/docs/demo/forking/). +## Splunk customizations + +A number of customizations have been made to use the demo application with Splunk Observability Cloud, which can be found in the [/splunk](./splunk) folder. See [this document](./splunk/README.md) for details. + ## Quick start You can be up and running with the demo in a few minutes. Check out the docs for diff --git a/splunk/README.md b/splunk/README.md index b5efc694d2..ba23ce0b7f 100644 --- a/splunk/README.md +++ b/splunk/README.md @@ -6,14 +6,13 @@ This repository contains a fork of the OpenTelemetry Astronomy Shop, a microserv distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment. It includes customizations for use with Splunk Observability Cloud. - ## Update Docker and Kubernetes Scripts After synchronizing changes with the upstream repository, the following command can be used to update the Splunk versions of the docker-compose.yml and kubernetes/opentelemetry-demo.yaml files, which are optimized for use with Splunk Observability Cloud: -```` +```bash ./update-demos.sh -```` +``` ## Quick start diff --git a/splunk/update-demos.sh b/splunk/update-demos.sh index 26edff237e..0d0ae3bd0d 100755 --- a/splunk/update-demos.sh +++ b/splunk/update-demos.sh @@ -14,6 +14,26 @@ set -euo pipefail # Set default paths if environment variables are not set SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) +function update_root_readme { + ROOT_README_PATH=${ROOT_README_PATH:-"$SCRIPT_DIR/../README.md"} + + # Download the latest README file from upstream + curl -L https://raw.githubusercontent.com/open-telemetry/opentelemetry-demo/main/README.md \ + > "$ROOT_README_PATH" + + # add a section to the root README file with a pointer to Splunk customizations + SEARCH_VAL="## Quick start" + REPLACE_VAL='## Splunk customizations \ +\ +A number of customizations have been made to use the demo application with Splunk Observability Cloud, which can be found in the \[\/splunk\](\.\/splunk) folder. See \[this document\](\.\/splunk\/README.md) for details. \ +\ +## Quick start' + + sed -i '' "s/${SEARCH_VAL}/${REPLACE_VAL}/g" "$ROOT_README_PATH" + + echo "Completed updating the root README.md file for the OpenTelemetry demo app!" +} + function update_otel_demo_docker { DOCKER_COMPOSE_PATH=${DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../docker-compose.yml"} SPLUNK_DOCKER_COMPOSE_PATH=${SPLUNK_DOCKER_COMPOSE_PATH:-"$SCRIPT_DIR/../splunk/docker-compose.yml"} @@ -104,5 +124,6 @@ function update_otel_demo_k8s { } # ---- OpenTelemetry Demo Update ---- +update_root_readme update_otel_demo_docker update_otel_demo_k8s