CommunityProgramación y desarrollogithub.com

build-variant-from-local-kits

Build a variant using locally published kits for development validation

Compatible con~Claude Code~Codex CLI~Cursor
npx add-skill https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/build-variant-from-local-kits

name: build-variant-from-local-kits description: Build a variant using locally published kits for development validation

Skill: Build Variant from Local Kits

Purpose

Build a complete Bottlerocket variant image using kits published to the local development registry. This enables end-to-end testing of kit changes before publishing to production registries.

When to Use

  • Testing kit changes in a complete variant build
  • Creating bootable images for local testing
  • End-to-end validation of kit modifications

Prerequisites

  • Kits already built and published to local registry (use build-kit-locally skill)
  • Local registry running
  • Bottlerocket variant repository

Procedure

1. Configure for local registry

cd ./bottlerocket
brdev twoliter use-local-deps

This creates Twoliter.override pointing to the local registry for fetching kits.

2. Select which kits to fetch locally

Edit Twoliter.toml and set vendor = "local" for kits you want from the local registry:

[kit.bottlerocket-core-kit]
vendor = "local"  # Fetch from local registry
version = "2.0.0"

[kit.bottlerocket-kernel-6.1-kit]
# No vendor override - uses upstream
version = "2.0.0"

Only kits with vendor = "local" will be fetched from the local registry; others use upstream.

3. Update lock file

./tools/twoliter/twoliter update

4. Build the variant

cargo make

For specific variant:

cargo make -e BUILDSYS_VARIANT=aws-k8s-1.31

For specific architecture:

cargo make -e BUILDSYS_ARCH=aarch64

5. Locate the built image

ls -lh build/images/*.img

Validation

The build should complete successfully and produce an .img file in build/images/.

Cleanup

When done testing, restore upstream configuration:

brdev twoliter use-upstream-deps

This removes Twoliter.override. Remember to also revert any vendor = "local" changes in Twoliter.toml.

Common Issues

Kit not found in registry:

Error: failed to pull kit

Solution: Verify kit is published with brdev registry list

Version mismatch: Solution: Ensure Twoliter.toml version matches the published kit version

Lock file out of sync: Solution: Run ./tools/twoliter/twoliter update again

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-kit-locally

Build a kit and publish it to a locally hosted registry for development testing

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

prepare-core-kit-release

Prepare bottlerocket-core-kit for release by bumping version and updating changelog

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

Skills relacionados