Skip to content

Commit e82f593

Browse files
marcolo-30ananos
authored andcommitted
Update quickstart.md deployment with CLI
Update quickstart.md deployment with CLI
1 parent 8606d2c commit e82f593

File tree

1 file changed

+155
-11
lines changed

1 file changed

+155
-11
lines changed

docs/quickstart.md

Lines changed: 155 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,167 @@ the directory `nodes/`.
5252
* **Cluster** level descritptions, require a file for each cluster registered in Karmada. It contains the clusterID and a list of node hostnames, that MLSysOps is allowed to manage.
5353
* **Node** level descriptions, contain the detailed information about the node resources. Example [here](descriptions/nodes/node-1.yaml).
5454

55-
#### Step 2: Automated Deployment
55+
Before deploying, prepare system descriptions as Kubernetes CRDs:
5656

57-
MLSysOps CLI tool can be used to automatically deploy all the necessary components.
58-
It needs the kubeconfigs of Karmada host cluster and Karmada API.
57+
- Stored in the `descriptions/` directory
5958

60-
- `export KARMADA_HOST_KUBECONFIG=<path to karmada host kubeconfig>`
61-
- `export KARMADA_API_KUBECONFIG=<path to karmada api kubeconfig>`
62-
- `export KARMADA_HOST_IP=<karmada host ip>`
59+
### 📁 File structure:
6360

64-
And then execute the CLI command inside `deployments` directory, with `descriptions` directory files prepared:
65-
- `cd deployments`
66-
- `python3 deploy.py`
61+
```
62+
descriptions/
63+
├── continuum/
64+
│ └── <continuum-hostname>.yaml
65+
├── clusters/
66+
│ └── <cluster-hostname>.yaml
67+
└── nodes/
68+
└── <node-hostname>.yaml
69+
```
6770

71+
Descriptions define IDs, managed components, and resource details. All files are required before installation.
6872

69-
Wait for the MLSysOps framework to be deployed, and you can check if the agents are running with:
73+
---
7074

71-
`kubectl get pods -n mlsysops-framework`
75+
### Step 3: Deploy the Framework
76+
77+
There are two ways to deploy the framework:
78+
79+
#### ✅ Option 1: Automated using the MLSysOps CLI
80+
81+
You can install the CLI in two ways:
82+
83+
**From TestPyPI:**
84+
85+
```bash
86+
pip install -i https://test.pypi.org/simple/ mlsysops-cli==0.1.9
87+
```
88+
89+
**From GitHub (includes deployments folder):**
90+
91+
```bash
92+
git clone https://github.com/marcolo-30/mlsysops-cli.git
93+
cd mlsysops-cli
94+
pip install -e .
95+
```
96+
97+
This exposes the `mls` command.
98+
99+
**Set environment variables:**
100+
101+
```bash
102+
export KARMADA_HOST_KUBECONFIG=<path to host kubeconfig>
103+
export KARMADA_API_KUBECONFIG=<path to api kubeconfig>
104+
export KARMADA_HOST_IP=<host IP>
105+
```
106+
107+
**Run deployment:**
108+
109+
```bash
110+
cd deployments/
111+
mls framework deploy-all
112+
```
113+
114+
This will:
115+
- Deploy core services (ejabberd, redis, API service)
116+
- Register system descriptions
117+
- Deploy all agents in correct order
118+
119+
**Alternative:**
120+
You can also run the CLI script directly:
121+
122+
```bash
123+
cd deployments
124+
python3 deploy.py
125+
```
126+
127+
Wait for all pods to be created:
128+
129+
```bash
130+
kubectl get pods -n mlsysops-framework
131+
```
132+
133+
---
134+
135+
#### 🛠 Option 2: Manual Deployment
136+
137+
Follow the order below to deploy manually if you prefer full control.
138+
139+
### 📍 Management Cluster (Continuum)
140+
141+
```bash
142+
export KUBECONFIG=<host kubeconfig>
143+
```
144+
145+
- Create namespace:
146+
```bash
147+
kubectl apply -f namespace.yaml
148+
```
149+
150+
- Install services:
151+
```bash
152+
kubectl apply -f xmpp/deployment.yaml
153+
kubectl apply -f api-service-deployment.yaml
154+
kubectl apply -f redis-stack-deployment.yaml
155+
```
156+
157+
- Start ML Connector:
158+
```bash
159+
docker compose -f mlconnector.docker-compose.yaml up -d
160+
```
161+
162+
- Apply RBAC:
163+
```bash
164+
kubectl apply -f mlsysops-rbac.yaml
165+
```
166+
167+
- Add configuration and system descriptions:
168+
```bash
169+
kubectl create configmap continuum-karmadapi-config --from-file=<karmada-api.kubeconfig> --namespace=mlsysops-framework
170+
kubectl create configmap continuum-system-description --from-file=descriptions/continuum/<hostname>.yaml --namespace=mlsysops-framework
171+
```
172+
173+
- Start the Continuum Agent:
174+
```bash
175+
kubectl apply -f continuum-agent-daemonset.yaml
176+
```
177+
178+
### 📍 Karmada API Cluster (Cluster Agents)
179+
180+
```bash
181+
export KUBECONFIG=<api kubeconfig>
182+
```
183+
184+
- Apply policies and namespace:
185+
```bash
186+
kubectl apply -f cluster-propagation-policy.yaml
187+
kubectl apply -f propagation-policy.yaml
188+
kubectl apply -f namespace.yaml
189+
kubectl apply -f mlsysops-rbac.yaml
190+
```
191+
192+
- Add system descriptions:
193+
```bash
194+
kubectl create configmap cluster-system-description --from-file=descriptions/clusters --namespace=mlsysops-framework
195+
```
196+
197+
- Start Cluster Agents:
198+
```bash
199+
kubectl apply -f cluster-agents-daemonset.yaml
200+
```
201+
202+
### 📍 Node Agents
203+
204+
- Ensure node descriptions are in place
205+
- Add them via ConfigMap:
206+
```bash
207+
kubectl create configmap node-system-descriptions --from-file=descriptions/nodes --namespace=mlsysops-framework
208+
```
209+
210+
- Start Node Agents:
211+
```bash
212+
kubectl apply -f node-agents-daemonset.yaml
213+
```
214+
215+
---
72216

73217
#### Step 4: Deploy a test application
74218

0 commit comments

Comments
 (0)