68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
dsl_version: 0.4.0
|
|
service:
|
|
name: {{ service.database }}
|
|
ports:
|
|
- {{ mariadb.port }}
|
|
# {% if telegraf is defined %}
|
|
annotations:
|
|
service:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "{{ telegraf.prometheus_output_port.cont }}"
|
|
# {% endif %}
|
|
containers:
|
|
- name: mariadb
|
|
image: mariadb
|
|
probes:
|
|
readiness: /opt/ccp/bin/mariadb-readiness.sh
|
|
liveness:
|
|
command: "true"
|
|
type: "exec"
|
|
volumes:
|
|
- name: mysql-logs
|
|
path: "/var/log/ccp/mysql"
|
|
type: host
|
|
readOnly: False
|
|
pre:
|
|
- name: chown-logs-dir
|
|
command: "sudo /bin/chown mysql:mysql /var/log/ccp/mysql"
|
|
- name: mariadb-bootstrap
|
|
command: /opt/ccp/bin/mariadb-bootstrap.sh
|
|
daemon:
|
|
command: mysqld
|
|
files:
|
|
- mariadb-my-cnf
|
|
- mariadb-readiness
|
|
- mariadb-bootstrap
|
|
- mariadb-security-reset.expect
|
|
# {% if telegraf is defined %}
|
|
- name: mariadb-telegraf
|
|
image: telegraf
|
|
daemon:
|
|
dependencies:
|
|
- etcd
|
|
- mariadb
|
|
command: telegraf --config /etc/telegraf/telegraf.conf --input-filter mysql
|
|
files:
|
|
- telegraf-conf
|
|
# {% endif %}
|
|
|
|
files:
|
|
mariadb-my-cnf:
|
|
path: /etc/mysql/my.cnf
|
|
content: my.cnf.j2
|
|
mariadb-readiness:
|
|
path: /opt/ccp/bin/mariadb-readiness.sh
|
|
content: readiness.sh.j2
|
|
perm: "755"
|
|
mariadb-bootstrap:
|
|
path: /opt/ccp/bin/mariadb-bootstrap.sh
|
|
content: mariadb-bootstrap.sh.j2
|
|
perm: "755"
|
|
mariadb-security-reset.expect:
|
|
path: /opt/ccp/bin/mariadb-security-reset.expect
|
|
content: mariadb-security-reset.expect
|
|
perm: "755"
|
|
telegraf-conf:
|
|
path: /etc/telegraf/telegraf.conf
|
|
content: telegraf.conf.j2
|