暗黑模式
Setup with Ansible
Quick Start
Prerequisites
- Install deps
bash
# On Control Node
pipx install --include-deps ansible #
pip install passlib #
pipx install rust-just # or sudo apt install just
sudo apt install pwgen # pwgen -s 64 1
1
2
3
4
5
2
3
4
5
- Configure firewall
- Configure DNS settings
ess-helm
install pg on dedicated server: install pg
- conf
# ~/17/data/pg_hba.conf host all all 10.33.12.111/32 scram-sha-256
1
2bash# in postgres user /usr/pgsql-17/bin/pg_ctl reload
1
2 Config elementWeb/synapse ...
Install
bash
helm upgrade --install --namespace "ess" ess oci://ghcr.io/element-hq/ess-helm/matrix-stack -f ~/ess-config-values/hostnames.yaml -f ~/ess-config-values/tls.yaml -f ~/ess-config-values/postgresql.yaml --wait
1
bash
# rocky linux
dnf install git tar # required for install helm
1
2
2
WARNING
kubectl create namespace ess
: 报错 The connection to the server localhost:8080 was refused
bash
cp /etc/rancher/k3s/k3s.yaml .kube/config
kubectl create namespace ess
1
2
2
如果 helm upgrade
失败,请检查日志:kubectl get events -n ess --sort-by=.metadata.creationTimestamp
可能是自部署的 postgres 无法联通
pg
bash
# /home/postgres/17/data/postgresql.conf
listen_addresses = 'xx.xx.xx.xx'
1
2
2
bash
[
"postgres",
"-c",
"max_connections=500",
"-c",
"shared_buffers=2611MB",
"-c",
"effective_cache_size=7834MB",
"-c",
"maintenance_work_mem=652MB",
"-c",
"checkpoint_completion_target=0.9",
"-c",
"wal_buffers=16MB",
"-c",
"default_statistics_target=100",
"-c",
"random_page_cost=1.1",
"-c",
"effective_io_concurrency=200",
"-c",
"work_mem=1337kB",
"-c",
"huge_pages=off",
"-c",
"min_wal_size=1024MB",
"-c",
"max_wal_size=4096MB",
"-c",
"max_worker_processes=16",
"-c",
"max_parallel_workers=16",
"-c",
"max_parallel_workers_per_gather=4",
"-c",
"max_parallel_maintenance_workers=4"
]
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
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
服务器调整
# /etc/sysctl.d/xxx.conf
# 文件描述符限制
fs.file-max=1000000
# this sets the max, so that we can bump the JVB UDP single port buffer size.
net.core.rmem_max=10485760
net.core.netdev_max_backlog=100000
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
bash
sudo sysctl -p
1