stack for uploading log archives (generated by runai-adm collect-logs
command) and viewing log files in a centralized location
upload *.tar.gz
archive to minio bucket, then an automated pipeline:
- extracts archive
- organizes folders
- displays them in web-based VScode
pros:
- provides an easy to browse interface
- logs are displayed neatly
- enables quick search within files
- allows sharing with other team members
if the cs-logger stack already installed on cluster, run this to expose minio and Grafana locally:
bash operation.sh
the cs
namespace is used by default, to choose a different namespace run:
bash operation.sh NAMESPACE
the script creates 2 detached shells using tmux
utility, for exposing minio and vscode UI locally.
- enter minio UI: http://localhost:9001/ (creds are in values/secret)
- choose the "new-log-archives" bucket for
*.tar.gz
archives, or "new-single-files" bucket for any other text file - Drag and drop the file to the bucket (it will be immediatly processed and then moved to the done bucket by the file handler)
- enter VScode: http://localhost:8080/ (password is
admin
) - select "Files" tab on the left panel (the root folder
/data/extracted-logs
will be open by default) - archives are extracted into subfolders with the same name (plus a human-formatted date appended to it), for example:
archive file
runai-logs-1583069400.tar.gz
will be extracted into subfolderrunai-logs-1583069400_01-03-2020_15-30
- text files will be available in the root folder.
- list running sessions:
tmux ls
- attach to a running session:
tmux a -t SESSION_NAME
- detach from session: press
CTRL
+B
, then pressD
- terminate running session:
tmux kill-ses -t SESSION_NAME
run this to deploy cs-logger stack in an empty cluster:
bash deployment.sh
the cs
namespace is used by default, to choose a different namespace run:
bash deployment.sh NAMESPACE
stack includes:
- NFS Provisioner: Enables using an RWX storage class
- minio: S3 compatible object storage, provides a simple file upload interface
- Log archive handler: automation script for handling log archives files
- VScode: web-based version of VScode, for displaying log files