-
Notifications
You must be signed in to change notification settings - Fork 264
/
mongo.yml
executable file
·59 lines (56 loc) · 2.32 KB
/
mongo.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env ansible-playbook
---
#==============================================================#
# File : mongo.yml
# Desc : init mongo/ferretdb on pigsty nodes
# Ctime : 2023-08-16
# Mtime : 2023-10-04
# Path : mongo.yml
# Author : Ruohang Feng (rh@vonng.com)
# License : AGPLv3
#==============================================================#
- name: MONGO
become: yes
hosts: all
gather_facts: no
vars:
# mongo_pgurl: 'postgres:///' # mongo/ferretdb underlying postgresql url, required
# mongo_listen: '' # mongo/ferretdb listen address, '' for all addr
# mongo_port: 27017 # mongo/ferretdb listen port, 27017 by default
# mongo_exporter_port: 9216 # mongo/ferretdb exporter port, 9216 by default
# mongo_extra_vars: '' # extra environment variables for mongo/ferretdb
roles:
- { role: node_id , tags: node-id } # get node identity (always)
- { role: ferret , tags: ferret } # init mongo/ferretdb on nodes
#---------------------------------------------------------------
# Usage : https://pigsty.io/docs/ferret/
#---------------------------------------------------------------
# 1. Define mongo/ferret cluster in pigsty.yml
# 2. run ./mongo.yml -l <cls> to deploy mongo/ferret cluster
#
# To remove a mongo cluster:
# ./mongo.yml -e mongo_purge=true -t mongo_purge
#---------------------------------------------------------------
# Example
#---------------------------------------------------------------
# ferret:
# hosts:
# 10.10.10.45: { mongo_seq: 1 }
# 10.10.10.46: { mongo_seq: 2 }
# 10.10.10.47: { mongo_seq: 3 }
# vars:
# mongo_cluster: ferret
# mongo_pgurl: 'postgres://test:test@10.10.10.3:5436/test'
#---------------------------------------------------------------
# Tasks
#---------------------------------------------------------------
# mongo_check : check mongo identity
# mongo_dbsu : create os user mongod
# mongo_install : install mongo/ferretdb rpm
# mongo_purge : purge mongo/ferretdb cluster
# mongo_config : config mongo/ferretdb
# mongo_cert : issue mongo/ferretdb ssl certs
# mongo_launch : launch mongo/ferretdb service
# mongo_register : register mongo/ferretdb to prometheus
#---------------------------------------------------------------
...