Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
213 lines (203 sloc) 5.7 KB
version: "3"
services:
# Only works when when replicas = 1 for reach monitored service.
prometheus-to-sd:
container_name: prometheus-to-sd
image: gcr.io/google-containers/prometheus-to-sd:v0.2.6
entrypoint:
- /monitor
- --stackdriver-prefix=custom.googleapis.com
- --source=logserver:http://log-server:8091/metrics
- --source=logsigner:http://log-signer:8091/metrics
- --source=mapserver:http://map-server:8091/metrics
- --source=keyserver:http://server:8081/metrics
- --source=sequencer:http://sequencer:8081/metrics
- --pod-id=prometheus-to-sd
- --namespace-id=default
- --metrics-resolution=5s
prometheus:
depends_on:
- server
- sequencer
image: us.gcr.io/key-transparency/prometheus:${TRAVIS_COMMIT}
build:
context: .
dockerfile: deploy/prometheus/Dockerfile
restart: always
ports:
- 9090:9090
db:
image: us.gcr.io/key-transparency/db
build:
context: ../trillian
dockerfile: examples/deployment/docker/db_server/Dockerfile
restart: always
ports:
- "3306"
environment:
MYSQL_PASSWORD: zaphod
MYSQL_USER: test
MYSQL_DATABASE: test
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
log-server:
depends_on:
- db
image: us.gcr.io/key-transparency/log-server:${TRAVIS_COMMIT}
build:
context: ../trillian
dockerfile: server/trillian_log_server/Dockerfile
restart: always
entrypoint:
- /go/bin/trillian_log_server
- --mysql_uri=test:zaphod@tcp(db:3306)/test
- --rpc_endpoint=0.0.0.0:8090
- --http_endpoint=0.0.0.0:8091
- --alsologtostderr
ports:
- "8090"
- "8091"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8091/metrics"]
interval: 30s
timeout: 30s
retries: 3
log-signer:
depends_on:
- db
image: us.gcr.io/key-transparency/log-signer:${TRAVIS_COMMIT}
build:
context: ../trillian
dockerfile: server/trillian_log_signer/Dockerfile
restart: always
entrypoint:
- /go/bin/trillian_log_signer
- --mysql_uri=test:zaphod@tcp(db:3306)/test
- --http_endpoint=0.0.0.0:8091
- --sequencer_guard_window=0s
- --sequencer_interval=1s
- --num_sequencers=1
- --batch_size=50
- --force_master=true
- --alsologtostderr
ports:
- "8091"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8091/metrics"]
interval: 30s
timeout: 30s
retries: 3
map-server:
depends_on:
- db
image: us.gcr.io/key-transparency/map-server:${TRAVIS_COMMIT}
build:
context: ../trillian
dockerfile: server/trillian_map_server/Dockerfile
restart: always
entrypoint:
- /go/bin/trillian_map_server
- --mysql_uri=test:zaphod@tcp(db:3306)/test
- --rpc_endpoint=0.0.0.0:8090
- --http_endpoint=0.0.0.0:8091
- --alsologtostderr
ports:
- "8090"
- "8091"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8091/metrics"]
interval: 30s
timeout: 30s
retries: 3
server:
depends_on:
- db
- log-server
- map-server
image: us.gcr.io/key-transparency/keytransparency-server:${TRAVIS_COMMIT}
build:
context: ..
dockerfile: ./keytransparency/cmd/keytransparency-server/Dockerfile
restart: always
ports:
- "443:8080" # json & grpc
- "8081:8081" # metrics
entrypoint:
- /go/bin/keytransparency-server
- --addr=0.0.0.0:8080
- --db=test:zaphod@tcp(db:3306)/test
- --log-url=log-server:8090
- --map-url=map-server:8090
- --tls-key=/kt/server.key
- --tls-cert=/kt/server.crt
- --auth-type=insecure-fake
- --alsologtostderr
- --v=5
labels:
kompose.service.type: LoadBalancer
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/metrics"]
interval: 30s
timeout: 10s
retries: 5
sequencer:
depends_on:
- db
- log-server
- map-server
image: us.gcr.io/key-transparency/keytransparency-sequencer:${TRAVIS_COMMIT}
build:
context: ..
dockerfile: ./keytransparency/cmd/keytransparency-sequencer/Dockerfile
restart: always
entrypoint:
- /go/bin/keytransparency-sequencer
- --db=test:zaphod@tcp(db:3306)/test
- --addr=0.0.0.0:8080
- --log-url=log-server:8090
- --map-url=map-server:8090
- --alsologtostderr
- --v=5
ports:
- "8080"
- "8081"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/metrics"]
interval: 30s
timeout: 10s
retries: 5
init:
image: us.gcr.io/key-transparency/init:latest
restart: "on-failure"
deploy:
restart_policy:
condition: on-failure
build:
context: .
dockerfile: ./deploy/docker/init/Dockerfile
depends_on:
- sequencer
command: sequencer:8080 -- curl -k https://sequencer:8080/v1/domains -d'{"domain_id":"default","min_interval":"1s","max_interval":"60s"}'
monitor:
depends_on:
- server
- sequencer
image: us.gcr.io/key-transparency/keytransparency-monitor:${TRAVIS_COMMIT}
build:
context: ..
dockerfile: ./keytransparency/cmd/keytransparency-monitor/Dockerfile
entrypoint:
- /go/bin/keytransparency-monitor
- --addr=0.0.0.0:8099
- --kt-url=server:8080
- --insecure
- --poll-period=5s
- --domainid=default
- --tls-key=/kt/server.key
- --tls-cert=/kt/server.crt
- --sign-key=/kt/monitor_sign-key.pem
- --password=towel
- --alsologtostderr
- --v=3
restart: always
ports:
- "8099:8099" # gRPC / HTTPS