Skip to content

Commit

Permalink
drop _SERVICE suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
puckpuck committed Jan 10, 2025
1 parent 93991f5 commit 7708a05
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 80 deletions.
25 changes: 1 addition & 24 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,12 @@ src/*/*/Dockerfile
./src/currency/node_modules/
###################################

###################################
# featureflagservice
# Common development/test artifacts
./src/featureflagservice/cover/
./src/featureflagservice/doc/
./src/featureflagservice/test/
./src/featureflagservice/tmp/
./src/featureflagservice/.elixir_ls

###################################
# frontend
./src/frontend/node_modules/

###################################
# shippingservice
# shipping
./src/shipping/target
###################################

# Mix artifacts
./src/featureflagservice/_build/
./src/featureflagservice/deps/
./src/featureflagservice/*.ez

# Generated on crash by the VM
./src/featureflagservice/erl_crash.dump

# Static artifacts - These should be fetched and built inside the Docker image
./src/featureflagservice/assets/node_modules/
./src/featureflagservice/priv/static/assets/
./src/featureflagservice/priv/static/cache_manifest.json
###################################

20 changes: 10 additions & 10 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ FLAGD_UI_PORT=4000
FLAGD_UI_DOCKERFILE=./src/flagd-ui/Dockerfile

# Kafka
KAFKA_SERVICE_PORT=9092
KAFKA_SERVICE_ADDR=kafka:${KAFKA_SERVICE_PORT}
KAFKA_SERVICE_DOCKERFILE=./src/kafka/Dockerfile
KAFKA_PORT=9092
KAFKA_ADDR=kafka:${KAFKA_PORT}
KAFKA_DOCKERFILE=./src/kafka/Dockerfile

# Valkey
VALKEY_PORT=6379
Expand All @@ -151,14 +151,14 @@ VALKEY_ADDR=valkey-cart:${VALKEY_PORT}
# Telemetry Components
# ********************
# Grafana
GRAFANA_SERVICE_PORT=3000
GRAFANA_SERVICE_HOST=grafana
GRAFANA_PORT=3000
GRAFANA_HOST=grafana

# Jaeger
JAEGER_SERVICE_PORT=16686
JAEGER_SERVICE_HOST=jaeger
JAEGER_PORT=16686
JAEGER_HOST=jaeger

# Prometheus
PROMETHEUS_SERVICE_PORT=9090
PROMETHEUS_SERVICE_HOST=prometheus
PROMETHEUS_ADDR=${PROMETHEUS_SERVICE_HOST}:${PROMETHEUS_SERVICE_PORT}
PROMETHEUS_PORT=9090
PROMETHEUS_HOST=prometheus
PROMETHEUS_ADDR=${PROMETHEUS_HOST}:${PROMETHEUS_PORT}
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ test/tracetesting/tracetesting-vars.yaml
# Ignore copied/generated protobuf files
/src/accounting/src/protos/
/src/cart/src/protos/
/src/featureflagservice/proto/
/src/featureflagservice/src/ffs_demo_pb.erl
/src/featureflagservice/src/ffs_service_*.erl
/src/featureflagservice/src/oteldemo_*.erl
/src/fraud-detection/src/main/proto
/src/frontend/pb/
/src/frontend/protos/
Expand Down
2 changes: 0 additions & 2 deletions .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
"src/cart/tests/obj/",
"src/currency/build/",
"src/checkout/genproto/",
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
"src/product-catalog/genproto/",
"src/react-native-app/ios/Pods/",
"src/react-native-app/ios/build/",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- PRODUCT_CATALOG_ADDR
- RECOMMENDATION_ADDR
- SHIPPING_ADDR
- KAFKA_SERVICE_ADDR
- KAFKA_ADDR
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ services:
- FRONTEND_HOST
- LOCUST_WEB_HOST
- LOCUST_WEB_PORT
- GRAFANA_SERVICE_PORT
- GRAFANA_SERVICE_HOST
- JAEGER_SERVICE_PORT
- JAEGER_SERVICE_HOST
- GRAFANA_PORT
- GRAFANA_HOST
- JAEGER_PORT
- JAEGER_HOST
- OTEL_COLLECTOR_HOST
- IMAGE_PROVIDER_HOST
- IMAGE_PROVIDER_PORT
Expand Down Expand Up @@ -556,7 +556,7 @@ services:
memory: 400M
restart: unless-stopped
ports:
- "${JAEGER_SERVICE_PORT}" # Jaeger UI
- "${JAEGER_PORT}" # Jaeger UI
- "${OTEL_COLLECTOR_PORT_GRPC}"
environment:
- METRICS_STORAGE_TYPE=prometheus
Expand All @@ -577,7 +577,7 @@ services:
- ./src/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./src/grafana/provisioning/:/etc/grafana/provisioning/
ports:
- "${GRAFANA_SERVICE_PORT}"
- "${GRAFANA_PORT}"
logging: *logging

# OpenTelemetry Collector
Expand Down Expand Up @@ -634,7 +634,7 @@ services:
memory: 300M
restart: unless-stopped
ports:
- "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"
- "${PROMETHEUS_PORT}:${PROMETHEUS_PORT}"
logging: *logging

# OpenSearch
Expand Down
22 changes: 11 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
memory: 120M
restart: unless-stopped
environment:
- KAFKA_SERVICE_ADDR
- KAFKA_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
Expand Down Expand Up @@ -138,7 +138,7 @@ services:
- PAYMENT_ADDR
- PRODUCT_CATALOG_ADDR
- SHIPPING_ADDR
- KAFKA_SERVICE_ADDR
- KAFKA_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
Expand Down Expand Up @@ -238,7 +238,7 @@ services:
environment:
- FLAGD_HOST
- FLAGD_PORT
- KAFKA_SERVICE_ADDR
- KAFKA_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_INSTRUMENTATION_KAFKA_EXPERIMENTAL_SPAN_ATTRIBUTES=true
Expand Down Expand Up @@ -333,10 +333,10 @@ services:
- FRONTEND_HOST
- LOCUST_WEB_HOST
- LOCUST_WEB_PORT
- GRAFANA_SERVICE_PORT
- GRAFANA_SERVICE_HOST
- JAEGER_SERVICE_PORT
- JAEGER_SERVICE_HOST
- GRAFANA_PORT
- GRAFANA_HOST
- JAEGER_PORT
- JAEGER_HOST
- OTEL_COLLECTOR_HOST
- IMAGE_PROVIDER_HOST
- IMAGE_PROVIDER_PORT
Expand Down Expand Up @@ -641,7 +641,7 @@ services:
container_name: kafka
build:
context: ./
dockerfile: ${KAFKA_SERVICE_DOCKERFILE}
dockerfile: ${KAFKA_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-kafka
args:
Expand Down Expand Up @@ -700,7 +700,7 @@ services:
memory: 1200M
restart: unless-stopped
ports:
- "${JAEGER_SERVICE_PORT}" # Jaeger UI
- "${JAEGER_PORT}" # Jaeger UI
- "${OTEL_COLLECTOR_PORT_GRPC}"
environment:
- METRICS_STORAGE_TYPE=prometheus
Expand All @@ -721,7 +721,7 @@ services:
- ./src/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./src/grafana/provisioning/:/etc/grafana/provisioning/
ports:
- "${GRAFANA_SERVICE_PORT}"
- "${GRAFANA_PORT}"
logging: *logging

# OpenTelemetry Collector
Expand Down Expand Up @@ -778,7 +778,7 @@ services:
memory: 300M
restart: unless-stopped
ports:
- "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"
- "${PROMETHEUS_PORT}:${PROMETHEUS_PORT}"
logging: *logging

# OpenSearch
Expand Down
4 changes: 2 additions & 2 deletions src/accounting/Consumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public Consumer(ILogger<Consumer> logger)
{
_logger = logger;

var servers = Environment.GetEnvironmentVariable("KAFKA_SERVICE_ADDR")
?? throw new ArgumentNullException("KAFKA_SERVICE_ADDR");
var servers = Environment.GetEnvironmentVariable("KAFKA_ADDR")
?? throw new ArgumentNullException("KAFKA_ADDR");

_consumer = BuildConsumer(servers);
_consumer.Subscribe(TopicName);
Expand Down
2 changes: 1 addition & 1 deletion src/checkout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func main() {
svc.paymentSvcClient = pb.NewPaymentServiceClient(c)
defer c.Close()

svc.kafkaBrokerSvcAddr = os.Getenv("KAFKA_SERVICE_ADDR")
svc.kafkaBrokerSvcAddr = os.Getenv("KAFKA_ADDR")

if svc.kafkaBrokerSvcAddr != "" {
svc.KafkaProducerClient, err = kafka.CreateKafkaProducer([]string{svc.kafkaBrokerSvcAddr}, log)
Expand Down
4 changes: 2 additions & 2 deletions src/fraud-detection/src/main/kotlin/frauddetection/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ fun main() {
props[KEY_DESERIALIZER_CLASS_CONFIG] = StringDeserializer::class.java.name
props[VALUE_DESERIALIZER_CLASS_CONFIG] = ByteArrayDeserializer::class.java.name
props[GROUP_ID_CONFIG] = groupID
val bootstrapServers = System.getenv("KAFKA_SERVICE_ADDR")
val bootstrapServers = System.getenv("KAFKA_ADDR")
if (bootstrapServers == null) {
println("KAFKA_SERVICE_ADDR is not supplied")
println("KAFKA_ADDR is not supplied")
exitProcess(1)
}
props[BOOTSTRAP_SERVERS_CONFIG] = bootstrapServers
Expand Down
8 changes: 4 additions & 4 deletions src/frontendproxy/envoy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ static_resources:
- endpoint:
address:
socket_address:
address: ${GRAFANA_SERVICE_HOST}
port_value: ${GRAFANA_SERVICE_PORT}
address: ${GRAFANA_HOST}
port_value: ${GRAFANA_PORT}
- name: jaeger
type: STRICT_DNS
lb_policy: ROUND_ROBIN
Expand All @@ -270,8 +270,8 @@ static_resources:
- endpoint:
address:
socket_address:
address: ${JAEGER_SERVICE_HOST}
port_value: ${JAEGER_SERVICE_PORT}
address: ${JAEGER_HOST}
port_value: ${JAEGER_PORT}
admin:
address:
socket_address:
Expand Down
26 changes: 14 additions & 12 deletions src/quote/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@
"php": ">= 8.3",
"ext-json": "*",
"ext-pcntl": "*",
"monolog/monolog": "3.8.1",
"monolog/monolog": "3.5.0",
"open-telemetry/api": "1.0.3",
"open-telemetry/sdk": "1.2.0",
"open-telemetry/exporter-otlp": "1.2.0",
"open-telemetry/opentelemetry-auto-slim": "1.0.7",
"open-telemetry/sdk": "1.0.8",
"open-telemetry/sdk-configuration": "0.0.6",
"open-telemetry/exporter-otlp": "1.0.4",
"open-telemetry/opentelemetry-auto-slim": "1.0.6",
"open-telemetry/detector-container": "1.0.0",
"open-telemetry/opentelemetry-logger-monolog": "1.0.0",
"guzzlehttp/guzzle": "7.9.2",
"php-di/php-di": "7.0.7",
"php-di/slim-bridge": "3.4.1",
"php-http/guzzle7-adapter": "1.1.0",
"react/http": "v1.11.0",
"slim/psr7": "1.7.0",
"slim/slim": "4.14.0"
"guzzlehttp/guzzle": "7.8.1",
"php-di/php-di": "7.0.6",
"php-di/slim-bridge": "3.4.0",
"php-http/guzzle7-adapter": "1.0.0",
"react/http": "v1.9.0",
"slim/psr7": "1.6.1",
"slim/slim": "4.12.0"
},
"autoload": {
"psr-4": {
Expand All @@ -28,7 +29,8 @@
},
"config": {
"allow-plugins": {
"php-http/discovery": false
"php-http/discovery": false,
"tbachert/spi": false
}
}
}

0 comments on commit 7708a05

Please sign in to comment.