nová verze
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
[KUBE](../../README.md) / [k3s](../k3s.md) / Worker
|
||||
|
||||
# Resource Transfer
|
||||
|
||||
- [Install](#install)
|
||||
- [Remove](#remove)
|
||||
- [Transfer site](#transfer-site)
|
||||
- [Pause for Agent to receive new tasks from the API](#pause-for-agent-to-receive-new-tasks-from-the-api)
|
||||
- [Removing the pause for Agent to receive new tasks from the API](#removing-the-pause-for-agent-to-receive-new-tasks-from-the-api)
|
||||
- [Tasks list](#tasks-list)
|
||||
- [Update ENV](#update-env)
|
||||
***
|
||||
|
||||
## Install
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --worker install
|
||||
```
|
||||
|
||||
Example of log:
|
||||
```bash
|
||||
🔹[Worker] Install
|
||||
🔹[Worker] Preparing /app/kube/assets/yaml/worker.yaml
|
||||
🔹[K3S] Applying YAML /app/kube/data/yaml/worker.yaml
|
||||
💡[K3S] Waiting for pods to be ready... | 1 not ready
|
||||
💡[K3S] Waiting for pods to be ready... | 1 not ready
|
||||
```
|
||||
***
|
||||
|
||||
## Remove
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --Worker remove
|
||||
```
|
||||
***
|
||||
|
||||
## Execute task
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --worker task <file> [domain]
|
||||
```
|
||||
|
||||
Example of log:
|
||||
```bash
|
||||
🔹[Worker] Task: /_data/worker/tasks/6d5b3169-a15f-4007-8cc7-ebfc8d75e3b2.task
|
||||
🔹[Worker] Action: test
|
||||
🔹[Worker] Database URL: https://wp.krumax.cz/transfer_36b91e68-53d3-49ac-922a-0031e664125b/0bf26901-c12d-4015-9bbe-cefc5c1a92d6.sql.zip
|
||||
🔹[Worker] Files URL: https://wp.krumax.cz/transfer_36b91e68-53d3-49ac-922a-0031e664125b/0bf26901-c12d-4015-9bbe-cefc5c1a92d6.zip
|
||||
🔹[Worker] Download archive database --> /app/transfers/us00.krumax.cz/us00.krumax.cz.sql.zip
|
||||
🔹[Worker] Download archive files --> /app/transfers/us00.krumax.cz/us00.krumax.cz.zip
|
||||
🔹[Worker] Create site: us00.krumax.cz
|
||||
🔹Files source: /app/transfers/us00.krumax.cz/us00.krumax.cz.zip
|
||||
🔹Database source: /app/transfers/us00.krumax.cz/us00.krumax.cz.sql.zip
|
||||
🔹[OpenLiteSpeed] Pod: openlitespeed-0 | Restart...
|
||||
🔹[OpenLiteSpeed] Pod: openlitespeed-1 | Restart...
|
||||
✅[Worker] Action: test | Success
|
||||
```
|
||||
***
|
||||
|
||||
## Tasks list
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --worker list
|
||||
```
|
||||
|
||||
Example of log:
|
||||
```bash
|
||||
🔹[Worker] Task list
|
||||
# | Task | Action | Status | Time, sec
|
||||
---------------------------------------------------------------------------
|
||||
1 | d580040f-b3b8-43e1-af7a-8e35c80a688c | test | new | ?
|
||||
2 | pause | pause | execution | 691175
|
||||
```
|
||||
***
|
||||
|
||||
## Pause for Agent to receive new tasks from the API (pause)
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --worker down
|
||||
```
|
||||
|
||||
Example of log:
|
||||
```bash
|
||||
🔹[Worker] Put on pause...
|
||||
```
|
||||
***
|
||||
|
||||
## Removing the pause for Agent to receive new tasks from the API (unpause)
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --worker up
|
||||
```
|
||||
|
||||
Example of log:
|
||||
```bash
|
||||
🔹[Worker] Resuming from pause...
|
||||
```
|
||||
***
|
||||
|
||||
## Reload
|
||||
|
||||
Command:
|
||||
```bash
|
||||
sudo kube.sh --worker reload
|
||||
```
|
||||
|
||||
Example of log:
|
||||
```bash
|
||||
🔹[Worker] Reload...
|
||||
🔹[Worker] Updated ENV:
|
||||
API_URL: http://api.sodew.ai/api/tasks
|
||||
WORKER_ID: worker-dev
|
||||
GETTING_PAUSE: 30
|
||||
SENDING_PAUSE: 15
|
||||
```
|
||||
Reference in New Issue
Block a user