-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
176 lines (164 loc) · 4.25 KB
/
docker-compose.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
version: "3"
networks:
mylocal:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.10.0.0/22
services:
envoy:
image: docker.pkg.github.com/octu0/example-envoy-xds/envoy:1.21.6
environment:
- ENVOY_XDS_CLUSTER=example0
- ENVOY_XDS_NODE_ID=envoy-node1
- ENVOY_XDS_HOST=10.10.0.101
- ENVOY_XDS_PORT=5000
- ENVOY_XDS_LOCALITY_REGION=asia-northeast1
- ENVOY_XDS_LOCALITY_ZONE=asia-northeast1-a
- ENVOY_ALS_HOST=10.10.0.101
- ENVOY_ALS_PORT=5001
- ENVOY_ADMIN_LISTEN_HOST=0.0.0.0
- ENVOY_ADMIN_LISTEN_PORT=9800
depends_on:
- "xds-001"
ports:
- "8080:8080" # open envoy listener
- "9800:9800" # open envoy admin
networks:
mylocal:
ipv4_address: 10.10.0.100
xds-001:
image: docker.pkg.github.com/octu0/example-envoy-xds/example-envoy-xds:1.0.3
environment:
- XDS_NODE_ID=envoy-node1
- XDS_LISTEN_ADDR=0.0.0.0:5000
- ALS_LISTEN_ADDR=0.0.0.0:5001
- CDS_YAML=/app/vol/cds.yaml
- EDS_YAML=/app/vol/eds.yaml
- RDS_YAML=/app/vol/rds.yaml
- LDS_YAML=/app/vol/lds.yaml
volumes:
- .:/app/vol
command: |
server
networks:
mylocal:
ipv4_address: 10.10.0.101
node-001:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "legacy node-001\n") }}
{{ HandleFunc "/ready" (Text 200 "OK") }}'
ports:
- "3001:3001"
networks:
mylocal:
ipv4_address: 10.10.1.101
node-002:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "legacy node-002\n") }}
{{ HandleFunc "/ready" (Text 200 "OK") }}'
ports:
- "3002:3001"
networks:
mylocal:
ipv4_address: 10.10.1.102
node-003:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "legacy node-003\n") }}
{{ HandleFunc "/ready" (Text 200 "OK") }}'
ports:
- "3003:3001"
networks:
mylocal:
ipv4_address: 10.10.1.103
node-101:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "new node-101\n") }}
{{ HandleFunc "/ready" (Text 200 "OK") }}'
ports:
- "3101:3001"
networks:
mylocal:
ipv4_address: 10.10.2.101
node-102:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "new node-102\n") }}
{{ HandleFunc "/ready" (Text 200 "OK") }}'
ports:
- "3102:3001"
networks:
mylocal:
ipv4_address: 10.10.2.102
node-103:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "new node-103\n") }}
{{ HandleFunc "/ready" (Text 200 "OK") }}'
ports:
- "3103:3001"
networks:
mylocal:
ipv4_address: 10.10.2.103
node-011:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "image node-011\n") }}
{{ HandleFunc "/heartbeat" (Text 200 "OK") }}'
ports:
- "3011:3002"
networks:
mylocal:
ipv4_address: 10.10.3.101
node-012:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "image node-012\n") }}
{{ HandleFunc "/heartbeat" (Text 200 "OK") }}'
ports:
- "3012:3002"
networks:
mylocal:
ipv4_address: 10.10.3.102
node-013:
image: docker.pkg.github.com/octu0/revproxy/revproxy:1.0.0
command: |
server
--port 3001
--template '
{{ HandleFunc "/" (Text 200 "image node-013\n") }}
{{ HandleFunc "/heartbeat" (Text 200 "OK") }}'
ports:
- "3013:3002"
networks:
mylocal:
ipv4_address: 10.10.3.103