-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose-edgex-spiffe-spire.yml
292 lines (291 loc) · 10.5 KB
/
docker-compose-edgex-spiffe-spire.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
########################################################################
# Copyright (c) Intel Corporation 2023
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
networks:
edgex-network:
driver: bridge
services:
oem-ssh-proxy:
build:
context: edgex-res/oem-ssh-proxy
command: docker-entrypoint.sh
container_name: edgex-oem-ssh-proxy
depends_on:
- edgex-core-consul
- edgex-security-bootstrapper
entrypoint:
- /edgex-init/ready_to_run_wait_install.sh
environment:
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
SECRETSTORE_PORT: '8200'
STAGEGATE_BOOTSTRAPPER_HOST: edgex-security-bootstrapper
STAGEGATE_READY_TORUNPORT: '54329'
STAGEGATE_WAITFOR_TIMEOUT: '60s'
# Unique for ssh-proxy
TUNNEL_HOST: <OEM_IP_ADDRESS>
TUNNEL_SSH_PORT: 2223
JOB_REPO_HOST: job-repository
JOB_REPO_PORT: 59784
FILE_SENDER_GATEWAY_HOST: file-sender-gateway
FILE_SENDER_GATEWAY_PORT: 59786
TASK_LAUNCHER_HOST: task-launcher
TASK_LAUNCHER_PORT: 59785
FILE_RECEIVER_GATEWAY_HOST: file-receiver-gateway
FILE_RECEIVER_GATEWAY_PORT: 59783
SECRETSTORE_RUNTIMETOKENPROVIDER_HOST: edgex-security-spiffe-token-provider
SECRETSTORE_RUNTIMETOKENPROVIDER_PORT: 59841
SECURITY_SPIRE_SERVER_HOST: edgex-security-spire-server
SECURITY_SPIRE_SERVER_PORT: 59840
hostname: edgex-oem-ssh-proxy
image: oem-ssh-proxy:latest
networks:
edgex-network:
aliases:
- file-watcher
- data-organizer
- file-sender-oem
- file-receiver-oem
ports:
- 127.0.0.1:59781:59781/tcp
- 127.0.0.1:59782:59782/tcp
- 127.0.0.1:59780:59780/tcp
- 127.0.0.1:59787:59787/tcp
read_only: true
restart: always
security_opt:
- no-new-privileges:true
tmpfs:
- /run
volumes:
- edgex-init:/edgex-init:ro,z
- spire-ca:/srv/spiffe/ca:z
- spire-remote-agent:/srv/spiffe/remote-agent:z
- /tmp/edgex/secrets/spiffe/trust:/tmp/edgex/secrets/spiffe/trust:ro,z
- $PWD/edgex-res/ssh_keys:/root/.ssh
edgex-security-spiffe-token-provider:
command: /security-spiffe-token-provider -cp=consul.http://edgex-core-consul:8500
--registry --confdir=/res
depends_on:
edgex-core-consul:
condition: service_started
edgex-security-bootstrapper:
condition: service_started
edgex-security-spire-agent:
condition: service_started
entrypoint:
- /edgex-init/ready_to_run_wait_install.sh
environment:
API_GATEWAY_HOST: edgex-kong
API_GATEWAY_STATUS_PORT: '8100'
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
SECRETSTORE_PORT: '8200'
SERVICE_HOST: edgex-security-spiffe-token-provider
SPIFFE_ENDPOINTSOCKET: /tmp/edgex/secrets/spiffe/public/api.sock
SPIFFE_TRUSTBUNDLE_PATH: /tmp/edgex/secrets/spiffe/trust/bundle
SPIFFE_TRUSTDOMAIN: edgexfoundry.org
STAGEGATE_BOOTSTRAPPER_HOST: edgex-security-bootstrapper
STAGEGATE_BOOTSTRAPPER_STARTPORT: '54321'
STAGEGATE_DATABASE_HOST: edgex-redis
STAGEGATE_DATABASE_PORT: '6379'
STAGEGATE_DATABASE_READYPORT: '6379'
STAGEGATE_KONGDB_HOST: edgex-kong-db
STAGEGATE_KONGDB_PORT: '5432'
STAGEGATE_KONGDB_READYPORT: '54325'
STAGEGATE_READY_TORUNPORT: '54329'
STAGEGATE_REGISTRY_HOST: edgex-core-consul
STAGEGATE_REGISTRY_PORT: '8500'
STAGEGATE_REGISTRY_READYPORT: '54324'
STAGEGATE_SECRETSTORESETUP_HOST: edgex-security-secretstore-setup
STAGEGATE_SECRETSTORESETUP_TOKENS_READYPORT: '54322'
STAGEGATE_WAITFOR_TIMEOUT: 60s
hostname: edgex-security-spiffe-token-provider
image: edgexfoundry/security-spiffe-token-provider:2.3.0
networks:
edgex-network: { }
ports:
- 127.0.0.1:59841:59841/tcp
read_only: true
restart: always
security_opt:
- no-new-privileges:true
tmpfs:
- /run
user: root:root
volumes:
- edgex-init:/edgex-init:z
- /tmp/edgex/secrets/security-spiffe-token-provider:/tmp/edgex/secrets/security-spiffe-token-provider:z
- /tmp/edgex/secrets/spiffe:/tmp/edgex/secrets/spiffe:z
edgex-security-spire-agent:
command: docker-entrypoint.sh
depends_on:
edgex-security-spire-server:
condition: service_started
entrypoint:
- /edgex-init/ready_to_run_wait_install.sh
environment:
API_GATEWAY_HOST: edgex-kong
API_GATEWAY_STATUS_PORT: '8100'
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
SECRETSTORE_PORT: '8200'
SPIFFE_ENDPOINTSOCKET: /tmp/edgex/secrets/spiffe/public/api.sock
SPIFFE_TRUSTBUNDLE_PATH: /tmp/edgex/secrets/spiffe/trust/bundle
SPIFFE_TRUSTDOMAIN: edgexfoundry.org
STAGEGATE_BOOTSTRAPPER_HOST: edgex-security-bootstrapper
STAGEGATE_BOOTSTRAPPER_STARTPORT: '54321'
STAGEGATE_DATABASE_HOST: edgex-redis
STAGEGATE_DATABASE_PORT: '6379'
STAGEGATE_DATABASE_READYPORT: '6379'
STAGEGATE_KONGDB_HOST: edgex-kong-db
STAGEGATE_KONGDB_PORT: '5432'
STAGEGATE_KONGDB_READYPORT: '54325'
STAGEGATE_READY_TORUNPORT: '54329'
STAGEGATE_REGISTRY_HOST: edgex-core-consul
STAGEGATE_REGISTRY_PORT: '8500'
STAGEGATE_REGISTRY_READYPORT: '54324'
STAGEGATE_SECRETSTORESETUP_HOST: edgex-security-secretstore-setup
STAGEGATE_SECRETSTORESETUP_TOKENS_READYPORT: '54322'
STAGEGATE_WAITFOR_TIMEOUT: 60s
hostname: edgex-security-spire-agent
image: edgexfoundry/security-spire-agent:2.3.0
networks:
edgex-network: { }
pid: host
privileged: true
read_only: true
restart: always
security_opt:
- no-new-privileges:true
tmpfs:
- /run
user: root:root
volumes:
- edgex-init:/edgex-init:z
- spire-agent:/srv/spiffe/agent:z
- spire-ca:/srv/spiffe/ca:z
- /tmp/edgex/secrets/spiffe:/tmp/edgex/secrets/spiffe:z
- /var/run/docker.sock:/var/run/docker.sock:rw
edgex-security-spire-config:
command: docker-entrypoint.sh
container_name: edgex-security-spire-config
depends_on:
edgex-security-spire-agent:
condition: service_started
entrypoint:
- /edgex-init/ready_to_run_wait_install.sh
environment:
API_GATEWAY_HOST: edgex-kong
API_GATEWAY_STATUS_PORT: '8100'
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
SECRETSTORE_PORT: '8200'
SPIFFE_CUSTOM_SERVICES: 'app-file-watcher app-data-organizer app-file-sender-oem app-file-receiver-oem'
SPIFFE_ENDPOINTSOCKET: /tmp/edgex/secrets/spiffe/public/api.sock
SPIFFE_TRUSTBUNDLE_PATH: /tmp/edgex/secrets/spiffe/trust/bundle
SPIFFE_TRUSTDOMAIN: edgexfoundry.org
STAGEGATE_BOOTSTRAPPER_HOST: edgex-security-bootstrapper
STAGEGATE_BOOTSTRAPPER_STARTPORT: '54321'
STAGEGATE_DATABASE_HOST: edgex-redis
STAGEGATE_DATABASE_PORT: '6379'
STAGEGATE_DATABASE_READYPORT: '6379'
STAGEGATE_KONGDB_HOST: edgex-kong-db
STAGEGATE_KONGDB_PORT: '5432'
STAGEGATE_KONGDB_READYPORT: '54325'
STAGEGATE_READY_TORUNPORT: '54329'
STAGEGATE_REGISTRY_HOST: edgex-core-consul
STAGEGATE_REGISTRY_PORT: '8500'
STAGEGATE_REGISTRY_READYPORT: '54324'
STAGEGATE_SECRETSTORESETUP_HOST: edgex-security-secretstore-setup
STAGEGATE_SECRETSTORESETUP_TOKENS_READYPORT: '54322'
STAGEGATE_WAITFOR_TIMEOUT: 60s
hostname: edgex-security-spire-config
image: edgexfoundry/security-spire-config:2.3.0
networks:
edgex-network: { }
read_only: true
restart: always
security_opt:
- no-new-privileges:true
tmpfs:
- /run
user: root:root
volumes:
- edgex-init:/edgex-init:z
- /tmp/edgex/secrets/spiffe:/tmp/edgex/secrets/spiffe:z
- ./edgex-res/seed_builtin_entries.sh:/usr/local/etc/spiffe-scripts.d/seed_builtin_entries.sh
edgex-security-spire-server:
command: docker-entrypoint.sh
depends_on:
edgex-security-bootstrapper:
condition: service_started
entrypoint:
- /edgex-init/ready_to_run_wait_install.sh
environment:
API_GATEWAY_HOST: edgex-kong
API_GATEWAY_STATUS_PORT: '8100'
DATABASES_PRIMARY_HOST: edgex-redis
EDGEX_SECURITY_SECRET_STORE: "true"
MESSAGEQUEUE_HOST: edgex-redis
PROXY_SETUP_HOST: edgex-security-proxy-setup
REGISTRY_HOST: edgex-core-consul
SECRETSTORE_HOST: edgex-vault
SECRETSTORE_PORT: '8200'
SPIFFE_ENDPOINTSOCKET: /tmp/edgex/secrets/spiffe/public/api.sock
SPIFFE_TRUSTBUNDLE_PATH: /tmp/edgex/secrets/spiffe/trust/bundle
SPIFFE_TRUSTDOMAIN: edgexfoundry.org
STAGEGATE_BOOTSTRAPPER_HOST: edgex-security-bootstrapper
STAGEGATE_BOOTSTRAPPER_STARTPORT: '54321'
STAGEGATE_DATABASE_HOST: edgex-redis
STAGEGATE_DATABASE_PORT: '6379'
STAGEGATE_DATABASE_READYPORT: '6379'
STAGEGATE_KONGDB_HOST: edgex-kong-db
STAGEGATE_KONGDB_PORT: '5432'
STAGEGATE_KONGDB_READYPORT: '54325'
STAGEGATE_READY_TORUNPORT: '54329'
STAGEGATE_REGISTRY_HOST: edgex-core-consul
STAGEGATE_REGISTRY_PORT: '8500'
STAGEGATE_REGISTRY_READYPORT: '54324'
STAGEGATE_SECRETSTORESETUP_HOST: edgex-security-secretstore-setup
STAGEGATE_SECRETSTORESETUP_TOKENS_READYPORT: '54322'
STAGEGATE_WAITFOR_TIMEOUT: 60s
hostname: edgex-security-spire-server
image: edgexfoundry/security-spire-server:2.3.0
networks:
edgex-network: { }
pid: host
ports:
- 127.0.0.1:59840:59840/tcp
read_only: true
restart: always
security_opt:
- no-new-privileges:true
tmpfs:
- /run
user: root:root
volumes:
- edgex-init:/edgex-init:z
- spire-ca:/srv/spiffe/ca:z
- spire-server:/srv/spiffe/server:z
- /tmp/edgex/secrets/spiffe:/tmp/edgex/secrets/spiffe:z
volumes:
spire-agent: {}
spire-remote-agent: {}
spire-ca: {}
spire-server: {}