they all start on the same network yes
here is the compose file i’m trying to use:
version: ‘3’
services:
etcd:
image: quay.io/coreos/etcd
command: etcd
volumes:
- /usr/local/share/ca-certificates/:/etc/ssl/certs
ports:
- “4001:4001”
- “2380:2380”
- “2379:2379”
env_file: .env
networks:
- internaldbnet
deploy:
placement:
constraints: [node.role == manager]
proxy:
image: perconalab/proxysql
networks:
- cicd
- internaldbnet
ports:
- “3306:3306”
- “6032:6032”
env_file: .env
deploy:
mode: replicated
replicas: 3
labels: [APP=proxysql]
service restart policy
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
service update configuration
update_config:
parallelism: 1
delay: 10s
failure_action: continue
monitor: 60s
max_failure_ratio: 0.3
placement constraint - in this case on ‘worker’ nodes only
placement:
constraints: [node.role == worker]
percona-xtradb-cluster:
image: percona/percona-xtradb-cluster:5.6
entrypoint: bash -c “sed -i ‘s/lib64/lib/g’ /etc/mysql/conf.d/node.cnf && /entrypoint.sh”
networks:
- internaldbnet
ports:
- “3306”
env_file: .env
deploy:
mode: replicated
replicas: 3
labels: [APP=pxc]
service restart policy
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
service update configuration
update_config:
parallelism: 1
delay: 10s
failure_action: continue
monitor: 60s
max_failure_ratio: 0.3
placement constraint - in this case on ‘worker’ nodes only
placement:
constraints: [node.role == worker]
networks:
cicd:
Use a custom driver
driver: overlay
ipam:
driver: default
config:
- subnet: 10.20.1.0/24
internaldbnet:
driver: overlay
ipam:
driver: default
config:
- subnet: 10.20.2.0/24
Registration in ETCD goes well, but pxc cluster doesn’t come up 