-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-haprox.yml
160 lines (150 loc) · 3.37 KB
/
test-haprox.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
version: "2"
services:
#DHCP SERVER REDE
dhcp_server:
build: ./DHCP_server
container_name: dhcp_server
stdin_open: true
cap_add:
- NET_ADMIN
tty: true
depends_on:
- dns_server
networks:
rede-local:
ipv4_address: 19.19.19.252
#HOST DE PRUEBA PARA REDE
host1:
build: ./host-rede
container_name: host-rede
stdin_open: true
tty: true
cap_add:
- NET_ADMIN
depends_on:
- dhcp_server
- quagga19
networks:
- rede-local
dns_server:
build: ./DNS_server
container_name: dns_server
# entrypoint: service bind9 restart && bash
# command: /etc/init.d/bind9 restart
stdin_open: true
tty: true
networks:
rede-local:
ipv4_address: 19.19.19.253
quagga19:
image: tp7redes_quagga
container_name: quagga19
privileged: true
# ipv4_address: 19.19.19.49
volumes:
- ./Quagga/volumes/routere-quagga:/etc/quagga
networks:
rede-local:
ipv4_address: 19.19.19.254
rede-quagga:
ipv4_address: 10.10.10.3
haproxy:
# image: haproxy:1.7-alpine
build: ./HAproxy/haproxy-alpine
container_name: haproxy
cap_add:
- NET_ADMIN
stdin_open: true
tty: true
volumes:
- ./HAproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
expose:
- "8443"
networks:
rede-local:
ipv4_address: 19.19.19.7
# gateway: 19.19.19.254
#HASTA ACA ES NUESTRO TP
#----------------------------------------------------------------------------------------------
#SERVICIOS PARA PROBAR EL FUNCIONAMIENTO DE NUESTROS SERVICIOS (FALTA PROBAR DNS)
quagga18:
image: tp7redes_quagga
container_name: quagga18
privileged: true
volumes:
- ./Quagga/volumes/test-quagga:/etc/quagga
networks:
rede-quagga:
ipv4_address: 10.10.10.4
redd-local:
ipv4_address: 18.18.18.254
http-server:
build: ./HAproxy/http-server
container_name: http-server
stdin_open: true
tty: true
cap_add:
- NET_ADMIN
# privileged: true
volumes:
- ./HAproxy/http-server/app1.txt:/var/www/app1.txt:ro
expose:
- "8080"
# depends_on:
# - dhcp_server2
networks:
redd-local:
ipv4_address: 18.18.18.10
http-server2:
build: ./HAproxy/http-server
container_name: http-server2
cap_add:
- NET_ADMIN
stdin_open: true
tty: true
# entrypoint: /bin/sh
volumes:
- ./HAproxy/http-server/app2.txt:/var/www/app2.txt:ro
expose:
- "8080"
# depends_on:
# - dhcp_server2
networks:
redd-local:
ipv4_address: 18.18.18.11
host2:
build: ./host-redd
container_name: host-redd
stdin_open: true
tty: true
cap_add:
- NET_ADMIN
depends_on:
- quagga18
networks:
- redd-local
networks:
rede-local:
driver: bridge
ipam:
driver: default
config:
- subnet: 19.19.19.0/24
driver_opts:
com.docker.network.bridge.name: rede-local
redd-local:
driver: bridge
ipam:
driver: default
config:
- subnet: 18.18.18.0/24
driver_opts:
com.docker.network.bridge.name: redd-local
rede-quagga:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.10.10.0/29
driver_opts:
com.docker.network.bridge.name: rede-quagga