Mysql Router
- MySQL Charm Maintainers
- Cloud
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/edge | 256 | 16 Oct 2024 | |
latest/edge | 255 | 16 Oct 2024 | |
latest/edge | 254 | 16 Oct 2024 | |
latest/edge | 253 | 16 Oct 2024 | |
latest/edge | 201 | 19 Jun 2024 | |
latest/edge | 108 | 12 Sep 2023 | |
latest/edge | 62 | 10 Feb 2023 | |
8.0/stable | 257 | 17 Oct 2024 | |
dpe/candidate | 225 | 28 Aug 2024 | |
dpe/candidate | 224 | 28 Aug 2024 | |
dpe/candidate | 223 | 28 Aug 2024 | |
dpe/beta | 225 | 23 Aug 2024 | |
dpe/beta | 224 | 23 Aug 2024 | |
dpe/beta | 223 | 23 Aug 2024 | |
dpe/edge | 260 | 25 Oct 2024 | |
dpe/edge | 259 | 25 Oct 2024 | |
dpe/edge | 258 | 25 Oct 2024 | |
8.0.19/stable | 26 | 05 May 2022 | |
8.0.19/edge | 26 | 05 May 2022 | |
8.0.19/edge | 15 | 26 Apr 2022 |
juju deploy mysql-router --channel dpe/edge
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
Charm Testing reference
There are a lot of test types available and most of them are well applicable for MySQL Router. Here is a list prepared by Canonical:
- Smoke test
- Unit tests
- Integration tests
- System test
- Performance test
Note: below examples are written for Juju 3.x, but Juju 2.9 is supported as well.
Please adopt the juju run ...
commands as juju run-action ... --wait
for Juju 2.9.
Smoke test
Complexity: trivial
Speed: fast
Goal: ensure basic functionality works over short amount of time.
Setup an Juju 3.x environment, deploy DB with test application and start “continuous write” test:
juju add-model smoke-test
juju deploy mysql --channel 8.0/edge --config profile=testing
juju deploy mysql-router --channel dpe/edge
juju relate mysql mysql-router
juju add-unit mysql -n 2 # (optional)
juju deploy mysql-test-app
juju relate mysql-test-app mysql-router:database
# Make sure random data inserted into DB by test application:
juju run mysql-test-app/leader get-inserted-data
# Start "continuous write" test:
juju run mysql-test-app/leader start-continuous-writes
export password=$(juju run mysql/leader get-password username=root | yq '.. | select(. | has("password")).password')
watch -n1 -x juju ssh --container mysql mysql/leader "mysql -h 127.0.0.1 -uroot -p${password} -e \"select count(*) from continuous_writes_database.data\""
# Watch the counter is growing!
Expected results:
- mysql-test-app continuously inserts records in database
continuous_writes_database
tabledata
. - the counters (amount of records in table) are growing on all cluster members
Hints:
# Stop "continuous write" test
juju run mysql-test-app/leader stop-continuous-writes
# Truncate "continuous write" table (delete all records from DB)
juju run mysql-test-app/leader clear-continuous-writes
Unit tests
Please check the “Contributing” guide and follow tox run -e unit
examples there.
Integration tests
Please check the “Contributing” guide and follow tox run -e integration
examples there.
System test
Please check/deploy the charm mysql-bundle (Git). It deploy and test all the necessary parts at once.
Performance test
Please use the separate Charmed MySQL performance testing document but deploy Charmed MySQL behind MySQL Router.