fuel-ccp-galera/service/galera.yaml

93 lines
2.3 KiB
YAML

dsl_version: 0.2.0
service:
name: {{ service.database }}
antiAffinity: local
ports:
- {{ percona.port }}
containers:
- name: galera-checker
image: galera-checker
volumes:
- name: mysql-storage
path: "/var/lib/mysql"
type: host
readOnly: true
daemon:
files:
- galera-checker
dependencies:
- etcd
command: "/opt/ccp/bin/galera_checker.py"
- name: galera-haproxy
image: galera-haproxy
probes:
readiness: "/opt/ccp/bin/haproxy_entrypoint.py readiness"
pre:
- name: mkdir-run
command: "sudo /bin/mkdir /run/haproxy"
- name: chown-run
command: "sudo /bin/chown -R haproxy: /run/haproxy"
daemon:
files:
- haproxy-conf
- haproxy_entrypoint
dependencies:
- etcd
command: "/opt/ccp/bin/haproxy_entrypoint.py daemon"
- name: galera
image: percona
probes:
readiness:
path: "/readiness"
type: "httpGet"
port: 8080
timeout: 5
liveness:
path: "/liveness"
type: "httpGet"
port: 8080
timeout: 5
initialDelay: 60
volumes:
- name: mysql-logs
path: "/var/log/ccp/mysql"
type: host
readOnly: false
- name: mysql-storage
path: "/var/lib/mysql"
type: host
readOnly: false
pre:
- name: chown-logs-dir
command: "sudo /bin/chown mysql:mysql /var/log/ccp/mysql"
- name: chown-data-dir
command: "sudo /bin/chown mysql:mysql /var/lib/mysql"
daemon:
files:
- entrypoint
- mycnf
- galera-checker
dependencies:
- etcd
command: /opt/ccp/bin/entrypoint.py
files:
entrypoint:
path: /opt/ccp/bin/entrypoint.py
content: percona_entrypoint.py
perm: "0755"
mycnf:
path: /etc/mysql/my.cnf
content: my.cnf.j2
galera-checker:
path: /opt/ccp/bin/galera_checker.py
content: galera_checker.py
perm: "0755"
haproxy-conf:
path: /etc/haproxy/haproxy.conf
content: haproxy.conf.j2
haproxy_entrypoint:
path: /opt/ccp/bin/haproxy_entrypoint.py
content: haproxy_entrypoint.py
perm: "0755"