通过声明式模版规范,显著降低学习成本及操作复杂度,开发周期从数月缩减至数天甚至数小时,大幅降低云端应用开发、部署及运维复杂度
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20{
"type":"array",
"prototype":
[{
"key":"cluster",
"description":"ZooKeeper cluster properties",
"type":"array",
"properties":[
{
"key":"name",
"label":"name",
"description":"The name of ZooKeeper service",
"type":"string",
"default":"ZooKeeper",
"required":"no"
},
... ...
]
}]
}
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{
"name": {{cluster.name}},
"description": {{cluster.description}},
"vxnet": {{cluster.vxnet}},
"nodes": [
{
"container": {
"type": "kvm",
"zone": "pek3a",
"image": "img-zkv33646"
},
"instance_class": {{cluster.node.instance_class}},
"count": {{cluster.node.count}},
"cpu": {{cluster.node.cpu}},
"memory": {{cluster.node.memory}},
"volume": {
"size": {{cluster.node.memory}} * 4 / 1024 * 10,
"mount_point": "/zk_data",
"filesystem": "xfs"
},
"server_id_upper_bound": 255,
"services": {
"start": {
"cmd": "/opt/zookeeper/bin/zkServer.sh start"
},
"stop": {
"cmd": "/opt/zookeeper/bin/zkServer.sh stop"
}
}
}
],
"advanced_actions": ["change_vxnet", "scale_horizontal"]
}