forked from teslamotors/fleet-telemetry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
150 lines (142 loc) · 3.97 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile.integration
volumes:
- ./test/integration/config.json:/etc/tesla/config.json:ro
- ./test/integration/test-certs:/etc/tesla/certs/server:ro
- /tmp/fleet-telemetry/:/tmp/fleet-telemetry:rw
command:
- "/fleet-telemetry"
- "-config=/etc/tesla/config.json"
ports:
- "4443:4443"
- "4269:4269"
- "5284:5284"
- "8080:8080"
- "9090:9090"
environment:
# Note these AWS env vars are required for local kinesis, but their values are ignored
AWS_DEFAULT_REGION: us-west-2
AWS_ACCESS_KEY_ID: ABC123
AWS_SECRET_ACCESS_KEY: EFG456
PUBSUB_EMULATOR_HOST: pubsub:8085
SUPPRESS_TLS_HANDSHAKE_ERROR_LOGGING: true
depends_on:
kinesis:
condition: service_healthy
kafka:
condition: service_healthy
pubsub:
condition: service_started
errbit:
condition: service_healthy
zookeeper:
image: confluentinc/cp-zookeeper:7.2.6
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:7.2.6
hostname: kafka
container_name: kafka
depends_on:
- zookeeper
ports:
- "29092:29092"
- "9092:9092"
- "9101:9101"
healthcheck:
test: nc -z localhost 9092 || exit -1
start_period: 15s
interval: 5s
timeout: 10s
retries: 10
environment:
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ENABLE_IDEMPOTENCE: "true"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
pubsub:
image: google/cloud-sdk:415.0.0
ports:
- '8085:8085'
command:
[
"gcloud",
"beta",
"emulators",
"pubsub",
"start",
"--host-port",
"pubsub:8085"
]
kinesis:
image: saidsef/aws-kinesis-local
ports:
- 4567:4567
healthcheck:
test: nc -z localhost 4567 || exit -1
start_period: 15s
interval: 5s
timeout: 10s
retries: 10
# Errbit implements airbrake's API, so we can use it to test the airbrake
errbit:
image: errbit/errbit:latest
ports:
- '48088:8080'
command: sh -c "bundle exec rake errbit:init_errbit && bundle exec puma -C config/puma.default.rb"
volumes:
- ./test/integration/errbit/apps.json:/initialize/apps.json:ro
- ./test/integration/errbit/site_configs.json:/initialize/site_configs.json:ro
- ./test/integration/errbit/users.json:/initialize/users.json:ro
- ./test/integration/errbit/init_errbit.rake:/app/lib/tasks/errbit/init_errbit.rake
depends_on:
mongodb:
condition: service_healthy
environment:
RACK_ENV: production
PORT: 8080
MONGO_URL: mongodb://errbit_user:errbit_password@mongodb:27017/errbit
mongodb:
image: mongo:4.1
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: errbit-admin
MONGO_INITDB_ROOT_PASSWORD: 42
healthcheck:
test: mongo -u errbit-admin -p 42 --eval "db.adminCommand('ping')" --quiet
interval: 5s
volumes:
- ./test/integration/mongodb/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
prometheus:
image: prom/prometheus
ports:
- "19090:9090"
volumes:
- ./test/integration/prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
grafana:
image: grafana/grafana
ports:
- "13000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
volumes:
- ./test/integration/grafana/provisioning:/etc/grafana/provisioning
depends_on:
prometheus:
condition: service_started