-
Notifications
You must be signed in to change notification settings - Fork 12
/
cluster.aliyun.usertag.yml
163 lines (150 loc) · 4.19 KB
/
cluster.aliyun.usertag.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
clusterby: swarm
master: usertag-master-1
discovery: consul://101.200.173.242:8500/usertag
machine:
os: ubuntu-14.04-64
cloud:
aliyun:
options: --aliyun-security-group-id usertag --engine-install-url https://get.daocloud.io/docker/ --engine-insecure-registry 123.57.88.212:5000 --swarm-image 123.57.88.212:5000/tangyang/swarm
globaloptions: --native-ssh
default: true
virtualbox:
options: --engine-insecure-registry 123.57.88.212:5000 --swarm-image 123.57.88.212:5000/library/swarm
globaloptions: --native-ssh
topology:
# consulcluster:
# minnum: 3
# maxnum: 3
# cpu: 1
# memory: 1g
# disk:
# type: ssd
# capacity: 20g
# region: cn-beijing
# init: touch ~/hello
# driveropts:
# consul: false
# group: consulcluster
- group: usertag-master
minnum: 1
maxnum: 1
cpu: 2
memory: 2g
disk:
type: ssd
capacity: 20g
region: cn-beijing
init: touch ~/hello
driveropts:
consul: false
- group: usertag-frontend
minnum: 1
maxnum: 1
cpu: 1
memory: 1g
disk:
type: ssd
capacity: 10240m
region: cn-beijing
init: touch ~/hello
driveropts:
consul: false
- group: usertag-nginx
minnum: 1
maxnum: 1
cpu: 1
memory: 1g
disk:
type: ssd
capacity: 20g
region: cn-beijing
init: touch ~/hello
driveropts:
consul: true
- group: usertag-redis
minnum: 2
maxnum: 2
cpu: 1
memory: 1g
disk:
type: ssd
capacity: 20g
region: cn-beijing
consul: true
container:
topology:
# - group: usertag-nginx
# port: 8408:8408
# num: 1
# # image: 123.57.88.212:5000/weibo/nginx
# image: 123.57.88.212:5000/tangyang/usertag-nginx
# restart: false
# url: if.nginx
# machine: usertag-nginx
# volums:
# - /var:/var
- group: usertag-haproxy
port: 8090:8090
num: 1
image: 123.57.88.212:5000/tangyang/haproxy-consul
restart: false
url: if.haproxy
machine: usertag-nginx
volums:
- /var:/var
- group: usertag-frontend
port: 40000~50000:8080
num: 1
image: 123.57.88.212:5000/xxxxx_rd_user/user_tag:1.2-SNAPSHOT
prestop: touch ~/503 # execute some shell commands on the machine, not in container, before stop the service
poststart: touch ~/200
restart: true
servicediscover: haproxy-consul
machine: usertag-frontend
- group: usertag-redis-first-{port}
port: 8861|8862:6379
num: 1
image: 123.57.88.212:5000/library/redis
restart: false
url: first.rm{port}
machine: usertag-redis
env:
- REDIS_PASS=**None**
- group: usertag-redis-second-{port}
port: 8861|8862:6379
num: 1
image: 123.57.88.212:5000/library/redis
restart: false
url: second.rm{port}
machine: usertag-redis
env:
- REDIS_PASS=**None**
servicediscover:
# webnginx:
# driver: nginx-push
# upstream: discover
# container: usertag-nginx
# webnginx:
# driver: nginx-consul
# upstream: usertag
# container: usertag-nginx
haproxy-consul:
driver: haproxy-consul
container: usertag-haproxy
service: usertag
consulcluster:
server:
service: weibo
image: 123.57.88.212:5000/progrium/consul
domain: weibo
ips:
- 101.200.173.242
nodes:
# - consulcluster-1
# - consulcluster-2
# - consulcluster-3
machine: consulcluster
agent:
image: 123.57.88.212:5000/progrium/consul
registrator:
image: 123.57.88.212:5000/progrium/registrator