-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.py39.yaml
224 lines (218 loc) · 6.35 KB
/
docker-compose.py39.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
services:
salt-master:
container_name: salt-master
hostname: 'salt-master'
privileged: True
security_opt:
- seccomp:unconfined
- apparmor:unconfined
cap_add:
- SYS_PTRACE
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.py39.master
networks:
net0:
ipv4_address: 10.0.0.2
volumes:
# bind folder with tests to salt-master container
- type: bind
source: ./test/pytest/
target: /tmp/pytest/
# bind folder with salt-master configuration to salt-master container
- type: bind
source: ./test/salt_master_files/
target: /etc/salt/
# bind Salt Nornir packages for the ease of development/debugging
- type: bind
source: ./salt_nornir/
target: /usr/local/lib/python3.9/site-packages/salt_nornir/
- type: bind
source: ../nornir_salt/nornir_salt/
target: /usr/local/lib/python3.9/site-packages/nornir_salt/
# bind local folder to salt-master in case need to pip install nornir-salt
- type: bind
source: ../nornir_salt/
target: /tmp/nornir_salt/
- type: bind
source: .
target: /tmp/salt_nornir/
# bind PICLE package for development
- type: bind
source: ../PICLE/picle
target: /usr/local/lib/python3.9/site-packages/picle/
salt-minion-nrp1:
container_name: salt-minion-nrp1
hostname: 'salt-minion-nrp1'
privileged: True
security_opt:
- seccomp:unconfined
- apparmor:unconfined
cap_add:
- SYS_PTRACE
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.py39.minion
environment:
PROXY_ID: "nrp1"
networks:
net0:
ipv4_address: 10.0.0.3
net1:
ipv4_address: 10.0.1.3
depends_on:
- salt-master
volumes:
# bind Salt Nornir packages for the ease of development/debugging
- type: bind
source: ./salt_nornir/
target: /usr/local/lib/python3.9/site-packages/salt_nornir/
- type: bind
source: ../nornir_salt/nornir_salt/
target: /usr/local/lib/python3.9/site-packages/nornir_salt/
# bind local folder to salt-minion in case need to pip install nornir-salt
- type: bind
source: ../nornir_salt/
target: /tmp/nornir_salt/
- type: bind
source: .
target: /tmp/salt_nornir/
# bind TTP Templates package for development
- type: bind
source: ../TTP_templates/ttp_templates
target: /usr/local/lib/python3.9/site-packages/ttp_templates/
salt-minion-nrp2:
container_name: salt-minion-nrp2
hostname: 'salt-minion-nrp2'
# privileged: True
# security_opt:
# - seccomp:unconfined
# - apparmor:unconfined
# cap_add:
# - SYS_PTRACE
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.py39.minion
environment:
PROXY_ID: "nrp2"
networks:
net0:
ipv4_address: 10.0.0.6
net1:
ipv4_address: 10.0.1.6
depends_on:
- salt-master
volumes:
# bind Salt Nornir packages for the ease of development/debugging
- type: bind
source: ./salt_nornir/
target: /usr/local/lib/python3.9/site-packages/salt_nornir/
- type: bind
source: ../nornir_salt/nornir_salt/
target: /usr/local/lib/python3.9/site-packages/nornir_salt/
# bind local folder to salt-minion in case need to pip install nornir-salt
- type: bind
source: ../nornir_salt/
target: /tmp/nornir_salt/
- type: bind
source: .
target: /tmp/salt_nornir/
# bind TTP Templates package for development
- type: bind
source: ../TTP_templates/ttp_templates
target: /usr/local/lib/python3.9/site-packages/ttp_templates/
salt-minion-nrp3:
container_name: salt-minion-nrp3
hostname: 'salt-minion-nrp3'
# privileged: True
# security_opt:
# - seccomp:unconfined
# - apparmor:unconfined
# cap_add:
# - SYS_PTRACE
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.py39.minion
environment:
PROXY_ID: "nrp3"
networks:
net0:
ipv4_address: 10.0.0.7
net1:
ipv4_address: 10.0.1.7
depends_on:
- salt-master
volumes:
# bind Salt Nornir packages for the ease of development/debugging
- type: bind
source: ./salt_nornir/
target: /usr/local/lib/python3.9/site-packages/salt_nornir/
- type: bind
source: ../nornir_salt/nornir_salt/
target: /usr/local/lib/python3.9/site-packages/nornir_salt/
# bind local folder to salt-minion in case need to pip install nornir-salt
- type: bind
source: ../nornir_salt/
target: /tmp/nornir_salt/
- type: bind
source: .
target: /tmp/salt_nornir/
# bind TTP Templates package for development
- type: bind
source: ../TTP_templates/ttp_templates
target: /usr/local/lib/python3.9/site-packages/ttp_templates/
ceos1:
container_name: ceos1
hostname: 'ceos1'
privileged: true
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.ceos1
networks:
# need ceos-dummy as its assigned to linux OS so that
# second network assigned to cEOS instance
ceos-dummy: {}
net1:
ipv4_address: 10.0.1.4
ceos2:
container_name: ceos2
hostname: 'ceos2'
privileged: true
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.ceos2
networks:
ceos-dummy: {}
net1:
ipv4_address: 10.0.1.5
salt-nornir-fakenos:
container_name: salt-nornir-fakenos
hostname: 'salt-nornir-fakenos'
privileged: true
build:
context: ..
dockerfile: salt_nornir/test/Dockerfile.py39.fakenos
volumes:
# bind fakenos inventory
- type: bind
source: ./test/fakenos_inventory/
target: /tmp/fakenos_inventory/
# bind FakeNOS packages for the ease of development/debugging
- type: bind
source: ../fakenos/fakenos/
target: /usr/local/lib/python3.9/site-packages/fakenos/
networks:
ceos-dummy: {}
net1:
ipv4_address: 10.0.1.10
networks:
net0:
ipam:
config:
- subnet: 10.0.0.0/24
gateway: 10.0.0.1
net1:
ipam:
config:
- subnet: 10.0.1.0/24
ceos-dummy: {}