summaryrefslogtreecommitdiff
path: root/src/ad/README.md
diff options
context:
space:
mode:
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 ./
+```