Skip to content

Commit a5859a8

Browse files
authored
feat: update docker compose (#582)
Signed-off-by: jyjiangkai <[email protected]>
1 parent 573f724 commit a5859a8

File tree

4 files changed

+93
-24
lines changed

4 files changed

+93
-24
lines changed
Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
name: "standalone"
22
ip: "controller"
33
port: 2048
4-
etcd:
5-
- "controller:2379"
6-
data_dir: "/vanus/data/controller"
7-
gateway_endpoint: "gateway:8080"
8-
segment_capacity: 8388604 # 8MB
9-
topology:
10-
standalone: controller:2048
114
replicas: 1
12-
embed_etcd:
13-
# relative path to ${data_dir} above
14-
data_dir: "etcd"
15-
listen_client_addr: 0.0.0.0:2379
16-
listen_peer_addr: 0.0.0.0:2380
17-
advertise_client_addr: controller:2379
18-
advertise_peer_addr: controller:2380
19-
heartbeat-interval: 600000
20-
election-timeout: 600000
21-
clusters:
22-
- standalone=http://controller:2380
235
secret_encryption_salt: "encryption_salt"
6+
data_dir: "/vanus/data/controller"
7+
gateway_endpoint: "gateway:8080"
8+
segment_capacity: 4194304 # 8MB
9+
root_controllers:
10+
- root-controller:2021
11+
cluster:
12+
component_name: controller
13+
lease_duration_in_sec: 15
14+
etcd:
15+
- etcd:2379
16+
topology:
17+
standalone: controller:2048
2418
observability:
2519
metrics:
2620
enable: true
@@ -29,4 +23,4 @@ observability:
2923
tracing:
3024
enable: false
3125
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
32-
otel_collector: http://127.0.0.1:4318
26+
otel_collector: http://127.0.0.1:4318

deploy/docker-compose/config/prometheus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ scrape_configs:
55
- job_name: 'vanus'
66
static_configs:
77
- targets:
8+
- root-controller:2111
89
- controller:2112
910
- gateway:2113
1011
- store:2114
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "standalone"
2+
ip: "root-controller"
3+
port: 2021
4+
gateway_endpoint: "gateway:8080"
5+
segment_capacity: 4194304 # 8MB
6+
root_controllers:
7+
- root-controller:2021
8+
cluster:
9+
component_name: root-controller
10+
lease_duration_in_sec: 15
11+
etcd:
12+
- etcd:2379
13+
topology:
14+
standalone: root-controller:2021
15+
observability:
16+
metrics:
17+
enable: true
18+
# metrics for prometheus scratch data
19+
port: 2111
20+
tracing:
21+
enable: false
22+
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
23+
otel_collector: http://127.0.0.1:4318

deploy/docker-compose/docker-compose.yml

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,68 @@
11
version: '3'
22
services:
3+
etcd:
4+
hostname: etcd
5+
image: public.ecr.aws/vanus/etcd:v3.5.7
6+
pull_policy: missing
7+
container_name: etcd
8+
deploy:
9+
replicas: 1
10+
restart_policy:
11+
condition: on-failure
12+
privileged: true
13+
volumes:
14+
- "/etcd/data:/opt/bitnami/etcd/data"
15+
environment:
16+
- "ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379"
17+
- "ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379"
18+
- "ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380"
19+
- "ETCD_INITIAL_ADVERTISE_PEER_URLS=http://0.0.0.0:2380"
20+
- "ALLOW_NONE_AUTHENTICATION=yes"
21+
- "ETCD_INITIAL_CLUSTER=node1=http://0.0.0.0:2380"
22+
- "ETCD_NAME=node1"
23+
- "ETCD_DATA_DIR=/opt/bitnami/etcd/data"
24+
ports:
25+
- 2379:2379
26+
- 2380:2380
27+
networks:
28+
- vanus
29+
root-controller:
30+
image: public.ecr.aws/vanus/root-controller:v0.7.0
31+
pull_policy: missing
32+
container_name: root-controller
33+
volumes:
34+
- ./config/root-controller.yaml:/vanus/config/root.yaml
35+
environment:
36+
- "VANUS_LOG_LEVEL=DEBUG"
37+
expose:
38+
- 2021
39+
- 2110
40+
networks:
41+
- vanus
342
controller:
4-
image: public.ecr.aws/vanus/controller:v0.6.0
43+
image: public.ecr.aws/vanus/controller:v0.7.0
44+
pull_policy: missing
545
container_name: controller
646
volumes:
747
- ./config/controller.yaml:/vanus/config/controller.yaml
48+
environment:
49+
- "VANUS_LOG_LEVEL=DEBUG"
850
expose:
951
- 2048
1052
- 2112
1153
networks:
1254
- vanus
55+
depends_on:
56+
- root-controller
1357
store:
1458
container_name: store
15-
image: public.ecr.aws/vanus/store:b7cb025
59+
image: public.ecr.aws/vanus/store:v0.7.0
60+
pull_policy: missing
1661
volumes:
1762
- ./config/store.yaml:/vanus/config/store.yaml
63+
environment:
64+
- "VANUS_LOG_LEVEL=DEBUG"
65+
- "VOLUME_ID=1"
1866
expose:
1967
- 11811
2068
- 2114
@@ -24,7 +72,8 @@ services:
2472
- controller
2573
timer:
2674
container_name: timer
27-
image: public.ecr.aws/vanus/timer:357a882
75+
image: public.ecr.aws/vanus/timer:v0.7.0
76+
pull_policy: missing
2877
volumes:
2978
- ./config/timer.yaml:/vanus/config/timer.yaml
3079
expose:
@@ -36,7 +85,8 @@ services:
3685
- store
3786
trigger:
3887
container_name: trigger
39-
image: public.ecr.aws/vanus/trigger:v0.6.0
88+
image: public.ecr.aws/vanus/trigger:v0.7.0
89+
pull_policy: missing
4090
volumes:
4191
- ./config/trigger.yaml:/vanus/config/trigger.yaml
4292
expose:
@@ -47,7 +97,8 @@ services:
4797
- controller
4898
gateway:
4999
container_name: gateway
50-
image: public.ecr.aws/vanus/gateway:b52b795
100+
image: public.ecr.aws/vanus/gateway:v0.7.0
101+
pull_policy: missing
51102
ports:
52103
- "8080:8080"
53104
- "8081:8081"

0 commit comments

Comments
 (0)