Skip to content

refactor#11

Closed
hlwanghl wants to merge 29 commits into
masterfrom
refactor/4.0
Closed

refactor#11
hlwanghl wants to merge 29 commits into
masterfrom
refactor/4.0

Conversation

@hlwanghl
Copy link
Copy Markdown
Contributor

Signed-off-by: Hongliang Wang hongliangwang@yunify.com

hlwanghl and others added 29 commits October 29, 2019 18:28
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
1 fix bugs (based on Bash set -e)
2 complete: appctl start
doMongoShell: fix param issues
appctl: start, scaleOut
appctl: scaleIn
issue: primary node step down first,when primary node is to be scaled in
trim spaces and returns
post_start_service: true
nodes_to_execute_on: 1
Signed-off-by: Hongliang Wang <hongliangwang@yunify.com>
initNode, initCluster
to-do: add users for authentication
---
mongodb_version: 3.4.17
app_version: 1.0.0
local_cache_path: /tmp No newline at end of file
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好用一个稳定的目录,比如 ~/.ansible/cache

systemLog:
destination: file
path: /data/db/mongod.log
logAppend: true
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syslog/logrotate.

systemLog:
    destination: syslog

replSetName: {{getv "/env/rsName"}}
oplogSizeMB: {{getv "/env/oplogSize"}}
security:
keyFile: /opt/app/current/conf/mongodb/repl.key
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要持久化的文件放在数据盘 /data/mongodb/conf


APPCTL_ENV=

GLOBAL_UUID={{getv "/cluster/global_uuid"}}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看看有没有更隐蔽的字段。

MONGODB_CONF_PATH="/opt/app/current/conf/mongodb"
MONGODB_USER_SYS="qc_master"
MONGODB_USER_ROOT="root"
MONGODB_USER_COMMON={{getv "/env/user"}}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MONGODB_USER_CUSTOM

{{- $ip := printf "/hosts/replica/%s/ip" $dir -}}
'{{getv $sid}}|{{getv $ip}}' {{print}}
{{- end -}})
MONGOSHELL=/opt/mongodb/current/bin/mongo
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runMongoCmd() {
  /opt/mongodb/current/bin/mongo $@
}

@hlwanghl
Copy link
Copy Markdown
Contributor Author

hlwanghl commented Mar 2, 2021

replaced by #13

@hlwanghl hlwanghl closed this Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants