MariaDB-10.4_Slave
Introduction
This image is suitable for deploying mariadb-10.4_slave managed by supervisord. Supervisor jobs conf files can be kept in the supervisor
folder, in the root of the project.
Stack Code
mariadb-10.4_slave - To be mentioned in build.image_template
in appz.yml
.
Pre-requisites
Make sure both vault and MariaDB Master applications are deployed before deploying MariaDB-Slave application.
Sample Project
MariaDB-Slave - Use this sample project to deploy MariaDB Slave database.
Sample AppZ YAML
Name: appz.yml
. To be placed in the root of your git repo.
app:
name: mariadb Slave
code: mariadbslave
notify: appzdev@cloudbourne.co
build:
version: 10.4
env: DEV
build_file: none
output_files: output/*.zip
image_template: mariadb_slave-10.4
deploy:
context: alpha/DEV
type: statefulset
replicas: 1
port:
- 3306
volumes:
- claim: mariadb-slave-data
mount: /appz/data
name: data
size: 5Gi
- claim: mariadb-slave-backup
mount: /appz/backup
name: backup
size: 5Gi
properties:
MYSQL_REPLICATION_USER: replication
MYSQL_REPLICATION_PASSWORD:
vault: MYSQL_REPLICATION_PASSWORD
MYSQL_ROOT_PASSWORD:
vault: MYSQL_ROOT_PASSWORD_KEY
DB_MASTER: mariadb-master-10-4
revision : 25
Properties
The image is vault enabled so secrets can be pulled from vault. These are placed under properties
in appz.yml
. Please check each one below, with its actual purpose.
- MYSQL_ROOT_PASSWORD - Password of the MariaDB user 'root'.
- MYSQL_REPLICATION_USER - The user 'replication' for the MariaDB master/slave replication.
- MYSQL_REPLICATION_PASSWORD - Password of the MariaDB user 'replication'.
Volumes
It is not mandatory to create volumes unless applications need them, these are optional.
Standard AppZ Volumes are enabled.