-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resurrects webflux5-sleuth and removes sleuth brave version pin (#113)
Sleuth 3.1.11 was released and that fixed flux eureka discovery as well moved off deprecated functions that made it impossible to update to Brave 6.0. Signed-off-by: Adrian Cole <[email protected]>
- Loading branch information
1 parent
b36cc84
commit 14a408d
Showing
21 changed files
with
534 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# yamllint --format github .github/workflows/deploy.yml | ||
--- | ||
name: deploy webflux5-sleuth | ||
|
||
on: | ||
# We deploy non-tagged pushes to master relevant for this project. We can't opt out of | ||
# documentation-only commits because GH actions does not permit paths and paths-ignore. | ||
push: | ||
tags: '' | ||
branches: master | ||
paths: | ||
- "build-bin/**" | ||
- "docker/**" | ||
- "webflux5-sleuth/**" | ||
- ".github/workflows/deploy-webflux5-sleuth.yaml" | ||
- "parent-pom.xml" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./m2repository # Shared with the Docker build context via .dockerignore | ||
key: ${{ runner.os }}-webflux5-sleuth-maven-${{ hashFiles('parent-pom.xml', 'webflux5-sleuth/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-webflux5-sleuth-maven- | ||
# Don't attempt to cache Docker. Sensitive information can be stolen | ||
# via forks, and login session ends up in ~/.docker. This is ok because | ||
# we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. | ||
- name: Deploy webflux5-sleuth | ||
env: | ||
# GH_USER=<user that created GH_TOKEN> | ||
GH_USER: ${{ secrets.GH_USER }} | ||
# GH_TOKEN=<hex token value> | ||
# - pushes Docker images to ghcr.io | ||
# - create via https://github.com/settings/tokens | ||
# - needs repo:status, public_repo, write:packages, delete:packages | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
build-bin/configure_deploy webflux5-sleuth && | ||
build-bin/deploy webflux5-sleuth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# yamllint --format github .github/workflows/test.yml | ||
--- | ||
name: test webflux5-sleuth | ||
|
||
on: | ||
# We deploy non-tagged pushes to master relevant for this project. We can't opt out of | ||
# documentation-only commits because GH actions does not permit paths and paths-ignore. | ||
pull_request: | ||
branches: master | ||
paths: | ||
- "build-bin/**" | ||
- "docker/**" | ||
- "webflux5-sleuth/**" | ||
- ".github/workflows/test-webflux5-sleuth.yaml" | ||
- "parent-pom.xml" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./m2repository # Shared with the Docker build context via .dockerignore | ||
key: ${{ runner.os }}-webflux5-sleuth-maven-${{ hashFiles('parent-pom.xml', 'webflux5-sleuth/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-webflux5-sleuth-maven- | ||
# Don't attempt to cache Docker. Sensitive information can be stolen | ||
# via forks, and login session ends up in ~/.docker. This is ok because | ||
# we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. | ||
- name: Test webflux5-sleuth | ||
run: | | ||
build-bin/configure_test webflux5-sleuth && | ||
build-bin/test webflux5-sleuth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# permit depends_on/condition: service_healthy | ||
version: '2.4' | ||
|
||
# This configures examples so that they use Eureka to discover the Zipkin | ||
# endpoint. | ||
services: | ||
sut: | ||
extends: | ||
file: docker-compose.base.yml | ||
service: sut | ||
depends_on: | ||
get_frontend: | ||
condition: service_started | ||
|
||
get_frontend: | ||
extends: | ||
file: docker-compose.base.yml | ||
service: get_frontend | ||
depends_on: | ||
frontend: | ||
condition: service_healthy | ||
|
||
frontend: | ||
extends: | ||
file: docker-compose.base.yml | ||
service: frontend | ||
environment: | ||
- EUREKA_SERVICE_URL=http://testuser:testpass@eureka:8761/eureka/v2 | ||
depends_on: | ||
backend: | ||
condition: service_healthy | ||
|
||
backend: | ||
extends: | ||
file: docker-compose.base.yml | ||
service: backend | ||
environment: | ||
- EUREKA_SERVICE_URL=http://testuser:testpass@eureka:8761/eureka/v2 | ||
depends_on: | ||
zipkin: | ||
condition: service_healthy | ||
eureka: | ||
condition: service_healthy | ||
|
||
zipkin: | ||
extends: | ||
file: docker-compose.base.yml | ||
service: zipkin | ||
environment: | ||
- EUREKA_SERVICE_URL=http://testuser:testpass@eureka:8761/eureka/v2 | ||
- EUREKA_HOSTNAME=zipkin | ||
depends_on: | ||
eureka: | ||
condition: service_healthy | ||
|
||
eureka: | ||
image: ghcr.io/openzipkin/zipkin-eureka | ||
container_name: eureka | ||
environment: | ||
- EUREKA_USERNAME=testuser | ||
- EUREKA_PASSWORD=testpass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,51 @@ | ||
# permit depends_on/condition: service_healthy | ||
version: "2.4" | ||
version: '2.4' | ||
|
||
# this duplicates a lot of service definitions because services with depends_on cannot be extended | ||
# This configures examples so that they use Kafka to communicate. | ||
services: | ||
sut: | ||
container_name: sut | ||
image: ghcr.io/openzipkin/alpine:3.19.1 | ||
entrypoint: /bin/sh | ||
# Keep the container running until HEALTHCHECK passes | ||
command: "-c \"sleep 5m\"" | ||
healthcheck: | ||
# Return 0 when we can read back our trace ID | ||
test: wget -qO- --spider http://zipkin:9411/api/v2/trace/cafebabecafebabe | ||
extends: | ||
file: docker-compose.base.yml | ||
service: sut | ||
depends_on: | ||
get_frontend: | ||
condition: service_started | ||
|
||
get_frontend: | ||
container_name: get_frontend | ||
image: ghcr.io/openzipkin/alpine:3.19.1 | ||
entrypoint: /bin/sh | ||
# Pass a trace header with a constant trace ID, so that we know what to look for later | ||
command: "-c \"wget -qO- --header 'b3: cafebabecafebabe-cafebabecafebabe-1' http://frontend:8081\"" | ||
extends: | ||
file: docker-compose.base.yml | ||
service: get_frontend | ||
depends_on: | ||
frontend: | ||
condition: service_healthy | ||
zipkin: | ||
condition: service_healthy | ||
|
||
kafka: | ||
image: ghcr.io/openzipkin/zipkin-kafka:latest | ||
container_name: kafka | ||
# If using docker machine, uncomment the below and set your bootstrap | ||
# server list to 192.168.99.100:19092 | ||
# environment: | ||
# - KAFKA_ADVERTISED_HOST_NAME=192.168.99.100 | ||
ports: | ||
# Processes on the Docker host can set bootstrap server list to localhost:19092 | ||
- 19092:19092 | ||
|
||
frontend: | ||
container_name: frontend | ||
image: ${DOCKER_IMAGE} | ||
entrypoint: start-frontend | ||
extends: | ||
file: docker-compose.base.yml | ||
service: frontend | ||
environment: | ||
- EUREKA_SERVICE_URL=http://testuser:testpass@kafka:8761/kafka/v2 | ||
depends_on: | ||
kafka: | ||
backend: | ||
condition: service_healthy | ||
zipkin: | ||
condition: service_started | ||
|
||
backend: | ||
container_name: backend | ||
image: ${DOCKER_IMAGE} | ||
entrypoint: start-backend | ||
extends: | ||
file: docker-compose.base.yml | ||
service: backend | ||
environment: | ||
- EUREKA_SERVICE_URL=http://testuser:testpass@kafka:8761/kafka/v2 | ||
depends_on: | ||
zipkin: | ||
condition: service_healthy | ||
kafka: | ||
condition: service_healthy | ||
zipkin: | ||
condition: service_started | ||
|
||
zipkin: | ||
extends: | ||
file: docker-compose.test.yml | ||
file: docker-compose.base.yml | ||
service: zipkin | ||
|
||
kafka: | ||
image: ghcr.io/openzipkin/zipkin-kafka | ||
container_name: kafka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# permit depends_on/condition: service_healthy | ||
version: "2.4" | ||
|
||
# This is a base configuration *without depends-on* because docker-compose | ||
# officially doesn't support extending with depends-on even if some tools | ||
# allow it. See https://github.com/docker/compose/issues/7916 | ||
services: | ||
sut: | ||
container_name: sut | ||
image: ghcr.io/openzipkin/alpine:3.19.1 | ||
entrypoint: /bin/sh | ||
# Keep the container running until HEALTHCHECK passes | ||
command: "-c \"sleep 5m\"" | ||
healthcheck: | ||
# Return 0 when we can read back our trace ID | ||
test: wget -qO- --spider http://zipkin:9411/api/v2/trace/cafebabecafebabe | ||
get_frontend: | ||
container_name: get_frontend | ||
image: ghcr.io/openzipkin/alpine:3.19.1 | ||
entrypoint: /bin/sh | ||
# Pass a trace header with a constant trace ID, so that we know what to look for later | ||
command: "-c \"wget -qO- --header 'b3: cafebabecafebabe-cafebabecafebabe-1' http://frontend:8081\"" | ||
frontend: | ||
container_name: frontend | ||
image: ${DOCKER_IMAGE} | ||
entrypoint: start-frontend | ||
backend: | ||
container_name: backend | ||
image: ${DOCKER_IMAGE} | ||
entrypoint: start-backend | ||
zipkin: | ||
image: ghcr.io/openzipkin/zipkin-slim | ||
container_name: zipkin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,42 @@ | ||
# permit depends_on/condition: service_healthy | ||
version: "2.4" | ||
version: '2.4' | ||
|
||
services: | ||
sut: | ||
container_name: sut | ||
image: ghcr.io/openzipkin/alpine:3.19.1 | ||
entrypoint: /bin/sh | ||
# Keep the container running until HEALTHCHECK passes | ||
command: "-c \"sleep 5m\"" | ||
healthcheck: | ||
# Return 0 when we can read back our trace ID | ||
test: wget -qO- --spider http://zipkin:9411/api/v2/trace/cafebabecafebabe | ||
extends: | ||
file: docker-compose.base.yml | ||
service: sut | ||
depends_on: | ||
get_frontend: | ||
condition: service_started | ||
|
||
get_frontend: | ||
container_name: get_frontend | ||
image: ghcr.io/openzipkin/alpine:3.19.1 | ||
entrypoint: /bin/sh | ||
# Pass a trace header with a constant trace ID, so that we know what to look for later | ||
command: "-c \"wget -qO- --header 'b3: cafebabecafebabe-cafebabecafebabe-1' http://frontend:8081\"" | ||
extends: | ||
file: docker-compose.base.yml | ||
service: get_frontend | ||
depends_on: | ||
frontend: | ||
condition: service_healthy | ||
zipkin: | ||
condition: service_healthy | ||
|
||
frontend: | ||
container_name: frontend | ||
image: ${DOCKER_IMAGE} | ||
entrypoint: start-frontend | ||
extends: | ||
file: docker-compose.base.yml | ||
service: frontend | ||
depends_on: | ||
backend: | ||
condition: service_healthy | ||
zipkin: | ||
condition: service_started | ||
|
||
backend: | ||
container_name: backend | ||
image: ${DOCKER_IMAGE} | ||
entrypoint: start-backend | ||
extends: | ||
file: docker-compose.base.yml | ||
service: backend | ||
depends_on: | ||
zipkin: | ||
condition: service_started | ||
condition: service_healthy | ||
|
||
zipkin: | ||
image: ghcr.io/openzipkin/zipkin-slim | ||
container_name: zipkin | ||
extends: | ||
file: docker-compose.base.yml | ||
service: zipkin | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.