Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker compose, and use latest version #1

Merged
merged 4 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
- name: run sanitycheck.py
run: python3 ./internal/tools/sanitycheck.py

checklicense:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
- name: install tools
run: make install-tools
- name: run checklicense
run: make checklicense
#checklicense:
# runs-on: ubuntu-latest
# steps:
# - name: check out code
# uses: actions/checkout@v3
# - name: install tools
# run: make install-tools
# - name: run checklicense
# run: make checklicense
2 changes: 2 additions & 0 deletions .github/workflows/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# Copyright observIQ
# SPDX-License-Identifier: Apache-2.0

source .env

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright observIQ
# SPDX-License-Identifier: Apache-2.0
name: Sync Fork

on:
Expand Down
188 changes: 155 additions & 33 deletions docker-compose.oiq.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0


version: '3.9'
x-default-logging: &logging
driver: "json-file"
Expand Down Expand Up @@ -70,7 +69,8 @@ services:
- OTEL_LOGS_EXPORTER=otlp
- OTEL_SERVICE_NAME=adservice
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# Cart service
Expand All @@ -91,15 +91,16 @@ services:
- "${CART_SERVICE_PORT}"
environment:
- CART_SERVICE_PORT
- FEATURE_FLAG_GRPC_SERVICE_ADDR
- REDIS_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=cartservice
- ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT}
depends_on:
- redis-cart
- otelcol
redis-cart:
condition: service_started
otelcol:
condition: service_started
logging: *logging

# Checkout service
Expand Down Expand Up @@ -173,7 +174,8 @@ services:
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# Email service
Expand All @@ -198,7 +200,8 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=emailservice
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# Feature Flag service
Expand Down Expand Up @@ -293,15 +296,24 @@ services:
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- WEB_OTEL_SERVICE_NAME=frontend-web
depends_on:
- adservice
- cartservice
- checkoutservice
- currencyservice
- otelcol
- productcatalogservice
- quoteservice
- recommendationservice
- shippingservice
adservice:
condition: service_started
cartservice:
condition: service_started
checkoutservice:
condition: service_started
currencyservice:
condition: service_started
productcatalogservice:
condition: service_started
quoteservice:
condition: service_started
recommendationservice:
condition: service_started
shippingservice:
condition: service_started
otelcol:
condition: service_started
logging: *logging

# Frontend Proxy (Envoy)
Expand Down Expand Up @@ -330,13 +342,20 @@ services:
- JAEGER_SERVICE_PORT
- JAEGER_SERVICE_HOST
- OTEL_COLLECTOR_HOST
- OTEL_COLLECTOR_PORT
- OTEL_COLLECTOR_PORT_GRPC
- OTEL_COLLECTOR_PORT_HTTP
- ENVOY_PORT
depends_on:
- frontend
- featureflagservice
- loadgenerator
- grafana
frontend:
condition: service_started
featureflagservice:
condition: service_started
loadgenerator:
condition: service_started
jaeger:
condition: service_started
grafana:
condition: service_started

# Load Generator
loadgenerator:
Expand All @@ -360,12 +379,14 @@ services:
- LOCUST_HOST
- LOCUST_HEADLESS
- LOCUST_AUTOSTART
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=loadgenerator
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
depends_on:
- frontend
frontend:
condition: service_started
logging: *logging

# Payment service
Expand All @@ -391,7 +412,8 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=paymentservice
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# Product Catalog service
Expand All @@ -418,7 +440,8 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=productcatalogservice
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# Quote service
Expand All @@ -444,7 +467,8 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=quoteservice
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# Recommendation service
Expand Down Expand Up @@ -474,9 +498,12 @@ services:
- OTEL_SERVICE_NAME=recommendationservice
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
depends_on:
- productcatalogservice
- otelcol
- featureflagservice
featureflagservice:
condition: service_started
productcatalogservice:
condition: service_started
otelcol:
condition: service_started
logging: *logging

# Shipping service
Expand All @@ -502,7 +529,8 @@ services:
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=shippingservice
depends_on:
- otelcol
otelcol:
condition: service_started
logging: *logging

# ******************
Expand Down Expand Up @@ -602,7 +630,7 @@ services:

# Grafana
grafana:
image: grafana/grafana:9.4.7
image: grafana/grafana:9.5.7
container_name: grafana
deploy:
resources:
Expand All @@ -617,7 +645,7 @@ services:

# OpenTelemetry Collector
otelcol:
image: ghcr.io/observiq/observiq-otel-collector:1.26.0
image: ghcr.io/observiq/observiq-otel-collector:1.32.0
container_name: otel-col
deploy:
resources:
Expand All @@ -638,7 +666,7 @@ services:

# Prometheus
prometheus:
image: quay.io/prometheus/prometheus:v2.43.0
image: quay.io/prometheus/prometheus:v2.46.0
container_name: prometheus
command:
- --web.console.templates=/etc/prometheus/consoles
Expand Down Expand Up @@ -711,3 +739,97 @@ services:
- recommendationservice
- shippingservice
- quoteservice

# Tracebased Tests
traceBasedTests:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-traceBasedTests
container_name: traceBasedTests
profiles:
- tests
build:
context: ./
dockerfile: ./test/tracetesting/Dockerfile
environment:
- AD_SERVICE_ADDR
- CART_SERVICE_ADDR
- CHECKOUT_SERVICE_ADDR
- CURRENCY_SERVICE_ADDR
- EMAIL_SERVICE_ADDR
- FRONTEND_ADDR
- PAYMENT_SERVICE_ADDR
- PRODUCT_CATALOG_SERVICE_ADDR
- RECOMMENDATION_SERVICE_ADDR
- SHIPPING_SERVICE_ADDR
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
tracetest-server:
condition: service_healthy
# adding demo services as dependencies
frontend:
condition: service_started
adservice:
condition: service_started
cartservice:
condition: service_started
checkoutservice:
condition: service_started
currencyservice:
condition: service_started
emailservice:
condition: service_started
paymentservice:
condition: service_started
productcatalogservice:
condition: service_started
recommendationservice:
condition: service_started
shippingservice:
condition: service_started
quoteservice:
condition: service_started

tracetest-server:
image: kubeshop/tracetest:latest
platform: linux/amd64
container_name: tracetest-server
profiles:
- tests
volumes:
- type: bind
source: ./test/tracetesting/tracetest-config.yaml
target: /app/tracetest.yaml
- type: bind
source: ./test/tracetesting/tracetest-provision.yaml
target: /app/provision.yaml
command: --provisioning-file /app/provision.yaml
ports:
- 11633:11633
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
tracetest-postgres:
condition: service_healthy
otelcol:
condition: service_started
healthcheck:
test: [ "CMD", "wget", "--spider", "localhost:11633" ]
interval: 1s
timeout: 3s
retries: 60

tracetest-postgres:
image: postgres:14
container_name: tracetest-postgres
profiles:
- tests
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
healthcheck:
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 1s
timeout: 5s
retries: 60
ports:
- 5432
3 changes: 3 additions & 0 deletions otelcol-config.oiq.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright observIQ
# SPDX-License-Identifier: Apache-2.0

receivers:
otlp:
protocols:
Expand Down
Loading