Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into git-fu
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/otelcollector/otelcol-config-extras.yml
  • Loading branch information
puckpuck committed Oct 26, 2023
2 parents 7500c66 + 3a00b49 commit 8517287
Show file tree
Hide file tree
Showing 37 changed files with 4,522 additions and 2,372 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
type: boolean
version:
description: The version used when tagging the image
default: dev
default: 'dev'
required: false
type: string

Expand Down Expand Up @@ -101,23 +101,22 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check for file changes
- name: Check for changes and set push options
id: check_changes
if: ${{ !inputs.push }}
run: |
DOCKERFILE_DIR=$(dirname ${{ matrix.file_tag.file }})
FILES_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- $DOCKERFILE_DIR)
if [ -z "$FILES_CHANGED" ]; then
FORCE_PUSH=${{ inputs.push }}
if [ "$FORCE_PUSH" = true ]; then
echo "Force push is enabled, proceeding with build."
echo "skip='false'" >> "$GITHUB_OUTPUT"
elif [ -z "$FILES_CHANGED" ]; then
echo "No changes in ${{ matrix.file_tag.context }}, skipping build."
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "skip='true'" >> "$GITHUB_OUTPUT"
else
echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build."
echo "skip=false" >> "$GITHUB_OUTPUT"
echo "skip='false'" >> "$GITHUB_OUTPUT"
fi
- name: Override skip for push
if: ${{ inputs.push }}
run: echo "skip=false" >> "$GITHUB_OUTPUT"
id: override_skip
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
Expand All @@ -142,7 +141,7 @@ jobs:
[worker.oci]
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false' || steps.override_skip.outputs.skip == 'false'
if: steps.check_changes.outputs.skip == 'false'
uses: docker/[email protected]
with:
context: ${{ matrix.file_tag.context }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: ./.github/workflows/build-images.yml
with:
push: false
version: dev
version: 'dev'

markdownlint:
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ release.
([#1120](https://github.com/open-telemetry/opentelemetry-demo/pull/1120))
* sluggify Grafana dashboard name
([#1121](https://github.com/open-telemetry/opentelemetry-demo/pull/1121))
* [kafka frauddetection adservice] update java agent versions
([#1132](https://github.com/open-telemetry/opentelemetry-demo/pull/1132))
* update dependent components to latest versions
([#1146](https://github.com/open-telemetry/opentelemetry-demo/pull/1146))
* [prometheus] Enabled support for the OTLP write receiver
([#1149](https://github.com/open-telemetry/opentelemetry-demo/pull/1149))
* [grafana] fix dashboard metric names and update settings
([#1150](https://github.com/open-telemetry/opentelemetry-demo/pull/1150))
* [otelcol] add httpcheck receiver for synthetic check of frontendproxy
([#1162](https://github.com/open-telemetry/opentelemetry-demo/pull/1162))
* pinning trace-based test tool version and adding files as volumes
([#1182](https://github.com/open-telemetry/opentelemetry-demo/pull/1182))
* [jaeger] fix Jager SPM / Monitor support
([#1174](https://github.com/open-telemetry/opentelemetry-demo/pull/1174))
* [otelcol] merge configuration files for base and observability configs
([#1173](https://github.com/open-telemetry/opentelemetry-demo/pull/1173))
* [frontendproxy] Fix service graph by enabling client spans in envoy proxy
([#1180](https://github.com/open-telemetry/opentelemetry-demo/pull/1180))
* [java-services] Update java, gradle and OTel agent versions
([#1183](https://github.com/open-telemetry/opentelemetry-demo/pull/1183))
* [opensearch] Add OpenSearch as an OTLP Logging backend
([#1151](https://github.com/open-telemetry/opentelemetry-demo/pull/1151))
* [opensearch] Add Grafana dashboard panels for OpenSearch log data
([#1193](https://github.com/open-telemetry/opentelemetry-demo/pull/1193))

## 1.5.0

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ install-tools: $(MISSPELL)
npm install
@echo "All tools installed"

.PHONY: build
build:
docker compose build

.PHONY: build-and-push-dockerhub
build-and-push-dockerhub:
docker compose --env-file .dockerhub.env -f docker-compose.yml build
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ Monday at 8:30 AM PST and anyone is welcome.
[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer)
([@open-telemetry/demo-maintainers](https://github.com/orgs/open-telemetry/teams/demo-maintainers)):

- [Austin Parker](https://github.com/austinlparker), Lightstep
- [Austin Parker](https://github.com/austinlparker), Honeycomb
- [Carter Socha](https://github.com/cartersocha), Lightstep
- [Juliano Costa](https://github.com/julianocosta89), Dynatrace
- [Pierre Tessier](https://github.com/puckpuck), Honeycomb

[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
([@open-telemetry/demo-approvers](https://github.com/orgs/open-telemetry/teams/demo-approvers)):

- [Cedric Ziel](https://github.com/cedricziel) Grafana Labs
- [Mikko Viitanen](https://github.com/mviitane), Dynatrace
- [Penghan Wang](https://github.com/wph95), AppDynamics
- [Reiley Yang](https://github.com/reyang), Microsoft
Expand Down
217 changes: 200 additions & 17 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,36 +463,36 @@ services:
# ********************
# Jaeger
jaeger:
image: jaegertracing/all-in-one:1.48.0
image: jaegertracing/all-in-one:1.50
container_name: jaeger
command:
- "--memory.max-traces"
- "10000"
- "--query.base-path"
- "/jaeger/ui"
- "--prometheus.server-url"
- "http://${PROMETHEUS_ADDR}"
- "--memory.max-traces=8000"
- "--query.base-path=/jaeger/ui"
- "--prometheus.server-url=http://${PROMETHEUS_ADDR}"
- "--prometheus.query.normalize-calls=true"
- "--prometheus.query.normalize-duration=true"
deploy:
resources:
limits:
memory: 300M
restart: unless-stopped
ports:
- "${JAEGER_SERVICE_PORT}" # Jaeger UI
- "${JAEGER_SERVICE_PORT}" # Jaeger UI
- "4317" # OTLP gRPC default port
environment:
- COLLECTOR_OTLP_ENABLED=true
- METRICS_STORAGE_TYPE=prometheus
logging: *logging

# Grafana
grafana:
image: grafana/grafana:10.1.0
image: grafana/grafana:10.1.2
container_name: grafana
deploy:
resources:
limits:
memory: 100M
environment:
- "GF_INSTALL_PLUGINS=grafana-opensearch-datasource"
volumes:
- ./src/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./src/grafana/provisioning/:/etc/grafana/provisioning/
Expand All @@ -502,30 +502,29 @@ services:

# OpenTelemetry Collector
otelcol:
image: otel/opentelemetry-collector-contrib:0.84.0
image: otel/opentelemetry-collector-contrib:0.86.0
container_name: otel-col
deploy:
resources:
limits:
memory: 125M
restart: unless-stopped
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-extras.yml" ]
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ]
volumes:
- ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml
- ./src/otelcollector/otelcol-observability.yml:/etc/otelcol-observability.yml
- ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml
ports:
- "4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
- "4318" # OTLP over HTTP receiver
depends_on:
- jaeger
logging: *logging
environment:
- ENVOY_PORT

# Prometheus
prometheus:
image: quay.io/prometheus/prometheus:v2.46.0
image: quay.io/prometheus/prometheus:v2.47.0
container_name: prometheus
command:
- --web.console.templates=/etc/prometheus/consoles
Expand All @@ -536,6 +535,7 @@ services:
- --web.enable-lifecycle
- --web.route-prefix=/
- --enable-feature=exemplar-storage
- --enable-feature=otlp-write-receiver
volumes:
- ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
deploy:
Expand All @@ -545,3 +545,186 @@ services:
ports:
- "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"
logging: *logging

opensearch:
image: opensearchproject/opensearch:latest
container_name: opensearch
environment:
- cluster.name=demo-cluster
- node.name=demo-node
- bootstrap.memory_lock=true
- discovery.type=single-node
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
logging: *logging

dataprepper:
image: opensearchproject/data-prepper:latest
volumes:
- ./src/opensearch/pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml
- ./src/opensearch/data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml
ports:
- "21892"
logging: *logging

# *****
# Tests
# *****
# Frontend Tests
frontendTests:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-frontend-tests
container_name: frontend-tests
build:
context: ./
dockerfile: ./src/frontend/Dockerfile.cypress
profiles:
- tests
volumes:
- ./src/frontend/cypress/videos:/app/cypress/videos
- ./src/frontend/cypress/screenshots:/app/cypress/screenshots
environment:
- CYPRESS_baseUrl=http://${FRONTEND_ADDR}
- FRONTEND_ADDR
- NODE_ENV=production
depends_on:
- frontend

# Integration Tests
integrationTests:
image: ${IMAGE_NAME}:${IMAGE_VERSION}-integrationTests
container_name: integrationTests
profiles:
- tests
build:
context: ./
dockerfile: ./test/Dockerfile
environment:
- AD_SERVICE_ADDR
- CART_SERVICE_ADDR
- CHECKOUT_SERVICE_ADDR
- CURRENCY_SERVICE_ADDR
- EMAIL_SERVICE_ADDR
- PAYMENT_SERVICE_ADDR
- PRODUCT_CATALOG_SERVICE_ADDR
- RECOMMENDATION_SERVICE_ADDR
- SHIPPING_SERVICE_ADDR
depends_on:
- adservice
- cartservice
- checkoutservice
- currencyservice
- emailservice
- paymentservice
- productcatalogservice
- 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
- KAFKA_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
accountingservice:
condition: service_started
frauddetectionservice:
condition: service_started

tracetest-server:
image: kubeshop/tracetest:v0.13.10
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:16.0
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
Loading

0 comments on commit 8517287

Please sign in to comment.