A Juju charm for proxying uncharmed MySQL servers to charmed applications.
To use an external, uncharmed MySQL database in place of deploying a Juju-managed MySQL
instance with, create the mysql-proxy-db-uri
secret and set the appropriate
proxy charm configuration. See the instructions below for an example on how to set up
an external MySQL database running in Docker with the MySQL proxy operator.
docker run --name mysql-slurmdbd \
-e MYSQL_USER=testuser \
-e MYSQL_PASSWORD=testpassword \
-e MYSQL_DATABASE=slurm_acct_db \
-e MYSQL_ALLOW_EMPTY_PASSWORD=true \
-p 3306:3306 \
-d mysql:8.4
juju add-model external-mysql
ip=$(hostname -i)
secret_id=$(juju add-secret mysql-proxy-db-uri db-uri="mysql://testuser:testpassword@$ip:3306")
juju deploy mysql-proxy --config db-uri=$secret_id
juju deploy slurmdbd --channel latest/edge
juju deploy slurmctld --channel latest/edge
juju deploy slurmd --channel latest/edge
juju grant-secret mysql-proxy-db-uri mysql-proxy
juju integrate mysql-proxy slurmdbd
juju integrate slurmctld slurmdbd
juju integrate slurmctld slurmd
If you want to learn more about all the things you can do with the MySQL proxy operator, or have any further questions on what you can do with the operator, here are some further resources for you to explore:
The project uses just and uv for development, which provides some useful commands that will help you while hacking on the MySQL proxy operator:
just fmt # Apply formatting standards to code.
just lint # Check code against coding style standards.
just woke # Run inclusive naming checks.
just typecheck # Run static type checks.
just unit # Run unit tests.
If you're interested in contributing, take a look at our contributing guidelines.
The MySQL proxy operator is a project of the Ubuntu High-Performance Computing community. Interested in contributing bug fixes, patches, documentation, or feedback? Want to join the Ubuntu HPC community? You’ve come to the right place 🤩
Here’s some links to help you get started with joining the community:
- Ubuntu Code of Conduct
- Contributing guidelines
- Join the conversation on Matrix
- Get the latest news on Discourse
- Ask and answer questions on GitHub
The MySQL proxy operator is free software, distributed under the Apache Software License, version 2.0. See the Apache-2.0 LICENSE file for further details.