Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
* CI workflow to build and push service images to GitHub Container Registry on master merge. (#97)
* Pull-first with local build fallback for container images during deployment. (#97)

### Fixed

* Expand keepalived healthcheck to cover MySQL Router, Docker daemon, Superset service, and Redis. (#66)

### Changed

* Completed [ARCHITECTURE.md](./docs/ARCHITECTURE.md) (#93)
* Migrated CI from self-hosted to GitHub-hosted runners with Docker-in-Docker test infrastructure. (#94)
* Test workflow always builds service images locally for reproducibility. (#97)

### Fixed

Check failure on line 29 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / run-markdown-lint

MD024/no-duplicate-heading Multiple headings with the same content [Context: "Fixed"]

* Fixed `run_mysql_server()` not instantiating `MySQLServer` class. (#94)
* Disabled MD060 markdownlint rule to fix table column style false positives in documentation. (#94)
Expand Down
2 changes: 2 additions & 0 deletions services/mysql-mgmt/docker_compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ services:
--execute="DROP USER 'superset'@'$(mysqlsh --python --execute "exec(open('/opt/interfaces.py').read())")';"
ifmetric ${VIRTUAL_NETWORK_INTERFACE} 2
/opt/envsubst-Linux-x86_64 < "/opt/keepalived.conf.tpl" > "/opt/default/keepalived.conf";
cp "/opt/healthcheck.sh" "/opt/default/healthcheck.sh";
chmod 755 "/opt/default/healthcheck.sh";
chown --recursive superset:superset "/opt/default"
cap_add:
- "NET_ADMIN"
Expand Down
10 changes: 10 additions & 0 deletions services/mysql-mgmt/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -euo pipefail

killall -0 mysqlrouter 2>/dev/null || exit 1
mysqladmin --login-path=superset --port=6446 ping 2>/dev/null || exit 1
docker info > /dev/null 2>&1 || exit 1
docker service inspect superset --format '{{.Spec.Name}}' 2>/dev/null | grep -q superset || exit 1
docker exec redis redis-cli ping 2>/dev/null | grep -q PONG || exit 1

exit 0
8 changes: 5 additions & 3 deletions services/mysql-mgmt/keepalived.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ global_defs {
}

vrrp_script status {
script "/bin/killall -0 mysqlrouter"
interval 1
weight 2
script "/opt/default/healthcheck.sh"
interval 5
weight -20
fall 3
rise 2
}

vrrp_instance virtual_instance {
Expand Down
Loading