Skip to content

Commit db0847a

Browse files
committed
doc: add the instruction on configuring central logging
1 parent 5c61687 commit db0847a

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,29 @@ docker compose -f docker-compose-mon.yml up -d
165165
#### Log management
166166
CMS provides a `log` stack to run services used for centralised logging and log analysis:
167167
```commandline
168-
export GRAYLOG_PASSWORD_SECRET=<GRAYLOG_PASSWORD_SECRET>
169-
export GRAYLOG_ROOT_PASSWORD_SHA2=<GRAYLOG_ROOT_PASSWORD_SHA2>
168+
export GRAYLOG_PASSWORD_SECRET=`openssl rand -hex 32`
169+
export GRAYLOG_ROOT_PASSWORD_SHA2=`echo -m "CHANGE_ME" | sha256`
170170
docker compose -f docker-compose-log.yml up -d
171171
```
172172

173+
After running this stack for the first time, you will need to create a default input to which CMS can send logs:
174+
175+
```commandline
176+
curl -u "admin:CHANGE_ME" \
177+
-X POST "http://localhost:9000/api/system/inputs" \
178+
-H "Content-Type: application/json" \
179+
-H "X-Requested-By: curl" \
180+
-d '{
181+
"title": "CMS GELF Input",
182+
"type": "org.graylog.plugins.gelf.inputs.GELFTCPInput",
183+
"global": true,
184+
"configuration": {
185+
"bind_address": "0.0.0.0",
186+
"port": 12201
187+
}
188+
}'
189+
```
190+
173191
#### Proxying
174192
A reverse proxying service is available inside the `proxy` stack:
175193
```commandline

app/cli/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from huggingface_hub import snapshot_download # noqa
3636
from datasets import load_dataset # noqa
3737
from app import __version__ # noqa
38+
from app.config import Settings # noqa
3839
from app.domain import ModelType, TrainingType, BuildBackend, Device, ArchiveFormat, LlmEngine # noqa
3940
from app.registry import model_service_registry # noqa
4041
from app.api.api import (
@@ -703,7 +704,7 @@ def show_banner() -> None:
703704
typer.echo(banner)
704705

705706

706-
def _ensure_dst_model_path(model_path: str, parent_dir: str, config) -> str:
707+
def _ensure_dst_model_path(model_path: str, parent_dir: str, config: Settings) -> str:
707708
if model_path.endswith(".zip"):
708709
dst_model_path = os.path.join(parent_dir, "model", "model.zip")
709710
config.BASE_MODEL_FILE = "model.zip"

0 commit comments

Comments
 (0)