Skip to main content

Tasks Overview

Task Categories

Runner Codes uses Taskfile for command automation. Tasks are organized into logical categories:

Configuration Variables

All tasks use these configurable variables defined in Taskfile.yaml:

Taskfile.yaml configuration variables
vars:
# Firecracker Configuration
FC_WORKDIR: '/srv/firecracker'
FC_VERSION: 'v1.7.0'
GUEST_CID: '3'
VSOCK_PORT: '5000'

# Build Directories
BIN_DIR: 'bin'
ROOTFS_DIR: 'rootfs'

# AWS Configuration
AWS_REGION: 'us-east-1'
AWS_INSTANCE_TYPE: 'm5zn.metal'
AWS_KEY_NAME: 'infra-operator-key'
AWS_INSTANCE_NAME: 'llm-infra-operator-test'
AWS_VPC_ID: 'vpc-0dd1e4d3c5ed4f3c7'
AWS_SUBNET_ID: 'subnet-004de53997864f0a3'

# S3 Configuration
S3_BUCKET: 'llm-infra-operator-rootfs'
S3_REGION: 'us-east-1'
tip

Override any variable by setting it in your environment or passing it to the task:

Override AWS region
AWS_REGION=eu-west-1 task aws:launch

Quick Reference

Essential Commands

CommandDescription
taskList all available tasks
task aws:launchLaunch EC2 instance with Firecracker
task aws:deployDeploy code to instance
task aws:testRun basic execution test
task aws:cleanupTerminate instance and cleanup

Build Commands

CommandDescription
task build:allBuild all components
task build:infra-operatorBuild infra.operator for current OS
task build:infra-operator-linuxBuild infra.operator for Linux amd64

S3 Commands

CommandDescription
task s3:listList rootfs images in S3
task s3:uploadUpload images from EC2 to S3
task s3:downloadDownload images from S3 to EC2

Rootfs Commands

CommandDescription
task aws:create-rootfs-pythonCreate Python rootfs + upload to S3
task aws:create-rootfs-nodejsCreate Node.js rootfs + upload to S3
task aws:create-rootfs-goCreate Go rootfs + upload to S3
task aws:create-rootfs-rustCreate Rust rootfs + upload to S3
task aws:create-rootfs-bashCreate Bash rootfs + upload to S3
task aws:create-all-rootfsCreate all rootfs images

Testing Commands

CommandDescription
task aws:testRun basic Python test
task aws:test-languagesQuick language version check
task aws:test-all-languagesFull language execution test
task test:unitRun unit tests

Task Execution Flow

Standard Workflow

Standard Task Workflow

Rootfs Creation Flow

Rootfs Creation Flow

Environment Requirements

Before running tasks, ensure you have:

Install Task on macOS
brew install go-task/tap/go-task
Install Task on Linux
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
Install Go on macOS
brew install go
Install Go on Linux
wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz
Configure AWS credentials
export AWS_ACCESS_KEY_ID="your-key"
export AWS_SECRET_ACCESS_KEY="your-secret"
export AWS_DEFAULT_REGION="us-east-1"

Logging Best Practices

All tasks should be run with output logging for troubleshooting:

Run task with logging
task aws:launch 2>&1 | tee /tmp/log.txt

This ensures:

  • Real-time output to terminal
  • Full log saved for later analysis
  • stderr captured alongside stdout
warning

When commands run in background (run_in_background: true), use BashOutput to monitor progress.