|
| 1 | +# GitLab Runner TUI |
| 2 | + |
| 3 | +A Terminal User Interface (TUI) for managing GitLab runners on Debian hosts. This tool provides an interactive way to monitor runners, view logs, and update configurations. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Runner Management**: View all configured GitLab runners with their status |
| 8 | +- **Log Viewer**: Real-time log viewing with filtering and auto-scroll |
| 9 | +- **Configuration Editor**: Update runner concurrency, limits, and other settings |
| 10 | +- **System Monitor**: View service status, CPU/memory usage, and restart services |
| 11 | +- **Keyboard Navigation**: Easy tab-based navigation between views |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | + |
| 15 | +- Go 1.19 or higher |
| 16 | +- GitLab Runner installed on the system |
| 17 | +- Appropriate permissions to: |
| 18 | + - Read GitLab Runner configuration files |
| 19 | + - Execute `gitlab-runner` commands |
| 20 | + - Access system services (systemctl/service) |
| 21 | + - Read system logs (journalctl) |
| 22 | + |
| 23 | +## Installation |
| 24 | + |
| 25 | +### Quick Install (Recommended) |
| 26 | + |
| 27 | +```bash |
| 28 | +# Download and install latest release |
| 29 | +curl -sSL https://raw.githubusercontent.com/larkin/gitlab-runner-tui/main/install.sh | bash |
| 30 | + |
| 31 | +# Or with wget |
| 32 | +wget -qO- https://raw.githubusercontent.com/larkin/gitlab-runner-tui/main/install.sh | bash |
| 33 | +``` |
| 34 | + |
| 35 | +### Manual Download |
| 36 | + |
| 37 | +Download the latest release for your platform from the [releases page](https://github.com/larkin/gitlab-runner-tui/releases). |
| 38 | + |
| 39 | +```bash |
| 40 | +# Example for Linux x64 |
| 41 | +curl -L https://github.com/larkin/gitlab-runner-tui/releases/latest/download/gitlab-runner-tui_Linux_x86_64.tar.gz | tar xz |
| 42 | +sudo mv gitlab-runner-tui /usr/local/bin/ |
| 43 | +``` |
| 44 | + |
| 45 | +### Build from Source |
| 46 | + |
| 47 | +```bash |
| 48 | +# Clone the repository |
| 49 | +git clone https://github.com/larkin/gitlab-runner-tui |
| 50 | +cd gitlab-runner-tui |
| 51 | + |
| 52 | +# Build the binary |
| 53 | +go build -o gitlab-runner-tui cmd/gitlab-runner-tui/main.go |
| 54 | + |
| 55 | +# Optional: Install to system path |
| 56 | +sudo cp gitlab-runner-tui /usr/local/bin/ |
| 57 | +``` |
| 58 | + |
| 59 | +## Usage |
| 60 | + |
| 61 | +```bash |
| 62 | +# Run with default config path (/etc/gitlab-runner/config.toml) |
| 63 | +gitlab-runner-tui |
| 64 | + |
| 65 | +# Run with custom config path |
| 66 | +gitlab-runner-tui -config /path/to/config.toml |
| 67 | + |
| 68 | +# If running without sudo, it will check ~/.gitlab-runner/config.toml |
| 69 | +``` |
| 70 | + |
| 71 | +## Keyboard Shortcuts |
| 72 | + |
| 73 | +### Global |
| 74 | +- `Tab` / `Shift+Tab`: Navigate between tabs |
| 75 | +- `1-4`: Jump to specific tab (Runners, Logs, Config, System) |
| 76 | +- `q`: Quit (or go back from logs view) |
| 77 | +- `Ctrl+C`: Force quit |
| 78 | + |
| 79 | +### Runners View |
| 80 | +- `↑/↓`: Navigate runner list |
| 81 | +- `Enter`: View logs for selected runner |
| 82 | +- `r`: Refresh runner list |
| 83 | + |
| 84 | +### Logs View |
| 85 | +- `↑/↓` / `PgUp/PgDn`: Scroll logs |
| 86 | +- `g` / `G`: Go to top/bottom |
| 87 | +- `a`: Toggle auto-scroll |
| 88 | +- `c`: Clear logs |
| 89 | +- `r`: Refresh logs |
| 90 | + |
| 91 | +### Config View |
| 92 | +- `Tab`: Navigate between fields |
| 93 | +- `Ctrl+S`: Save configuration |
| 94 | +- `r`: Edit runner-specific settings |
| 95 | +- `↑/↓`: Select different runner (in runner edit mode) |
| 96 | +- `Esc`: Exit runner edit mode |
| 97 | + |
| 98 | +### System View |
| 99 | +- `r`: Refresh system status |
| 100 | +- `s`: Restart GitLab Runner service |
| 101 | + |
| 102 | +## Configuration |
| 103 | + |
| 104 | +The tool reads and modifies the standard GitLab Runner configuration file (usually `/etc/gitlab-runner/config.toml`). |
| 105 | + |
| 106 | +### Editable Settings |
| 107 | + |
| 108 | +**Global:** |
| 109 | +- Concurrent job limit |
| 110 | +- Check interval |
| 111 | +- Log level |
| 112 | + |
| 113 | +**Per-Runner:** |
| 114 | +- Job limit |
| 115 | +- Max concurrent builds |
| 116 | +- Tags |
| 117 | +- Run untagged jobs |
| 118 | +- Locked status |
| 119 | + |
| 120 | +## Security Considerations |
| 121 | + |
| 122 | +- The tool requires read/write access to the GitLab Runner configuration |
| 123 | +- Service management commands may require sudo privileges |
| 124 | +- Runner tokens are displayed but can be masked in future versions |
| 125 | + |
| 126 | +## Building from Source |
| 127 | + |
| 128 | +```bash |
| 129 | +# Get dependencies |
| 130 | +go mod download |
| 131 | + |
| 132 | +# Build |
| 133 | +go build -o gitlab-runner-tui cmd/gitlab-runner-tui/main.go |
| 134 | + |
| 135 | +# Run tests (if available) |
| 136 | +go test ./... |
| 137 | +``` |
| 138 | + |
| 139 | +## License |
| 140 | + |
| 141 | +MIT License - See LICENSE file for details |
| 142 | + |
| 143 | +## Contributing |
| 144 | + |
| 145 | +Contributions are welcome! Please feel free to submit a Pull Request. |
0 commit comments