-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.yaml
261 lines (252 loc) · 7.85 KB
/
docker-compose.yaml
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
networks:
internal_network:
internal: true
external_network:
driver: bridge
services:
# CB-Tumblebug
cb-tumblebug:
image: cloudbaristaorg/cb-tumblebug:0.10.3
container_name: cb-tumblebug
build:
context: .
dockerfile: Dockerfile
platform: linux/amd64
networks:
- internal_network
- external_network
ports:
- 1323:1323
depends_on:
- cb-tumblebug-etcd
# - cb-tumblebug-etcd-conf
- cb-spider
volumes:
- ./conf/:/app/conf/
- ./container-volume/cb-tumblebug-container/meta_db/:/app/meta_db/
- ./container-volume/cb-tumblebug-container/log/:/app/log/
environment:
# - TB_ROOT_PATH=/app
# # Enable TB_SELF_ENDPOINT to specify an endpoint for CB-TB API (default: localhost:1323)
# # Use public IP if you want to access the API Dashboard from outside of localhost
# - TB_SELF_ENDPOINT=xxx.xxx.xxx.xxx:1323
- TB_SPIDER_REST_URL=http://cb-spider:1024/spider
- TB_ETCD_ENDPOINTS=http://cb-tumblebug-etcd:2379
- TB_TERRARIUM_REST_URL=http://mc-terrarium:8055/terrarium
# - TB_ETCD_AUTH_ENABLED=false
# - TB_ETCD_USERNAME=default
# - TB_ETCD_PASSWORD=default
# - TB_SQLITE_URL=localhost:3306
# - TB_SQLITE_DATABASE=cb_tumblebug
# - TB_SQLITE_USER=cb_tumblebug
# - TB_SQLITE_PASSWORD=cb_tumblebug
# - TB_ALLOW_ORIGINS=*
# - TB_AUTH_ENABLED=true
# - TB_API_USERNAME=default
# - TB_API_PASSWORD=default
# - TB_AUTOCONTROL_DURATION_MS=10000
# - TB_DRAGONFLY_REST_URL=http://cb-dragonfly:9090/dragonfly
# - TB_DEFAULT_NAMESPACE=default
# - TB_DEFAULT_CREDENTIALHOLDER=admin
# - TB_LOGFILE_PATH=/app/log/tumblebug.log
# - TB_LOGFILE_MAXSIZE=1000
# - TB_LOGFILE_MAXBACKUPS=3
# - TB_LOGFILE_MAXAGE=30
# - TB_LOGFILE_COMPRESS=false
# - TB_LOGLEVEL=debug
# - TB_LOGWRITER=both
# - TB_NODE_ENV=development
healthcheck: # for CB-Tumblebug
test: [ "CMD", "curl", "-f", "http://localhost:1323/tumblebug/readyz" ]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# cb-tumblebug-etcd
cb-tumblebug-etcd:
image: gcr.io/etcd-development/etcd:v3.5.14
container_name: cb-tumblebug-etcd
networks:
- internal_network
ports:
- 2379:2379
- 2380:2380
volumes:
- ./container-volume/etcd/data:/etcd-data
entrypoint: /usr/local/bin/etcd
command:
- --name
- s1
- --data-dir
- /etcd-data
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://0.0.0.0:2379
- --listen-peer-urls
- http://0.0.0.0:2380
- --initial-advertise-peer-urls
- http://0.0.0.0:2380
- --initial-cluster
- s1=http://0.0.0.0:2380
- --initial-cluster-token
- tkn
- --initial-cluster-state
- new
- --log-level
- info
- --logger
- zap
- --log-outputs
- stderr
- --auth-token
- simple
healthcheck: # for etcd
test: [ "CMD", "/usr/local/bin/etcd", "--version"]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# CB-Spider
cb-spider:
image: cloudbaristaorg/cb-spider:0.10.0
container_name: cb-spider
# build:
# context: ../cb-spider
# dockerfile: Dockerfile
platform: linux/amd64
networks:
- internal_network
- external_network # for outbound access (not ideal for security)
# expose:
# - 1024
ports:
- 1024:1024
volumes:
- ./container-volume/cb-spider-container/meta_db/:/root/go/src/github.com/cloud-barista/cb-spider/meta_db/
- ./container-volume/cb-spider-container/log/:/root/go/src/github.com/cloud-barista/cb-spider/log/
environment:
- PLUGIN_SW=OFF
- SERVER_ADDRESS=localhost
# if you leave these values empty, REST Auth will be disabled.
# - API_USERNAME=
# - API_PASSWORD=
- SPIDER_LOG_LEVEL=error
- SPIDER_HISCALL_LOG_LEVEL=error
- ID_TRANSFORM_MODE=OFF
healthcheck: # for CB-Spider
test: [ "CMD", "curl", "-f", "http://localhost:1024/spider/readyz" ]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# cb-mapui
cb-mapui:
image: cloudbaristaorg/cb-mapui:0.10.0
container_name: cb-mapui
# build:
# context: ../cb-mapui
# dockerfile: Dockerfile
networks:
- external_network
ports:
- target: 1324
published: 1324
protocol: tcp
healthcheck: # for cb-mapui
test: ["CMD", "nc", "-vz", "localhost", "1324"]
interval: 1m
timeout: 5s
retries: 3
start_period: 10s
# # mc-terrarium (PoC): resource extentions such as VPN for CB-Tumblebug by using OpenTofu
# mc-terrarium:
# image: cloudbaristaorg/mc-terrarium:0.0.18
# container_name: mc-terrarium
# # build:
# # context: .
# # dockerfile: Dockerfile
# networks:
# - external_network
# ports:
# - target: 8055
# published: 8055
# protocol: tcp
# env_file:
# - ${HOME}/.cloud-barista/secrets/credentials # AWS credentials
# - ${HOME}/.cloud-barista/secrets/credential-azure.env # Azure credentials
# - ${HOME}/.cloud-barista/secrets/credential-ncp.env # NCP credentials
# volumes:
# - ${HOME}/.cloud-barista/secrets:/app/secrets:ro # GCP credentials
# - ./container-volume/mc-terrarium-container/.terrarium:/app/.terrarium
# environment:
# - TERRARIUM_ROOT=/app
# # - TERRARIUM_SELF_ENDPOINT=localhost:8055
# # - TERRARIUM_API_ALLOW_ORIGINS=*
# # - TERRARIUM_API_AUTH_ENABLED=true
# # - TERRARIUM_API_USERNAME=default
# # - TERRARIUM_API_PASSWORD=default
# # - TERRARIUM_LOGFILE_PATH=/app/log/terrarium.log
# # - TERRARIUM_LOGFILE_MAXSIZE=1000
# # - TERRARIUM_LOGFILE_MAXBACKUPS=3
# # - TERRARIUM_LOGFILE_MAXAGE=30
# # - TERRARIUM_LOGFILE_COMPRESS=false
# - TERRARIUM_LOGLEVEL=info
# # - TERRARIUM_LOGWRITER=both
# # - TERRARIUM_NODE_ENV=production
# # - TERRARIUM_AUTOCONTROL_DURATION_MS=10000
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:8055/terrarium/readyz" ]
# interval: 5m
# timeout: 5s
# retries: 3
# start_period: 10s
# # Swagger UI
# swagger-ui:
# image: swaggerapi/swagger-ui
# container_name: swagger-ui
# networks:
# - external_network
# ports:
# - 1325:8080
# volumes:
# # cb-tumblebug swagger.yaml mount
# - ./src/api/rest/docs/swagger.yaml:/swagger.yaml
# environment:
# # Options: https://github.com/swagger-api/swagger-ui/blob/37b8c1a8b67200dd425216ab8f97b725a429a5c0/docs/usage/configuration.md#docker
# - SWAGGER_JSON=/swagger.yaml
# - QUERY_CONFIG_ENABLED=true
# logging:
# # Disable logging
# driver: "none"
# healthcheck:
# test: [ "CMD", "curl", "-f", "localhost", "1325"]
# timeout: 5s
# retries: 3
# start_period: 3s
# # cb-tumblebug-etcd-conf
# cb-tumblebug-etcd-conf:
# image: alpine:latest
# container_name: cb-tumblebug-etcd-conf
# networks:
# - internal_network
# - external_network
# depends_on:
# - cb-tumblebug-etcd
# volumes:
# - ./scripts/etcd/:/scripts/etcd/
# environment:
# - ETCD_VERSION_TAG=v3.5.14
# - ETCD_ENDPOINTS=http://cb-tumblebug-etcd:2379
# - ETCD_PATH=/tmp/etcd-download-test
# - ETCD_AUTH_ENABLED=true
# - ETCD_ROOT_PASSWORD=default
# - ETCD_ADMIN_USERNAME=default
# - ETCD_ADMIN_PASSWORD=default
# command: sh -c "sh /scripts/etcd/etcd-conf.sh"
# healthcheck: # for etcd-conf
# test: ["CMD", "test", "-f", "/tmp/healthcheck"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 10s