-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
237 lines (223 loc) · 5.18 KB
/
docker-compose.yml
File metadata and controls
237 lines (223 loc) · 5.18 KB
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
x-api: &api_common_no_deps
image: "netpicker/api:latest"
environment:
alembic_version: "head"
CLI_PROXY_HOST: agent
LOG_LEVEL: INFO
UVICORN_ROOT_PATH: /
volumes:
- policy-data:/data
x-api-deps: &api_common
<<: *api_common_no_deps
depends_on:
db:
condition: service_healthy
gitd:
condition: service_started
gitdctrl:
condition: service_healthy
redis:
condition: service_healthy
db_migration:
condition: service_completed_successfully
services:
agent:
hostname: agent
image: "netpicker/agent:latest"
container_name: agent
labels:
netpicker.io: service
service.netpicker.io: agent
environment:
CLI_PROXY_ADDR: "0.0.0.0"
SHARED_SSH_TTL: 180
NO_PROXY: "api,frontend"
volumes:
- secret:/run/secrets
- dc-vol:/dc-vol
restart: always
depends_on:
api:
condition: service_healthy
healthcheck:
test: "echo LST | nc -v 127.0.0.1 8765"
start_period: 12s
interval: 10s
api:
<<: *api_common
container_name: api
labels:
netpicker.io: service
service.netpicker.io: api
ports:
- "8000:8000"
restart: always
healthcheck:
test:
[
"CMD",
"python3",
"-c",
"import requests; requests.get('http://localhost:8000/api/v1/status').raise_for_status()",
]
start_period: 60s
interval: 5s
retries: 5
timeout: 10s
celery:
<<: *api_common
depends_on:
api:
condition: service_healthy
container_name: celery
labels:
netpicker.io: service
service.netpicker.io: celery
command: /run-celery
restart: always
healthcheck:
test:
[
"CMD-SHELL",
"CELERY_BROKER_URL=redis://redis celery inspect ping -t 5",
]
start_period: 15s
interval: 30s
db:
image: netpicker/db
container_name: db
labels:
netpicker.io: service
environment:
POSTGRES_PASSWORD: s3rgts0p!
volumes:
- pg_data:/var/lib/postgresql/data
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U netpicker"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
db_migration:
<<: *api_common_no_deps
command: /db-migrate
depends_on:
db:
condition: service_healthy
frontend:
image: "netpicker/tester-frontend:latest"
container_name: frontend
labels:
netpicker.io: service
service.netpicker.io: front-end
ports:
- "80:80"
volumes:
- git:/git
restart: always
depends_on:
- api
gitd:
image: "netpicker/gitd:latest"
container_name: gitd
labels:
netpicker.io: service
service.netpicker.io: gitd
#ports:
#- 9418:9418
restart: always
volumes:
- git:/git
gitdctrl:
image: "netpicker/gitdctrl:latest"
container_name: gitdctrl
labels:
netpicker.io: service
service.netpicker.io: gitdctrl
volumes:
- git:/git
healthcheck:
test: echo "PING" | nc -v localhost 9419
start_period: 5s
interval: 5s
restart: always
kibbitzer:
image: "netpicker/kibbitzer:latest"
container_name: kibbitzer
labels:
netpicker.io: service
service.netpicker.io: kibbitzer
environment:
LOG_LEVEL: INFO
SHENV_API_URL: http://api:8000
SHENV_API_TIMEOUT: 30
SHENV_PRIVILEGED_PLATFORMS: "gigamon_gigavue arista_eos"
SHENV_SHOW_RUN_aruba_os: "show configuration"
SHENV_SHOW_RUN_corvil: "show config"
SHENV_SHOW_RUN_gigamon: "show running"
SHENV_SHOW_RUN_meinberg: "generate_config_backup && cat /var/tmp/lantime_config.backup"
SHENV_SHOW_RUN_mikrotik_routeros: "export"
SHENV_SHOW_RUN_nokia_srl: "info"
SHENV_SHOW_RUN_paloalto_panos: "show config running"
SHENV_TAG_SHOW_RUN_mikrotik_routeros_v7: "export show-sensitive"
healthcheck:
test: echo "ping Mac\n" | nc -v 127.0.0.1 9696
start_period: 15s
interval: 30s
volumes:
- secret:/run/secrets
- transferium:/transferium
# - dc-vol:/dc-vol
- kibbitzer:/celery-worker
- ./textfsm:/textfsm
restart: always
depends_on:
- api
- redis
redis:
image: redis:7-alpine3.21
container_name: redis
labels:
netpicker.io: service
volumes:
- redis:/data
command: "--save 60 1 --loglevel warning"
restart: always
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
swagger:
image: swaggerapi/swagger-ui
container_name: swagger
environment:
SWAGGER_JSON_URL: "/openapi.json"
TRY_IT_OUT_ENABLED: 1
restart: always
depends_on:
- api
syslog-ng:
image: "netpicker/syslog-ng:latest"
container_name: syslog-ng
labels:
netpicker.io: service
service.netpicker.io: syslog-ng
ports:
- 5514:514/udp
- 6601:601/tcp
- 6514:6614/tcp
volumes:
- syslog:/var/lib/syslog-ng
restart: always
depends_on:
- agent
volumes:
config:
dc-vol:
git:
kibbitzer:
pg_data:
policy-data:
redis:
secret:
syslog:
transferium: