Skip to content

Commit d6efe7f

Browse files
Sozhan308puckpuckjulianocosta89
authored
[ad] rename adService to ad (#1832)
* [ad] rename adservice to ad * rename adservice to ad * chore: add line break - review findings * chore: add line break --------- Co-authored-by: Pierre Tessier <pierre@pierretessier.com> Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
1 parent 5dbe836 commit d6efe7f

30 files changed

+165
-160
lines changed

.env

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
4949
ACCOUNTING_DOCKERFILE=./src/accounting/Dockerfile
5050

5151
# Ad Service
52-
AD_SERVICE_PORT=9555
53-
AD_SERVICE_ADDR=adservice:${AD_SERVICE_PORT}
54-
AD_SERVICE_DOCKERFILE=./src/adservice/Dockerfile
52+
AD_PORT=9555
53+
AD_ADDR=ad:${AD_PORT}
54+
AD_DOCKERFILE=./src/ad/Dockerfile
5555

5656
# Cart Service
5757
CART_SERVICE_PORT=7070

.github/component_owners.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33
# this file is used by .github/workflows/assign-reviewers.yml
44
components:
5-
src/adservice:
5+
src/ad:
66
- jack-berg
77
- mateuszrzeszutek
88
- trask

.github/workflows/component-build-images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
tag_suffix: accounting
5656
context: ./
5757
setup-qemu: true
58-
- file: ./src/adservice/Dockerfile
59-
tag_suffix: adservice
58+
- file: ./src/ad/Dockerfile
59+
tag_suffix: ad
6060
context: ./
6161
setup-qemu: true
6262
- file: ./src/cartservice/src/Dockerfile

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ the release.
3838
([#1838](https://github.com/open-telemetry/opentelemetry-demo/pull/1838))
3939
* [otel-collector] rename otelcol to otel-collector
4040
([#1841](https://github.com/open-telemetry/opentelemetry-demo/pull/1841))
41+
* [ad] rename adservice to ad
42+
([#1827](https://github.com/open-telemetry/opentelemetry-demo/pull/1832))
4143

4244
## 1.12.0
4345

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ cd opentelemetry-demo/
7373
- Navigate to the Java Ad Service folder to install and update Gradle:
7474

7575
```shell
76-
cd .\src\adservice\
76+
cd .\src\ad\
7777
.\gradlew installDist
7878
.\gradlew wrapper --gradle-version 7.4.2
7979
```

docker-compose-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ services:
3737
args:
3838
TRACETEST_IMAGE_VERSION: ${TRACETEST_IMAGE_VERSION}
3939
environment:
40-
- AD_SERVICE_ADDR
40+
- AD_ADDR
4141
- CART_SERVICE_ADDR
4242
- CHECKOUT_SERVICE_ADDR
4343
- CURRENCY_SERVICE_ADDR
@@ -59,7 +59,7 @@ services:
5959
# adding demo services as dependencies
6060
accounting:
6161
condition: service_started
62-
adservice:
62+
ad:
6363
condition: service_started
6464
cartservice:
6565
condition: service_started

docker-compose.minimal.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ services:
1919
# ******************
2020

2121
# AdService
22-
adservice:
23-
image: ${IMAGE_NAME}:${DEMO_VERSION}-adservice
24-
container_name: ad-service
22+
ad:
23+
image: ${IMAGE_NAME}:${DEMO_VERSION}-ad
24+
container_name: ad
2525
build:
2626
context: ./
27-
dockerfile: ${AD_SERVICE_DOCKERFILE}
27+
dockerfile: ${AD_DOCKERFILE}
2828
cache_from:
29-
- ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
29+
- ${IMAGE_NAME}:${IMAGE_VERSION}-ad
3030
args:
3131
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
3232
deploy:
@@ -35,15 +35,15 @@ services:
3535
memory: 300M
3636
restart: unless-stopped
3737
ports:
38-
- "${AD_SERVICE_PORT}"
38+
- "${AD_PORT}"
3939
environment:
40-
- AD_SERVICE_PORT
40+
- AD_PORT
4141
- FLAGD_HOST
4242
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
4343
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
4444
- OTEL_RESOURCE_ATTRIBUTES
4545
- OTEL_LOGS_EXPORTER=otlp
46-
- OTEL_SERVICE_NAME=adservice
46+
- OTEL_SERVICE_NAME=ad
4747
depends_on:
4848
otel-collector:
4949
condition: service_started
@@ -199,7 +199,7 @@ services:
199199
environment:
200200
- PORT=${FRONTEND_PORT}
201201
- FRONTEND_ADDR
202-
- AD_SERVICE_ADDR
202+
- AD_ADDR
203203
- CART_SERVICE_ADDR
204204
- CHECKOUT_SERVICE_ADDR
205205
- CURRENCY_SERVICE_ADDR
@@ -217,7 +217,7 @@ services:
217217
- FLAGD_HOST
218218
- FLAGD_PORT
219219
depends_on:
220-
adservice:
220+
ad:
221221
condition: service_started
222222
cartservice:
223223
condition: service_started

docker-compose.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ services:
4545
logging: *logging
4646

4747
# AdService
48-
adservice:
49-
image: ${IMAGE_NAME}:${DEMO_VERSION}-adservice
50-
container_name: ad-service
48+
ad:
49+
image: ${IMAGE_NAME}:${DEMO_VERSION}-ad
50+
container_name: ad
5151
build:
5252
context: ./
53-
dockerfile: ${AD_SERVICE_DOCKERFILE}
53+
dockerfile: ${AD_DOCKERFILE}
5454
cache_from:
55-
- ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
55+
- ${IMAGE_NAME}:${IMAGE_VERSION}-ad
5656
args:
5757
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
5858
deploy:
@@ -61,16 +61,16 @@ services:
6161
memory: 300M
6262
restart: unless-stopped
6363
ports:
64-
- "${AD_SERVICE_PORT}"
64+
- "${AD_PORT}"
6565
environment:
66-
- AD_SERVICE_PORT
66+
- AD_PORT
6767
- FLAGD_HOST
6868
- FLAGD_PORT
6969
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
7070
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
7171
- OTEL_RESOURCE_ATTRIBUTES
7272
- OTEL_LOGS_EXPORTER=otlp
73-
- OTEL_SERVICE_NAME=adservice
73+
- OTEL_SERVICE_NAME=ad
7474
depends_on:
7575
otel-collector:
7676
condition: service_started
@@ -271,7 +271,7 @@ services:
271271
environment:
272272
- PORT=${FRONTEND_PORT}
273273
- FRONTEND_ADDR
274-
- AD_SERVICE_ADDR
274+
- AD_ADDR
275275
- CART_SERVICE_ADDR
276276
- CHECKOUT_SERVICE_ADDR
277277
- CURRENCY_SERVICE_ADDR
@@ -289,7 +289,7 @@ services:
289289
- FLAGD_HOST
290290
- FLAGD_PORT
291291
depends_on:
292-
adservice:
292+
ad:
293293
condition: service_started
294294
cartservice:
295295
condition: service_started

docker-gen-proto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ gen_proto_python() {
2222
}
2323

2424
#gen_proto_dotnet accounting
25-
#gen_proto_java adservice
25+
#gen_proto_java ad
2626
#gen_proto_dotnet cartservice
2727
gen_proto_go checkoutservice
2828
#gen_proto_cpp currencyservice

ide-gen-proto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ gen_proto_ts() {
6666
}
6767

6868
gen_proto_dotnet accounting
69-
# gen_proto_java adservice
69+
# gen_proto_java ad
7070
gen_proto_dotnet cartservice
7171
gen_proto_go checkoutservice
7272
# gen_proto_cpp currencyservice

renovate.json5

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"groupName": "accounting",
2020
},
2121
{
22-
"matchFileNames": ["src/adservice/**"],
23-
"groupName": "adservice",
22+
"matchFileNames": ["src/ad/**"],
23+
"groupName": "ad",
2424
},
2525
{
2626
"matchFileNames": ["src/cartservice/**"],
File renamed without changes.

src/adservice/Dockerfile src/ad/Dockerfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ FROM --platform=${BUILDPLATFORM} eclipse-temurin:21-jdk AS builder
66

77
WORKDIR /usr/src/app/
88

9-
COPY ./src/adservice/gradlew* ./src/adservice/settings.gradle* ./src/adservice/build.gradle ./
10-
COPY ./src/adservice/gradle ./gradle
9+
COPY ./src/ad/gradlew* ./src/ad/settings.gradle* ./src/ad/build.gradle ./
10+
COPY ./src/ad/gradle ./gradle
1111

12+
RUN chmod +x ./gradlew
1213
RUN ./gradlew
1314
RUN ./gradlew downloadRepos
1415

15-
COPY ./src/adservice/ ./
16+
COPY ./src/ad/ ./
1617
COPY ./pb/ ./proto
18+
RUN chmod +x ./gradlew
1719
RUN ./gradlew installDist -PprotoSourceDir=./proto
1820

1921
# -----------------------------------------------------------------------------
@@ -27,5 +29,5 @@ COPY --from=builder /usr/src/app/ ./
2729
ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$OTEL_JAVA_AGENT_VERSION/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar
2830
ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar
2931

30-
EXPOSE ${AD_SERVICE_PORT}
31-
ENTRYPOINT [ "./build/install/opentelemetry-demo-ad-service/bin/AdService" ]
32+
EXPOSE ${AD_PORT}
33+
ENTRYPOINT [ "./build/install/opentelemetry-demo-ad-service/bin/Ad" ]

src/adservice/README.md src/ad/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ To build Ad Service, run:
1414
```
1515

1616
It will create an executable script
17-
`src/adservice/build/install/oteldemo/bin/AdService`.
17+
`src/ad/build/install/oteldemo/bin/Ad`.
1818

1919
To run the Ad Service:
2020

2121
```sh
22-
export AD_SERVICE_PORT=8080
22+
export AD_PORT=8080
2323
export FEATURE_FLAG_GRPC_SERVICE_ADDR=featureflagservice:50053
24-
./build/install/opentelemetry-demo-ad-service/bin/AdService
24+
./build/install/opentelemetry-demo-ad-service/bin/Ad
2525
```
2626

2727
### Upgrading Gradle
@@ -37,5 +37,5 @@ If you need to upgrade the version of gradle then run
3737
From the root of `opentelemetry-demo`, run:
3838

3939
```sh
40-
docker build --file ./src/adservice/Dockerfile ./
40+
docker build --file ./src/ad/Dockerfile ./
4141
```

src/adservice/build.gradle src/ad/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repositories {
1313
}
1414

1515
description = 'Ad Service'
16-
group = "adservice"
16+
group = "ad"
1717
version = "0.1.0-SNAPSHOT"
1818

1919
def opentelemetryVersion = "1.40.0"
@@ -129,14 +129,14 @@ task downloadRepos(type: Copy) {
129129
into offlineCompile
130130
}
131131

132-
task adService(type: CreateStartScripts) {
132+
task ad(type: CreateStartScripts) {
133133
mainClass.set('oteldemo.AdService')
134-
applicationName = 'AdService'
134+
applicationName = 'Ad'
135135
outputDir = new File(project.buildDir, 'tmp')
136136
classpath = startScripts.classpath
137137
}
138138

139139
applicationDistribution.into('bin') {
140-
from(adService)
140+
from(ad)
141141
fileMode = 0755
142142
}
File renamed without changes.

0 commit comments

Comments
 (0)