Truy cập giao diện người dùng web Dagu
- Mở trình duyệt và truy cập:
http://<SERVER_IP>:8080/login(HTTP) - Đăng nhập bằng thông tin đăng nhập được lưu trữ trong:
/root/.dagu-credentials
Cổng
- Giao diện người dùng web:
8080 - Điều phối viên gRPC:
50055(nội bộ)
Các đường dẫn quan trọng
Cấu hình hệ thống:
/usr/local/bin/dagu # Binary
/etc/dagu/ # Env directory
/etc/systemd/system/dagu.service # Systemd service
Chế độ dịch vụ (Cấp hệ thống):
/var/lib/dagu/
├── dags/ # Workflows
├── logs/ # Execution logs
├── data/ # History
├── suspend/ # Pause flags
└── base.yaml # Shared config
Chế độ CLI (Cấp độ người dùng):
~/.config/dagu/
├── dags/ # Workflows
├── config.yaml # Configuration
└── base.yaml # Shared config
~/.local/share/dagu/
├── logs/ # Execution logs
├── data/ # History
└── suspend/ # Pause flags
Quản lý dịch vụ
# Check service status
systemctl status dagu
# Start the service
systemctl start dagu
# Stop the service
systemctl stop dagu
# Restart the service
systemctl restart dagu
Cách sử dụng CLI cơ bản
# Show help / available commands
dagu --help
# Show installed version
dagu version
# Install Dagu skills (auto-detect supported tools)
dagu ai install
# Install non-interactively (auto-confirm all prompts)
dagu ai install --yes
# Install to a specific skills directory
dagu ai install --skills-dir ~/.agents/skills
# Start a DAG workflow from a file or named workflow
dagu start my-workflow.yaml
# Pass parameters to a DAG (after --)
dagu start my-workflow.yaml -- param1=value1 param2=value2
# Execute a command directly as a DAG step
dagu exec -- python script.py
# Example with arguments
dagu exec -- python script.py --input data.csv
Tạo quy trình làm việc đầu tiên của bạn (Chế độ CLI)
Tạo thư mục DAGs:
mkdir -p ~/.config/dagu/dags
Tạo một tập tin có tên hello.yaml (/root/.config/dagu/dags/hello.yaml):
steps:
- name: hello
command: echo "Hello from Dagu"
Chạy quy trình công việc:
dagu start hello
Tạo quy trình làm việc đầu tiên của bạn (Chế độ web)
Tạo tập tin quy trình công việc:
vim /var/lib/dagu/dags/hello.yaml
Thêm nội dung sau:
steps:
- name: hello
command: echo "Hello from Dagu"
Quy trình công việc sẽ được dịch vụ đang chạy tự động phát hiện.
Bạn có thể kích hoạt nó từ giao diện người dùng web.