-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-exabgpremote.yml
188 lines (174 loc) · 4.11 KB
/
docker-compose-exabgpremote.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
version: "3"
services:
fod:
image: flowspydjango
#command: /opt/FOD/pythonenv gunicorn -b 0.0.0.0:8000 flowspy.wsgi -w 10 -k gevent --limit-request-fields 10000 --timeout 30 --graceful-timeout 25
command: sh -c '. ./docker-compose/.env_fod-exabgpremote; exec /opt/FOD/pythonenv ./manage.py runserver 0.0.0.0:8000'
container_name: fod
depends_on:
- celery
privileged: true
expose:
- "8000"
ports:
- "0.0.0.0:8000:8000"
env_file:
- ./docker-compose/.env_fod-exabgpremote
networks:
mgmt:
xfod:
ipv4_address: 10.197.36.2
volumes:
- ./:/opt/FOD
celery:
build:
context: .
dockerfile: docker-compose/Dockerfile_FOD
image: flowspydjango
command: sh -c '. ./docker-compose/.env_fod-exabgpremote; /opt/setup_environment.sh && while ! mysqladmin -h db ping; do echo "DB not yet ready, waiting 1 sec"; sleep 1; done && echo "database is ready" && /opt/FOD/pythonenv ./manage.py migrate && exec /opt/FOD/pythonenv ./manage.py celery_worker'
container_name: celeryfod
depends_on:
- db
privileged: true
env_file:
- ./docker-compose/.env_fod-exabgpremote
networks:
mgmt:
xfod:
ipv4_address: 10.197.36.6
volumes:
- ./:/opt/FOD
healthcheck:
test: /opt/FOD/pythonenv celery -b redis://redis/0 inspect ping
interval: 30s
timeout: 20s
retries: 3
#start_period: 30s
exabgp1:
build:
context: ./exabgp-remote
image: fodexabgp
container_name: fodexabgp
networks:
mgmt:
xfod:
ipv4_address: 10.197.36.8
environment:
FOD_API_URL: "http://fod:8000/api"
FOD_API_TOKEN: "deb3252a1435302dd579448b792ee7fae57641b6"
LOCAL_NODEID: "10.197.36.8"
LOCAL_IP: "10.197.36.8"
LOCAL_ASN: "1001"
REMOTE_NODEID: "10.197.36.3"
REMOTE_IP: "10.197.36.3"
REMOTE_ASN: "2001"
volumes:
- ./exabgp-remote:/opt/exabgp
command: sh -c "pwd; ls; supervisord -c ./fod_exabgp_supervisord.conf"
redis:
image: redis:latest
networks:
mgmt:
xfod:
ipv4_address: 10.197.36.5
db:
image: mariadb:latest
networks:
mgmt:
xfod:
ipv4_address: 10.197.36.7
environment:
- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=yes
- MARIADB_DATABASE=fod
volumes:
- db-data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", 'mysqladmin ping']
interval: 10s
timeout: 2s
retries: 10
freertr:
build:
context: docker-compose
dockerfile: Dockerfile_FREERTR
container_name: freertr
privileged: true
expose:
- "23"
ports:
- "127.0.0.1:2323:2323"
env_file:
- ./docker-compose/.env_freertr
networks:
mgmt:
nhost1:
ipv4_address: 10.1.10.3
nhost2:
ipv4_address: 10.2.10.3
xfod:
ipv4_address: 10.197.36.3
depends_on:
- fod
volumes:
- freertr:/opt
- ./freertr/run:/rtr/run/
host1:
build:
context: docker-compose
dockerfile: Dockerfile_HOST1
container_name: host1
privileged: true
env_file:
- ./docker-compose/.env_host1
networks:
mgmt:
nhost1:
ipv4_address: 10.1.10.11
depends_on:
- fod
#volumes:
# - freertr:/opt
host2:
build:
context: docker-compose
dockerfile: Dockerfile_HOST2
container_name: host2
privileged: true
env_file:
- ./docker-compose/.env_host2
networks:
mgmt:
nhost2:
ipv4_address: 10.2.10.12
depends_on:
- fod
#volumes:
# - freertr:/opt
networks:
mgmt:
driver: bridge
ipam:
driver: default
config:
- subnet: 11.11.11.0/24
xfod:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.197.36.0/28
nhost1:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.1.10.0/24
nhost2:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.2.10.0/24
volumes:
freertr:
db-data: