Skip to content

Stage 6: Cache Infrastructure #7

@Fortinbra

Description

@Fortinbra

Summary

Implement Stage 6 (Cache Infrastructure) for the Ansible-first reboot.

Scope

  • Create the caching role
  • Establish persistent cache directories (/opt/runner-cache/{nuget,ccache,pico-sdk})
  • Set correct permissions (sticky bit for UID safety)
  • Extend container hook wrapper to bind-mount caches into containers
  • Add environment variables visible inside containers
  • Create weekly cleanup cron jobs

Key Capabilities

  • NuGet packages persist across jobs (~7-14 min savings per warm run)
  • ccache compiler cache persists with LRU limit enforcement
  • Pico SDK toolchain persists (11-19 min savings per warm run)
  • Hook wrapper extended to inject mounts and env vars

Acceptance

  • Cache directories exist at /opt/runner-cache/{nuget,ccache,pico-sdk}
  • Sticky bits set for UID-safe access
  • Hook wrapper extension created at /opt/runner-hooks/hooks/mounts.js
  • Systemd unit includes cache environment variables
  • Test job can read/write cache directories
  • Environment variables visible inside container
  • Cleanup cron jobs configured and executable
  • Second role run is idempotent
  • Caches persist across multiple job runs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions