canonical / canonical/data-science-stack
Implement initialise CLI command
- Dominant language
- Python
- Stars
- 37
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
### Why it needs to get done
DSS needs a command to connect Juju (from within the snap) to Microk8s running on the local machine. For this task we may assume that both executables are available at local machine.
### What needs to get done
Implement a CLI command `dss initialise` which connects juju to microk8s based on config speciffied in env variable `KUBECONFIG` or based on flag `--kubeconfig`. Initialisation will consist of:
- Add microk8s cloud based on provided kubeconfig
```
cat $SNAP_DATA/microk8s/client.config | $your_juju add-k8s my-microk8s
```
- Bootstrap juju controller
- Create juju model
- Deploy DSS bundle
```
bundle: kubernetes
name: dss
applications:
admission-webhook:
charm: admission-webhook
channel: 1.8/stable
trust: true
scale: 1
_github_repo_name: admission-webhook-operator
_github_repo_branch: track/1.8
mlflow-minio:
charm: minio
channel: ckf-1.7/stable
scale: 1
trust: true
_github_repo_name: minio-operator
mlflow-mysql:
charm: mysql-k8s
channel: 8.0/stable
scale: 1
trust: true
_github_repo_name: mysql-k8s-operator
mlflow-server:
charm: mlflow-server
channel: 2.1/stable
scale: 1
trust: true
_github_repo_name: mlflow-operator
jupyter-controller:
charm: jupyter-controller
channel: latest/edge
scale: 1
trust: true
_github_repo_name: notebook-operators
options:
use-istio: false
relations:
- [mlflow-server, mlflow-minio]
- [mlflow-server, mlflow-mysql]
```
- wait for bundle to be deployed
Example bash script from demo:
```
juju bootstrap my-k8s uk8s-controller
juju add-model kubeflow
# Deploy charms
juju deploy dss --trust
juju wait-for application mlflow-server --query='name=="mlflow-server" && (status=="active" || status=="idle")' --timeout=15m0s
juju wait-for application mlflow-minio --query='name=="mlflow-minio" && (status=="active" || status=="idle")' --timeout=15m0s
juju wait-for application jupyter-controller --query='name=="jupyter-controller" && (status=="active" || status=="idle")' --timeout=15m0s
```
### When is the task considered done
- DSS CLI has command option `dss initialise` setups juju cloud controller and model and deploys DSS bundle.
- After execution of the command we can run `juju status` and we can see all the components of DSS bundle in active state.
Contributor guide
Assessment
This issue has not been assessed yet.