-
Notifications
You must be signed in to change notification settings - Fork 0
/
6_marathon_consul.sh
45 lines (43 loc) · 1003 Bytes
/
6_marathon_consul.sh
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
# 下面是 marathon_consul.json的格式
# 可以直接通过 Marathon http/v2 API 导入
# 并且在界面上实现弹性扩容
# curl -H "Content-type:application/json" -X POST http://192.168.13.250:8080/v2/apps -d @/root/marathon_consul.json
{
"id": "/marathon-consul",
"cmd": null,
"cpus": 0.1,
"mem": 32,
"disk": 0,
"instances": 3,
"args": [
"--registry=http://192.168.13.250:8500",
"--marathon-location=192.168.13.250:8080"
],
"container": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "ciscocloud/marathon-consul",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 4000,
"hostPort": 31400,
"servicePort": 10000,
"protocol": "tcp",
"labels": {}
}
],
"privileged": false,
"parameters": [],
"forcePullImage": false
}
},
"portDefinitions": [
{
"port": 10000,
"protocol": "tcp",
"labels": {}
}
]
}