The Charmed MySQL Server is a database operator build for the Juju framework. It can be deployed on bare metal (using a LXD controller) or on Kubernetes (using a microk8s controller).
Deploying this charm depends on the substrate of choice
juju add-model mysql
juju deploy mysql-k8s --channel 8.0/stable
juju status --watch 1sjuju add-model mysql
juju deploy mysql --channel 8.0/stable
juju status --watch 1sTo remove the deployment, run:
juju destroy-model mysql --destroy-storage --yesPlease follow the tutorial guide (K8s or VM) with detailed explanation how to access DB, configure cluster, change credentials and/or enable TLS.
Relations are the standard way to interconnect multiple Juju operators. There relations are defined over well-defined interfaces, that both requirer and provider operators must support.
Example:
juju add-model mysql
juju deploy mysql --channel 8.0/stable
juju deploy mysql-test-app
# Relate MySQL with your application
juju relate mysql:database mysql-test-app:databasemysql_client: standard interface to connect to the database.
To build the charms:
(cd kubernetes && charmcraft pack)
(cd machines && charmcraft pack)Please see the Juju SDK docs for guidelines on enhancements to this charm following best practice guidelines, and CONTRIBUTING.md for further developer guidance.