-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
137 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
zk_version: 3.4.14 | ||
zk_version: 3.5.7 | ||
zkrest_version: 3.4.14 |
2 changes: 1 addition & 1 deletion
2
ansible/roles/zookeeper/files/etc/confd/templates/zookeeper.sh/02.java.env.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 11 additions & 29 deletions
40
ansible/roles/zookeeper/files/etc/confd/templates/zookeeper.sh/03.zoo.cfg.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,16 @@ | ||
firstJoiningNode="${joiningNodes%% *}" | ||
|
||
flush /opt/app/conf/zookeeper/zoo.cfg << ZOO_CONF_EOF | ||
tickTime={{getv "/env/tickTime" "2000"}} | ||
initLimit={{getv "/env/initLimit" "10"}} | ||
syncLimit={{getv "/env/syncLimit" "5"}} | ||
tickTime={{ getv "/env/tickTime" "2000" }} | ||
initLimit={{ getv "/env/initLimit" "10" }} | ||
syncLimit={{ getv "/env/syncLimit" "5" }} | ||
dataDir=/data/zookeeper | ||
clientPort={{getv "/cluster/endpoints/client/port" "2181"}} | ||
maxClientCnxns={{getv "/env/maxClientCnxns" "1000"}} | ||
autopurge.snapRetainCount={{getv "/env/autopurge.snapRetainCount" "3"}} | ||
autopurge.purgeInterval={{getv "/env/autopurge.purgeInterval" "0"}} | ||
clientPort={{ getv "/cluster/endpoints/client/port" "2181" }} | ||
maxClientCnxns={{ getv "/env/maxClientCnxns" "1000" }} | ||
autopurge.snapRetainCount={{ getv "/env/autopurge.snapRetainCount" "3" }} | ||
autopurge.purgeInterval={{ getv "/env/autopurge.purgeInterval" "1" }} | ||
4lw.commands.whitelist=mntr,{{ getv "/env/4lw.commands.whitelist" "" }} | ||
admin.enableServer={{ getv "/env/admin.server.enabled" "true" }} | ||
tcpKeepAlive={{ getv "/env/tcpKeepAlive" "false" }} | ||
|
||
{{- range $allNodes }} | ||
{{- if not ($joiningNodes | filter .) }} | ||
server.{{ if $usingGsid }}{{ getv (printf "/hosts/%s/gsid" .) }}{{ else }}{{ getv (printf "/hosts/%s/sid" .) }}{{ end }}={{ getv (printf "/hosts/%s/ip" .) }}:2888:3888 | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- $mySid := getv "/host/sid" }} | ||
{{- range $joiningNodes }} | ||
{{- $sid := getv (printf "/adding-hosts/%s/sid" .) }} | ||
{{- if le $sid $mySid }} | ||
server.{{ if $usingGsid }}{{ getv (printf "/adding-hosts/%s/gsid" .) }}{{ else }}{{ $sid }}{{ end }}={{ getv (printf "/adding-hosts/%s/ip" .) }}:2888:3888 | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- if $joiningNodes }} | ||
{{- if and (not ($joiningNodes | filter (getv "/host/instance_id"))) (eq (sub (len $allNodes) (len $joiningNodes)) 1) }} | ||
server.${firstJoiningNode%%/*}=${firstJoiningNode##*/}:2888:3888 | ||
{{- end }} | ||
{{- end }} | ||
standaloneEnabled=false | ||
reconfigEnabled=false | ||
dynamicConfigFile=/opt/app/conf/zookeeper/zoo.dynamic.cfg | ||
ZOO_CONF_EOF |
23 changes: 23 additions & 0 deletions
23
ansible/roles/zookeeper/files/etc/confd/templates/zookeeper.sh/04.zoo.dynamic.cfg.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
firstJoiningNode="${joiningNodes%% *}" | ||
|
||
flush /opt/app/conf/zookeeper/zoo.dynamic.cfg << ZOO_DYNAMIC_CONF_EOF | ||
{{- range $allNodes }} | ||
{{- if not ($joiningNodes | filter .) }} | ||
server.{{ if $usingGsid }}{{ getv (printf "/hosts/%s/gsid" .) }}{{ else }}{{ getv (printf "/hosts/%s/sid" .) }}{{ end }}={{ getv (printf "/hosts/%s/ip" .) }}:2888:3888 | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- $mySid := getv "/host/sid" }} | ||
{{- range $joiningNodes }} | ||
{{- $sid := getv (printf "/adding-hosts/%s/sid" .) }} | ||
{{- if le $sid $mySid }} | ||
server.{{ if $usingGsid }}{{ getv (printf "/adding-hosts/%s/gsid" .) }}{{ else }}{{ $sid }}{{ end }}={{ getv (printf "/adding-hosts/%s/ip" .) }}:2888:3888 | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- if $joiningNodes }} | ||
{{- if and (not ($joiningNodes | filter (getv "/host/instance_id"))) (eq (sub (len $allNodes) (len $joiningNodes)) 1) }} | ||
server.${firstJoiningNode%%/*}=${firstJoiningNode##*/}:2888:3888 | ||
{{- end }} | ||
{{- end }} | ||
ZOO_DYNAMIC_CONF_EOF |
1 change: 1 addition & 0 deletions
1
ansible/roles/zookeeper/files/opt/app/bin/envs/node-zookeeper.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NODE_CTL="zookeeper" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
8 changes: 0 additions & 8 deletions
8
ansible/roles/zookeeper/files/opt/app/conf/zkrest/keys/README
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file.
28 changes: 0 additions & 28 deletions
28
ansible/roles/zookeeper/files/opt/app/conf/zookeeper/zoo_sample.cfg
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.