RunsOn CLI
The RunsOn CLI (roc
) is a command line tool designed to help you manage and troubleshoot your RunsOn installation. It provides essential debugging and management capabilities for your self-hosted GitHub Actions runners.
Prerequisites
Section titled “Prerequisites”- RunsOn version >= v2.6.3
- AWS Session Manager plugin (for
connect
command) - Appropriate AWS credentials configured
Installation
Section titled “Installation”Download the latest release binary for your platform from the GitHub Releases page ↗.
macOS (ARM64)
Section titled “macOS (ARM64)”curl "https://github.com/runs-on/cli/releases/download/v0.1.3/roc-v0.1.3-darwin-arm64.tar.gz" -Lo- | tar -xvz./roc --help
# Replace with appropriate architecture (amd64, arm64)curl "https://github.com/runs-on/cli/releases/download/v0.1.3/roc-v0.1.3-linux-amd64.tar.gz" -Lo- | tar -xvz./roc --help
Commands
Section titled “Commands”roc connect
Section titled “roc connect”Connect directly to a job instance via AWS Systems Manager (SSM) for debugging purposes.
# Connect using job IDroc connect 12345678
# Connect using GitHub job URLroc connect https://github.com/owner/repo/actions/runs/123/job/456
# Connect with debug outputroc connect 12345678 --debug
# Wait for connection availabilityroc connect 12345678 --watch
Flags:
--debug
: Enable debug output--watch
: Watch for connection availability
roc logs
Section titled “roc logs”Fetch RunsOn server and instance logs for troubleshooting.
# Get logs for a specific jobroc logs 12345678
# Get logs using GitHub job URLroc logs https://github.com/owner/repo/actions/runs/123/job/456
# Get logs from last 30 minutesroc logs 12345678 --since 30m
# Watch for new logs in real-timeroc logs 12345678 --watch
# Combine flagsroc logs 12345678 --since 1h --watch
Flags:
-s, --since
: Log duration (default: 2h)-w, --watch
: Watch for new logs
roc stack doctor
Section titled “roc stack doctor”Perform comprehensive health checks on your RunsOn stack and export diagnostic information.
roc stack doctor
This command performs the following checks:
- CloudFormation stack status
- AppRunner service health
- Endpoint accessibility
- Service configuration validation
- Resource availability
The results are exported as a timestamped ZIP file containing all diagnostic information, which can be shared with support for troubleshooting.
Use Cases
Section titled “Use Cases”Debugging Job Failures
Section titled “Debugging Job Failures”When a GitHub Actions job fails on your RunsOn infrastructure:
- Get logs: Use
roc logs JOB_ID
to fetch detailed logs - Connect to instance: Use
roc connect JOB_ID
to SSH into the runner - Check stack health: Run
roc stack doctor
to ensure infrastructure is healthy
Real-time Monitoring
Section titled “Real-time Monitoring”# Monitor logs in real-time for active jobsroc logs JOB_ID --watch
Health Checks
Section titled “Health Checks”# Regular stack health verificationroc stack doctor
Troubleshooting
Section titled “Troubleshooting”Connection Issues
Section titled “Connection Issues”If roc connect
fails:
- Ensure AWS Session Manager plugin is installed
- Verify your AWS credentials have appropriate permissions to access the RunsOn stack
- Check that you are targetting the correct stack (
--stack
flag orRUNS_ON_STACK
environment variable) and region (set in your AWS profile or withAWS_REGION
environment variable) - Use
--debug
flag for detailed error information
Log Access Issues
Section titled “Log Access Issues”If roc logs
returns no results:
- Verify the job ID or URL is correct
- Check your AWS credentials and permissions
- Check that you are targetting the correct stack (
--stack
flag orRUNS_ON_STACK
environment variable) and region (set in your AWS profile or withAWS_REGION
environment variable) - Try adjusting the
--since
timeframe
Support
Section titled “Support”For issues with the RunsOn CLI:
- Open an issue on GitHub ↗
- Contact support at [email protected]
- Include output from
roc stack doctor
when reporting problems
License
Section titled “License”The RunsOn CLI is open source software licensed under the MIT License.