https://doc.polardbx.com/quickstart/topics/quickstart-pxd-cluster.html
#安装 docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
#配置普通用户访问 docker
sudo groupadd docker
sudo gpasswd -a ${USER} docker
newgrp docker
#安装 pxd
pip install -i https://mirrors.aliyun.com/pypi/simple/ pxd
pip install pxd
#安装集群
pxd create -file polardbx.yaml
polardbx.yaml 1cn 3dn 1cdc 1gms
version: v1
type: polardbx
cluster:
name: pxc_test
gms:
image: polardbx/polardbx-engine-2.0:latest
host_group: [127.0.0.1]
cn:
image: polardbx/polardbx-sql:latest
replica: 1
nodes:
- host: 127.0.0.1
resources:
mem_limit: 2G
dn:
image: polardbx/polardbx-engine-2.0:latest
replica: 3
nodes:
- host_group: [127.0.0.1]
- host_group: [127.0.0.1]
- host_group: [127.0.0.1]
resources:
mem_limit: 2G
cdc:
image: polardbx/polardbx-cdc:latest
replica: 1
nodes:
- host: 127.0.0.1
resources:
mem_limit: 2G
标签:127.0,单机,0.1,host,集群,docker,PolarDB,polardbx,pxd
From: https://www.cnblogs.com/manastudent/p/17956316