forked from pgsty/pigsty
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslim.yml
More file actions
executable file
·79 lines (70 loc) · 2.42 KB
/
slim.yml
File metadata and controls
executable file
·79 lines (70 loc) · 2.42 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env ansible-playbook
---
#==============================================================#
# File : slim.yml
# Desc : pure postgres installation with out infra
# Ctime : 2024-09-02
# Mtime : 2025-12-15
# Path : slim.yml
# Docs : https://doc.pgsty.com/install/minimal
# License : Apache-2.0 @ https://pigsty.io/docs/about/license/
# Copyright : 2018-2026 Ruohang Feng / Vonng (rh@vonng.com)
#==============================================================#
# The minimal installation focus on Pure HA-PostgreSQL Cluster
# It only install essential components for this purpose
#
# There's NO Infra modules, No monitoring, No software repo
# Just partial of NODE module, along with ETCD & PGSQL modules
#
# Systemd Service Installed in this mode:
#
# patroni, pgbouncer, vip-manager, haproxy, etcd, chronyd, tuned
#---------------------------------------------------------------
# setup node & pgsql identity
#---------------------------------------------------------------
- name: IDENTITY
hosts: all
gather_facts: no
tags: id
roles:
- { role: node_id ,tags: node-id }
- { role: pg_id ,tags: pg-id ,when: pg_cluster is defined }
#---------------------------------------------------------------
# Setup local CA
#---------------------------------------------------------------
- name: CA
become: yes
hosts: localhost
gather_facts: no
tags: ca
roles: [ { role: ca } ]
#---------------------------------------------------------------
# init node and haproxy
#---------------------------------------------------------------
- name: NODE INIT
become: yes
hosts: all
gather_facts: no
tags: node
roles:
- { role: node , tags: node } # prepare node for pigsty
- { role: haproxy , tags: haproxy } # init haproxy optional
#---------------------------------------------------------------
# ETCD INIT
#---------------------------------------------------------------
- name: ETCD INIT
become: yes
hosts: etcd
gather_facts: no
tags: etcd
roles: [ { role: etcd } ] # init etcd on fixed group 'etcd'
#---------------------------------------------------------------
# INIT PGSQL
#---------------------------------------------------------------
- name: PGSQL INIT # init pgsql on all nodes
become: yes # with pg_cluster defined
hosts: all
gather_facts: no
tags: pgsql
roles: [ { role: pgsql ,when: pg_cluster is defined } ]
...