Skip to content

charmed-hpc/mysql-proxy-operator

MySQL proxy operator

GitHub License Matrix

A Juju charm for proxying uncharmed MySQL servers to charmed applications.

✨ Getting Started

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.

Step 1: Set up external MySQL database with Docker

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

Step 2: Configure Juju infrastructure

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

🤔 What's next?

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:

🛠️ Development

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.

🤝 Project and community

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:

📋 License

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.

About

Juju charm for proxying external, uncharmed MySQL servers to charmed applications

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published