Skip to content

Instantly share code, notes, and snippets.

@cirocosta
Created October 16, 2019 12:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirocosta/6a676a071d64e0076a30139e76f46a74 to your computer and use it in GitHub Desktop.
Save cirocosta/6a676a071d64e0076a30139e76f46a74 to your computer and use it in GitHub Desktop.
a three-worker Concourse `docker-compose.yml` with Jaeger
version: '3'
services:
db:
image: postgres
ports:
- 6543:5432
environment:
POSTGRES_DB: concourse
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
web:
build: .
image: concourse/concourse:local
volumes:
- .:/src
command: web
depends_on: [db]
ports:
- 8080:8080
environment:
CONCOURSE_ADD_LOCAL_USER: test:test,guest:guest
CONCOURSE_CLUSTER_NAME: dev
CONCOURSE_CONTAINER_PLACEMENT_STRATEGY: random
CONCOURSE_EXTERNAL_URL: http://localhost:8080
CONCOURSE_MAIN_TEAM_LOCAL_USER: test
CONCOURSE_POSTGRES_DATABASE: concourse
CONCOURSE_POSTGRES_HOST: db
CONCOURSE_POSTGRES_PASSWORD: dev
CONCOURSE_POSTGRES_USER: dev
CONCOURSE_TRACING_JAEGER_COMPONENT: atc
CONCOURSE_TRACING_JAEGER_ENDPOINT: http://jaeger:14268/api/traces
worker1: &worker-config
build: .
image: concourse/concourse:local
command: worker
privileged: true
depends_on: [web]
stop_signal: SIGUSR2
environment: &worker-env
CONCOURSE_BAGGAGECLAIM_BIND_IP: 0.0.0.0
CONCOURSE_BAGGAGECLAIM_DRIVER: overlay
CONCOURSE_BIND_IP: 0.0.0.0
CONCOURSE_TAG: common,worker1
CONCOURSE_TSA_HOST: web:2222
worker2:
<<: *worker-config
environment:
<<: *worker-env
CONCOURSE_TAG: common,worker2
worker3:
<<: *worker-config
environment:
<<: *worker-env
CONCOURSE_TAG: common,worker3
jaeger:
image: jaegertracing/all-in-one:1.14
command:
- --sampling.strategies-file=/etc/jaeger/sampling_strategies.json
- --log-level=debug
environment:
COLLECTOR_ZIPKIN_HTTP_PORT: 9411
ports:
- '14268:14268'
- '25000:16686'
- '5775:5775/udp'
- '5778:5778'
- '6831:6831/udp'
- '6832:6832/udp'
- '9411:9411'
resources:
- name: ticker1
tags: [common]
type: time
source: {interval: 1s}
- name: ticker2
tags: [common]
type: time
source: {interval: 1s}
- name: ticker3
tags: [common]
type: time
source: {interval: 1s}
- name: ticker4
tags: [common]
type: time
source: {interval: 1s}
jobs:
- name: test
serial: true
plan:
- in_parallel:
- get: ticker1
tags: [common]
trigger: true
- get: ticker2
tags: [common]
trigger: true
- get: ticker3
tags: [common]
trigger: true
- get: ticker4
tags: [common]
trigger: true
- task: populate-from-worker-1
tags: [worker1]
config:
platform: linux
image_resource:
type: registry-image
source: { repository: ubuntu }
outputs:
- name: dir1
- name: dir2
- name: dir3
- name: dir4
- name: dir5
run:
path: /bin/bash
args:
- -cex
- |
for i in $(seq 1 5); do
dd if=/dev/urandom of=./dir$i/80mb bs=4096 count=20000
done
- task: consume
tags: [worker2]
config:
platform: linux
image_resource:
type: registry-image
source: { repository: ubuntu }
inputs:
- name: dir1
- name: dir2
- name: dir3
- name: dir4
- name: dir5
run:
path: /usr/bin/du
args: [-h]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment