summaryrefslogtreecommitdiff
path: root/src/ad/README.md
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
committerSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
commit82e03978b89938219958032efb1448cc76baa181 (patch)
tree626f3e54d52ecd49be0ed3bee30abacc0453d081 /src/ad/README.md
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'src/ad/README.md')
-rw-r--r--src/ad/README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ad/README.md b/src/ad/README.md
new file mode 100644
index 0000000..f19b735
--- /dev/null
+++ b/src/ad/README.md
@@ -0,0 +1,41 @@
+# Ad Service
+
+The Ad service provides advertisement based on context keys. If no context keys
+are provided then it returns random ads.
+
+## Building Locally
+
+The Ad service requires at least JDK 17 to build and uses gradlew to
+compile/install/distribute. Gradle wrapper is already part of the source code.
+To build Ad Service, run:
+
+```sh
+./gradlew installDist
+```
+
+It will create an executable script
+`src/ad/build/install/oteldemo/bin/Ad`.
+
+To run the Ad Service:
+
+```sh
+export AD_PORT=8080
+export FEATURE_FLAG_GRPC_SERVICE_ADDR=featureflagservice:50053
+./build/install/opentelemetry-demo-ad/bin/Ad
+```
+
+### Upgrading Gradle
+
+If you need to upgrade the version of gradle then run
+
+```sh
+./gradlew wrapper --gradle-version <new-version>
+```
+
+## Building Docker
+
+From the root of `opentelemetry-demo`, run:
+
+```sh
+docker build --file ./src/ad/Dockerfile ./
+```