forked from netpicker/workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.override.yml
344 lines (324 loc) · 8.64 KB
/
docker-compose.override.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
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# Slurpit: http://localhost:80 & https://localhost:443
# Netbox: http://localhost:8200
# Netpicker: http://localhost:8008
# Mockit: cisco_ios, aruba_aoscx, juniper_junos, arista_eos
# Set the PORTAL_BASE_URL environment to your management IP
x-plugin: &plugin-common
# image: registry.gitlab.com/slurpit.io/slurpit-netbox-docker:latest
build: .
networks:
- slurpit_slurpit-network
x-api: &api_common
image: netpicker/api
environment:
ALLOWED_ORIGINS: '["*"]'
AUTH0_AUDIENCE: n/a
AUTH0_CLIENT_ID: n/a
AUTH0_CLIENT_SECRET: n/a
AUTH0_TENANT: n/a
CELERY_BROKER_URL: redis://netpicker-redis
CELERY_RESULT_BACKEND: redis://netpicker-redis
JWT_AUDIENCE: "netpicker"
JWT_ALGORITHM: HS256
JWT_SECRET: ew9023cnkljfcnsdlkfsfdhs
DB_URI: "postgresql+asyncpg://netpicker:netpicker@netpicker-db/netpicker"
BEAT_DB_URI: "postgresql+psycopg2://netpicker:netpicker@netpicker-db/netpicker"
PERSISTENT_VOLUME_PATH: /data/policy-repository
REDIS_URL: redis://netpicker-redis
UVICORN_ROOT_PATH: /
WORKDIR_VOLUME_PATH: /data/policy-workdir
AUTH_BACKEND: netyce_alchemy
GIT_SERVER: git://gitd
GIT_REPO_MANAGER: '["gitd",9419]'
CLI_PROXY_HOST: agent
INIT_USER: '[email protected]'
INIT_PASSWORD: '12345678'
INIT_TENANT: 'default'
NETBOX_API: "http://172.29.245.217:8200/"
NETBOX_TOKEN: 98943750c93c5779132110681f2fca4c22b1de07
SLURPIT_URL: "https://slurpit-endpoint/"
SLURPIT_APIKEY: slurpit_apikey_here
#PUBLIC_POLICIES:
#PROXY_SSL_VERIFY: 0 # does not verify any SSL certificate
#PROXY_SSL_VERIFY_EXEMPT_HOST: '["my.host", "your.host"]' # does not verify SSL certificates for given hostnames
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- policy-data:/data
depends_on:
- netpicker-redis
- netpicker-db
# SLURPIT
services:
slurpit-warehouse:
image: slurpit/warehouse:latest
container_name: slurpit-warehouse
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/services"]
interval: 10s
timeout: 10s
retries: 360
networks:
- slurpit_slurpit-network
environment:
TZ: Europe/Amsterdam
WAREHOUSE_CALLBACK_SCANNER_URL: http://slurpit-portal/callback/scanner
WAREHOUSE_CALLBACK_SCANNER_TOKEN:
WAREHOUSE_CALLBACK_SCRAPER_URL: http://slurpit-portal/callback/scraper
WAREHOUSE_CALLBACK_SCRAPER_TOKEN:
volumes:
- ./db/warehouse:/var/lib/mongodb
- ./logs/warehouse/mongodb:/var/log/mongodb
- ./logs/warehouse:/logs
restart: always
slurpit-scraper:
image: slurpit/scraper:latest
container_name: slurpit-scraper
depends_on:
slurpit-warehouse:
condition: service_healthy
networks:
- slurpit_slurpit-network
environment:
TZ: Europe/Amsterdam
SCRAPER_TIMEOUT: 20
SCRAPER_POOLSIZE: 4
SCRAPER_WAREHOUSE_URL: http://slurpit-warehouse
volumes:
- ./logs/scraper:/logs
restart: always
slurpit-scanner:
image: slurpit/scanner:latest
container_name: slurpit-scanner
depends_on:
slurpit-warehouse:
condition: service_healthy
networks:
- slurpit_slurpit-network
environment:
TZ: Europe/Amsterdam
SCANNER_POOLSIZE: 4
SCANNER_TIMEOUT: 10
SCANNER_WAREHOUSE_URL: http://slurpit-warehouse
volumes:
- ./logs/scanner:/logs
restart: always
slurpit-portal:
image: slurpit/portal:latest
container_name: slurpit-portal
ports:
- "80:80"
- "443:443"
networks:
- slurpit_slurpit-network
environment:
TZ: Europe/Amsterdam
PORTAL_BASE_URL: http://localhost:80 # depends on how you set up port forwarding
PORTAL_WAREHOUSE_URL: http://slurpit-warehouse
volumes:
- ./logs/nginx:/var/log/nginx/
- ./logs/mysql:/var/log/mysql/
- ./logs/php:/var/log/php/
- ./certs:/etc/nginx/certs/
- ./db/portal:/var/lib/mysql
restart: always
# MOCKIT
cisco_ios:
image: registry.gitlab.com/slurpit.io/mockit:latest
container_name: cisco_ios
environment:
DEVICE_TYPE: cisco_ios
SSH_USERNAME: test
SSH_PASSWORD: test
networks:
slurpit_slurpit-network:
ipv4_address: 172.16.238.40
arista_eos:
image: registry.gitlab.com/slurpit.io/mockit:latest
container_name: arista_eos
environment:
DEVICE_TYPE: arista_eos
SSH_USERNAME: test
SSH_PASSWORD: test
networks:
slurpit_slurpit-network:
ipv4_address: 172.16.238.41
juniper_junos:
image: registry.gitlab.com/slurpit.io/mockit:latest
container_name: juniper_junos
environment:
DEVICE_TYPE: juniper_junos
SSH_USERNAME: test
SSH_PASSWORD: test
networks:
slurpit_slurpit-network:
ipv4_address: 172.16.238.42
aruba_aoscx:
image: registry.gitlab.com/slurpit.io/mockit:latest
container_name: aruba_aoscx
environment:
DEVICE_TYPE: aruba_aoscx
SSH_USERNAME: test
SSH_PASSWORD: test
networks:
slurpit_slurpit-network:
ipv4_address: 172.16.238.43
# NETBOX
netbox:
<<: *plugin-common
ports:
- 8200:8080
netbox-worker:
<<: *plugin-common
netbox-housekeeping:
<<: *plugin-common
postgres:
ports:
- 5432:5432
# NETPICKER
netpicker-db:
image: netpicker/db
container_name: netpicker-db
ports:
- 5438:5432
environment:
POSTGRES_PASSWORD: s3rgts0p!
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- slurpit_slurpit-network
api:
<<: *api_common
container_name: api
labels:
service.netpicker.io: api
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/status"]
start_period: 15s
interval: 5s
networks:
- slurpit_slurpit-network
celery:
<<: *api_common
container_name: celery
labels:
service.netpicker.io: celery
command: /run-celery
healthcheck:
test: ["CMD", "celery", "inspect", "ping", "-t", "5"]
start_period: 5s
interval: 30s
networks:
- slurpit_slurpit-network
netpicker-redis:
image: redis:7-alpine
container_name: netpicker-redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
networks:
- slurpit_slurpit-network
gitd:
image: netpicker/gitd
container_name: gitd
ports:
- "9418:9418" # Default port for git:// pull/push
- "9419:9419" # To manage new repos
volumes:
- git:/git
healthcheck:
test: echo "PING" | nc -v localhost 9419
start_period: 15s
interval: 5s
networks:
- slurpit_slurpit-network
swagger:
image: swaggerapi/swagger-ui
container_name: swagger
environment:
SWAGGER_JSON_URL: "/openapi.json"
TRY_IT_OUT_ENABLED: true
ports:
- "8088:8080"
depends_on:
- api
networks:
- slurpit_slurpit-network
frontend:
image: netpicker/frontend
container_name: frontend
labels:
service.netpicker.io: front-end
ports:
- "8008:80"
depends_on:
- api
networks:
- slurpit_slurpit-network
kibbitzer:
image: netpicker/kibbitzer
container_name: kibbitzer
labels:
service.netpicker.io: kibbitzer
environment:
SHENV_API_URL: http://api:8000
SHENV_CELERY_BROKER_URL: redis://netpicker-redis
SHENV_CELERY_RESULT_BACKEND: redis://netpicker-redis
LOG_LEVEL: DEBUG
healthcheck:
test: echo "PING Mac" | nc -v 127.0.0.1 9696
start_period: 15s
interval: 30s
volumes:
- secret:/run/secrets
depends_on:
- redis
networks:
- slurpit_slurpit-network
agent:
hostname: agent
image: netpicker/agent:latest
container_name: agent
labels:
service.netpicker.io: agent
environment:
CLI_PROXY_ADDR: '0.0.0.0'
SHENV_SHOW_RUN_nokia_srl: 'info'
SHENV_PRIVILEGED_PLATFORMS: 'privileged_platform'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- config:/agent-config
- secret:/run/secrets
- transferium:/transferium
ports:
- 5514:5514/udp
- 6601:6601/tcp
- 6514:6514/tcp
- 8765:8765/tcp
- 9876:9876/tcp
restart: unless-stopped
depends_on:
api:
condition: service_healthy
healthcheck:
test: "echo LST | nc -v localhost 8765"
start_period: 2s
interval: 5s
networks:
- slurpit_slurpit-network
networks:
slurpit_slurpit-network:
driver: bridge
external: false
ipam:
config:
- subnet: 172.16.238.0/24
volumes:
policy-data:
pg_data:
git:
config:
secret:
transferium: