Remove hardcode from mysql logs paths

Change-Id: I3fb3e04f6f424b5a96d8100b02f8310b6569b274
This commit is contained in:
Proskurin Kirill 2016-08-05 11:56:54 +02:00
parent 83c3fbe97b
commit 5cacd475e7
3 changed files with 4 additions and 3 deletions

View File

@ -2,3 +2,4 @@ configs:
db_max_timeout: 60
db_root_password: password
mariadb_port: 3306
mariadb_log_base: /var/log/ccp/mysql

View File

@ -3,7 +3,7 @@ bind-address = {{ network_topology["private"]["address"] }}
port = {{ mariadb_port }}
datadir=/var/lib/mysql/
log-error=/var/log/ccp/mysql/mysql.log
log-error={{ mariadb_log_base }}/mysql.log
max_connections=10000
log-bin=mariadb-bin

View File

@ -10,12 +10,12 @@ service:
liveness: "true"
volumes:
- name: mysql-logs
path: /var/log/ccp/mysql
path: "{{ mariadb_log_base }}"
type: host
readOnly: False
pre:
- name: chown-logs-dir
command: sudo /bin/chown mysql:mysql /var/log/ccp/mysql
command: "sudo /bin/chown mysql:mysql {{ mariadb_log_base }}"
- name: mariadb-bootstrap
command: /opt/ccp/bin/mariadb-bootstrap.sh
daemon: