canonical / canonical/mlmd-operator
Move backup/restore logic to the Charm
- Dominant language
- Python
- Stars
- 2
- Forks
- 6
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 2
Description
### Context
Right now the [backup and restore guide](https://discourse.charmhub.io/t/data-backups-and-restoration-for-charmed-kubeflow-and-mlflow/13999) is telling users to run the following commands to create a dump of the sqlite content of MLMD's PVC:
```bash
# CKF 1.8
MLMF_POD="mlmd-0"
MLMD_CONTAINER="mlmd"
kubectl exec -n kubeflow $MLMD_POD -c $MLMD_CONTAINER -- \
/bin/bash -c "apt update && apt install sqlite3 -y"
```
This has the following 2 drawbacks:
1. It will not work in airgap environments
2. Users need to manually use commands to create the backup and push it to S3
### What needs to get done
1. Include any binaries needed for the backup into the Charm (could be separate task)
2. Have an action that can make the backup and push it to S3
1. Will most probably need to have a relation with `s3-interface` for this
This will also need to take into account if MLMD should block receiving traffic when making the backup or not (scaling down the pebble service).
### Definition of Done
1. Have a spike to confirm we know if MLMD should be up/down when doing the backup
2. The action can be executed in an airgapped environment
3. Users don't need to run any manual commands from their machine
4. The data will go directly from the Charm to S3
Contributor guide
Research direction
Start with the Charm's action entry points, the existing backup guide, and the proposed s3-interface relation; review how the MLMD Pebble service is managed during operations. Confirm whether MLMD must be up or down, then ensure the Charm can create and upload the SQLite backup without manual commands or network-installed binaries, including in air-gapped environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- cloud, databases, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100