refactor#11
Closed
hlwanghl wants to merge 29 commits into
Closed
Conversation
Add Java code sample
Update Java code
adjust direcotry structure
done: cluster.json.mustache,config.json todo: create ansible role of mongodb
done: mongodb binary files, sytemd service todo: mongodb conf file, bash scripts
done: ansible task ( make a basic image for cluster ) todo: implement the cluster event (replicactl.sh)
templates: fix some logical errors coding: doMongoShell
templates: fix some logical errors coding: doMongoShell
…nto appcenter2-dev
trim spaces and returns
post_start_service: true nodes_to_execute_on: 1
initNode, initCluster
to-do: add users for authentication
appctl框架下的可用版本
hlwanghl
commented
Feb 20, 2021
| --- | ||
| mongodb_version: 3.4.17 | ||
| app_version: 1.0.0 | ||
| local_cache_path: /tmp No newline at end of file |
Contributor
Author
There was a problem hiding this comment.
最好用一个稳定的目录,比如 ~/.ansible/cache
| systemLog: | ||
| destination: file | ||
| path: /data/db/mongod.log | ||
| logAppend: true |
Contributor
Author
There was a problem hiding this comment.
syslog/logrotate.
systemLog:
destination: syslog
| replSetName: {{getv "/env/rsName"}} | ||
| oplogSizeMB: {{getv "/env/oplogSize"}} | ||
| security: | ||
| keyFile: /opt/app/current/conf/mongodb/repl.key |
Contributor
Author
There was a problem hiding this comment.
需要持久化的文件放在数据盘 /data/mongodb/conf
|
|
||
| APPCTL_ENV= | ||
|
|
||
| GLOBAL_UUID={{getv "/cluster/global_uuid"}} |
| MONGODB_CONF_PATH="/opt/app/current/conf/mongodb" | ||
| MONGODB_USER_SYS="qc_master" | ||
| MONGODB_USER_ROOT="root" | ||
| MONGODB_USER_COMMON={{getv "/env/user"}} |
Contributor
Author
There was a problem hiding this comment.
MONGODB_USER_CUSTOM
| {{- $ip := printf "/hosts/replica/%s/ip" $dir -}} | ||
| '{{getv $sid}}|{{getv $ip}}' {{print}} | ||
| {{- end -}}) | ||
| MONGOSHELL=/opt/mongodb/current/bin/mongo |
Contributor
Author
There was a problem hiding this comment.
runMongoCmd() {
/opt/mongodb/current/bin/mongo $@
}
Contributor
Author
|
replaced by #13 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Hongliang Wang hongliangwang@yunify.com