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 # {% if percona.tls.enabled %} - ca.pem - server-key.pem - server-cert.pem # {% endif %} 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 # {% if percona.tls.enabled %} - ca.pem - server-key.pem - server-cert.pem # {% endif %} dependencies: - etcd command: "/opt/ccp/bin/haproxy_entrypoint.py daemon" - name: galera image: percona probes: readiness: path: "/readiness" type: "httpGet" port: 8080 timeout: 5 scheme: "http" liveness: path: "/liveness" type: "httpGet" port: 8080 timeout: 5 initialDelay: 60 scheme: "http" 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 # {% if percona.tls.enabled %} - ca.pem - server-key.pem - server-cert.pem # {% endif %} 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" # {% if percona.tls.enabled %} ca.pem: path: /opt/ccp/etc/tls/ca.pem content: ca.pem.j2 perm: "0400" server-key.pem: path: /opt/ccp/etc/tls/server-key.pem content: server-key.pem.j2 perm: "0400" server-cert.pem: path: /opt/ccp/etc/tls/server-cert.pem content: server-cert.pem.j2 perm: "0400" # Cant use it right now, 'cos of the file creation order dhparams.pem: path: /var/lib/mysql/dhparams.pem content: dhparams.pem.j2 perm: "0400" # {% endif %}