1 Star 0 Fork 13

画画/pigsty

forked from Gitee 极速下载/pigsty 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pgsql.yml 2.35 KB
一键复制 编辑 原始数据 按行查看 历史
Vonng 提交于 2021-07-06 19:49 . refactor infra & pgsql playbooks
#!/usr/bin/env ansible-playbook
---
#==============================================================#
# File : pgsql.yml
# Mtime : 2020-05-12
# Mtime : 2021-07-06
# Desc : init postgres cluster/instance
# Path : pgsql.yml
# Copyright (C) 2018-2021 Ruohang Feng ([email protected])
#==============================================================#
#==============================================================#
# Playbook : Init PGSQL Cluster/Instance
#==============================================================#
# Init cluster `pg-test`
# pgsql.yml -l pg-test
#
# Init instance (10.10.10.13) among cluster `pg-test`
# pgsql.yml -l 10.10.10.13
#
# Re-init postgres instance only on node 10.10.10.13
# pgsql.yml -l10.10.10.13 --tags=postgres
#
# Re-deploy monitor component
# pgsql.yml --tags=monitor
#
# Replace exporter with new binary version
# pgsql.yml --tags=monitor -e exporter_install=binary
#
# Refresh (haproxy) services
# pgsql.yml --tags=service
#
# Refresh HBA rules
# pgsql.yml --tags=pg_hba
#
# Register cluster/instance to infrastructure
# pgsql.yml --tags=register # register all
# pgsql.yml --tags=register_consul # service discovery
# pgsql.yml --tags=register_prometheus # monitor target
# pgsql.yml --tags=register_grafana # pgsql datasource
# pgsql.yml --tags=register_nginx # haproxy admin page
#==============================================================#
#---------------------------------------------------------------
- name: Infra Init # init infra on common database node
become: yes
hosts: all
gather_facts: no
tags: infra
roles:
- role: node # init common database node
tags: node
- role: consul # init dcs:consul clients
tags: [ dcs , consul ]
#---------------------------------------------------------------
- name: Pgsql Init # init postgres cluster/instance
become: yes
hosts: all
gather_facts: no
tags: pgsql
roles:
- role: postgres # init postgres pgbouncer patroni
tags: postgres
- role: monitor # init monitor exporters
tags: monitor
- role: service # init service , lb , vip
tags: service
- role: register # register cluster/instance to infra
tags: register
#---------------------------------------------------------------
...
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/genweihua/pigsty.git
[email protected]:genweihua/pigsty.git
genweihua
pigsty
pigsty
master

搜索帮助