Skip to content

Commit 562e4a9

Browse files
committed
modify README.md.
1 parent 8b6e675 commit 562e4a9

2 files changed

Lines changed: 68 additions & 5 deletions

File tree

README.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Cloudtask InitConfig
22

3-
The cloudtask platform initialize configuration tool.
3+
The cloudtask platform initialize configuration tool.
4+
5+
It sets the system common configuration parameters to the zookeeper path.
6+
7+
cloudtask zookeeper configuration path is `/cloudtask/ServerConfig`
48

59
### Dependencies
610

@@ -15,6 +19,26 @@ The cloudtask platform initialize configuration tool.
1519
$ ./cloudtask-initconfig -f ./ServerConfig.json
1620
```
1721

22+
### Output Successed
23+
``` bash
24+
2018/03/16 15:07:29 Connected to 192.168.2.80:2181
25+
2018/03/16 15:07:29 Authenticated: id=99692315792834560, timeout=15000
26+
2018/03/16 15:07:29 Re-submitting `0` credentials after reconnect
27+
zookeeper path: /cloudtask/ServerConfig
28+
2018/03/16 15:07:30 Recv loop terminated: err=EOF
29+
serverconfig: {"websitehost":"192.168.2.80:8091","centerhost":"192.168.2.80:8985","storagedriver":{"mongo":{"auth":{"password":"ds4dev","user":"datastoreAdmin"},"database":"cloudtask","hosts":"192.168.2.80:27017,192.168.2.81:27017,192.168.2.82:27017","options":["maxPoolSize=20","replicaSet=mgoCluster","authSource=admin"]}}}
30+
31+
2018/03/16 15:07:30 Send loop terminated: err=<nil>
32+
initconfig to zookeeper successed!
33+
```
34+
35+
### Checking Zookeeper OK?
36+
``` bash
37+
$ ./zkCli.sh -server 192.168.2.80
38+
[zk: 192.168.2.80(CONNECTED) 0] get /cloudtask/ServerConfig
39+
{"websitehost":"192.168.2.80:8091","centerhost":"192.168.2.80:8985","storagedriver":{"mongo":{"auth":{"password":"ds4dev","user":"datastoreAdmin"},"database":"cloudtask","hosts":"192.168.2.80:27017,192.168.2.81:27017,192.168.2.82:27017","options":["maxPoolSize=20","replicaSet=mgoCluster","authSource=admin"]}}}
40+
```
41+
1842
### ServerConfig.json
1943

2044
``` json
@@ -24,8 +48,8 @@ $ ./cloudtask-initconfig -f ./ServerConfig.json
2448
"root": "/cloudtask"
2549
},
2650
"serverconfig": {
27-
"websitehost": "192.168.2.80:8091",
28-
"centerhost": "192.168.2.80:8985",
51+
"websitehost": "http://192.168.2.80:8091",
52+
"centerhost": "http://192.168.2.80:8985",
2953
"storagedriver": {
3054
"mongo": {
3155
"hosts": "192.168.2.80:27017,192.168.2.81:27017,192.168.2.82:27017",
@@ -43,4 +67,43 @@ $ ./cloudtask-initconfig -f ./ServerConfig.json
4367
}
4468
}
4569
}
70+
```
71+
72+
- zookeeper
73+
`hosts`: set the zookeeper cluster hosts address to ensure that the state is running.
74+
`root`: cloudtask zookeeper root path.
75+
- serverconfig
76+
`websitehost`: cloudtask-web http address.
77+
`centerhost`: cloudtask-center scheduler http address.
78+
`storagedriver`: mongodb drvier cluster configs, currently only supports mongodb database, `mongo` key is `Required`.
79+
`mongo.hosts`: set the mongodb cluster hosts address.
80+
`mongo.database`: cloudtask database name.
81+
`mongo.auth`: mongodb database safety certificate, if no security certificate, please ignorable 'auth' key.
82+
`mongo.options`: mongodb cluster more k/v pair options, please see https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options
83+
84+
85+
### Example Mongo Driver No Security Setting
86+
87+
``` json
88+
{
89+
"zookeeper": {
90+
"hosts": "192.168.2.80:2181,192.168.2.81:2181,192.168.2.82:2181",
91+
"root": "/cloudtask"
92+
},
93+
"serverconfig": {
94+
"websitehost": "http://192.168.2.80:8091",
95+
"centerhost": "http://192.168.2.80:8985",
96+
"storagedriver": {
97+
"mongo": {
98+
"hosts": "192.168.2.80:27017,192.168.2.81:27017,192.168.2.82:27017",
99+
"database": "cloudtask",
100+
"options": [
101+
"maxPoolSize=20",
102+
"replicaSet=mgoCluster",
103+
"authSource=admin"
104+
]
105+
}
106+
}
107+
}
108+
}
46109
```

ServerConfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"root": "/cloudtask"
55
},
66
"serverconfig": {
7-
"websitehost": "192.168.2.80:8091",
8-
"centerhost": "192.168.2.80:8985",
7+
"websitehost": "http://192.168.2.80:8091",
8+
"centerhost": "http://192.168.2.80:8985",
99
"storagedriver": {
1010
"mongo": {
1111
"hosts": "192.168.2.80:27017,192.168.2.81:27017,192.168.2.82:27017",

0 commit comments

Comments
 (0)