A repository full of reference solutions for getting started with MDAI.
We welcome fixes, examples, and documentation improvements. Before opening a pull request, please read CONTRIBUTING.md for local setup, testing guidance, and review expectations.
Optional: In your .bashrc (or equivalent), add this to EOF. If you choose to do this, you can use mdai instead of ./cli/mdai.sh to utilize the CLI-like shell script.
# Set this to the path of your local clone of mdai-labs
export MDAI_LABS_DIR="$HOME/path/to/mdai-labs"
# Set mdai alias
alias mdai='"${MDAI_LABS_DIR%/}/cli/mdai.sh"'
Run the following to make our install/uninstall script executable.
chmod +x ./cli/mdai.sh
Use the CLI to install a local SmartHub, then run complete use cases. Individual component commands such as hub, collector, logs, and fluentd are mainly useful when developing or debugging a specific manifest; most users should start with use-case.
mdai installEach 0.9.0 use case is organized as a progression:
basic: bare-bones telemetry flowstatic: hard-coded settings or policiesdynamic: alert-driven automated config changes through MDAI Hub variables
Start with basic, compare static, then run dynamic:
mdai use-case compliance --version 0.9.0 --workflow basic --data 0.9.0/use_cases/compliance/mock_data/fluentd_config.yaml
mdai use-case compliance --version 0.9.0 --workflow static --data 0.9.0/use_cases/compliance/mock_data/fluentd_config.yaml
mdai use-case compliance --version 0.9.0 --workflow dynamic --data 0.9.0/use_cases/compliance/mock_data/fluentd_config.yamlOther available 0.9.0 use cases:
mdai use-case data_filtration --version 0.9.0 --workflow dynamic --data mock-data/data_filtration.yaml
mdai use-case pii --version 0.9.0 --workflow dynamic --option multivar --data mock-data/pii.yaml
mdai use-case tail_sampling --version 0.9.0 --workflow dynamic --data mock-data/tail_sampling_dynamic.yamlSome dynamic use cases require supporting resources before running. See the use-case README for details:
mdai clean
mdai delete| Action | Command | Description |
|---|---|---|
| Install local SmartHub | mdai install |
Creates local dependencies and installs MDAI |
| Clean config deployments | mdai clean |
Deletes common resources in the mdai namespace |
| Delete cluster | mdai delete |
Deletes the local Kind cluster |
| Check local setup | mdai doctor |
Checks OS platform, required tools, and Docker |
| Action | Command | Description |
|---|---|---|
| Run use case | mdai use-case <name> |
Applies a use-case bundle |
| Select version | --version 0.9.0 |
Uses versioned use-case manifests |
| Select workflow | `--workflow basic | static |
| Select variant | --option <name> |
Chooses a dynamic variant when available |
| Remove use case | mdai use-case <name> ... --delete |
Deletes the selected use-case bundle |
| Action | Command | Description |
|---|---|---|
| Validate README command docs | mdai validate-docs |
Checks README alias and documented command availability |
| Run CLI tests | mdai test |
Runs the sandboxed CLI test suite |
| Run experiment | mdai experiment <name> |
Applies an unversioned experiment from experiments/ |