Skip to content

Commit

Permalink
updating tyk example
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Aug 14, 2024
1 parent 7f55ed1 commit 2ab19e5
Show file tree
Hide file tree
Showing 15 changed files with 198 additions and 701 deletions.
7 changes: 5 additions & 2 deletions examples/quick-start-tyk/.env.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
TRACETEST_API_TOKEN=
TRACETEST_AGENT_API_KEY=
# Get the required information here: https://app.tracetest.io/retrieve-token

TRACETEST_TOKEN="<YOUR_TRACETEST_TOKEN>"
TRACETEST_ENVIRONMENT_ID="<YOUR_ENV_ID>"

POKESHOP_DEMO_URL=http://tyk-gateway:8080
TYK_AUTH_KEY=28d220fd77974a4facfb07dc1e49c2aa
11 changes: 11 additions & 0 deletions examples/quick-start-tyk/Dockerfile.tracetest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine

WORKDIR /app
ARG TRACETEST_IMAGE_VERSION=v1.4.0

RUN apk --update add bash jq curl
RUN curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash -s -- $TRACETEST_IMAGE_VERSION

WORKDIR /resources

ENTRYPOINT ["echo", "Tracetest CLI installed"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,49 @@ services:
tyk-gateway:
condition: service_started

# Cloud-based Managed Tracetest
tracetest-agent:
environment:
TRACETEST_DEV: ${TRACETEST_DEV}
TRACETEST_API_KEY: ${TRACETEST_AGENT_API_KEY}
TRACETEST_SERVER_URL: ${TRACETEST_SERVER_URL}
image: kubeshop/tracetest-agent:latest
environment:
# Get the required information here: https://app.tracetest.io/retrieve-token
- TRACETEST_API_KEY=${TRACETEST_TOKEN}
- TRACETEST_ENVIRONMENT_ID=${TRACETEST_ENVIRONMENT_ID}

tracetest-apply:
build:
dockerfile: Dockerfile.tracetest
volumes:
- ./resources:/resources
environment:
TRACETEST_TOKEN: ${TRACETEST_TOKEN}
TRACETEST_ENVIRONMENT_ID: ${TRACETEST_ENVIRONMENT_ID}
entrypoint:
- bash
- /resources/apply.sh
networks:
default: null
depends_on:
api:
condition: service_started
tracetest-agent:
condition: service_started

tracetest-run:
build:
dockerfile: Dockerfile.tracetest
volumes:
- ./resources:/resources
environment:
TRACETEST_TOKEN: ${TRACETEST_TOKEN}
TRACETEST_ENVIRONMENT_ID: ${TRACETEST_ENVIRONMENT_ID}
entrypoint:
- bash
- /resources/run.sh
networks:
default: null
depends_on:
tracetest-apply:
condition: service_completed_successfully

# Tyk Gateway
tyk-gateway:
Expand Down Expand Up @@ -96,6 +133,10 @@ services:
ports:
- 8081:8081
depends_on:
tyk-gateway:
condition: service_started
worker:
condition: service_started
postgres:
condition: service_healthy
cache:
Expand Down Expand Up @@ -126,9 +167,9 @@ services:

# Collector
otel-collector:
image: otel/opentelemetry-collector-contrib:0.59.0
image: otel/opentelemetry-collector-contrib:0.100.0
volumes:
- ./deployments/otel-collector/otel-collector.yml:/etc/otel-collector.yml
- ./otel-collector.yml:/etc/otel-collector.yml
command: ['--config=/etc/otel-collector.yml']
ports:
- 4318:4318
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ processors:
batch:

exporters:
jaeger:
endpoint: jaeger:14250
otlp/jaeger:
endpoint: jaeger:4317
tls:
insecure: true
otlp:
Expand All @@ -26,7 +26,7 @@ service:
traces:
receivers: [otlp]
processors: []
exporters: [jaeger]
exporters: [otlp/jaeger]
traces/1:
receivers: [otlp]
processors: [batch]
Expand Down
Loading

0 comments on commit 2ab19e5

Please sign in to comment.