Skip to content
Agentmart
Submit a tool

generate-containerfile

Generate Containerfiles for OpenStack service images by analyzing tcib definitions, rdo-packages spec files, and the container images design document.

Skill by openstack-k8s-operators

IndexedMIT★ 9
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/openstack-k8s-operators-generate-containerfile

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Generate Containerfiles for OpenStack service images by analyzing tcib definitions, rdo-packages spec files, and the container images design document. Argument is the service name (e.g., nova, placement, watcher).

Use cases: documents, design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/generate-containerfile

What's inside

Skill name
generate-containerfile
Description
Generate Containerfiles for OpenStack service images by analyzing tcib definitions, rdo-packages spec files, and the container images design document. Argument is the service name (e.g., nova, placement, watcher).
License
MIT
Instructions
953 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Agent Skills spec issues

  • allowed-tools: must be a space-separated string
  • body: 953 lines (spec recommends under 500)

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Generate Containerfile for OpenStack Service

This skill generates container image definitions for OpenStack services
following the patterns in `doc/container-images-design.md`.

The service name is provided as the argument: `$ARGS`. If `$ARGS` is empty,
ask the user which service to generate for before proceeding.

## Workflow

When generating containerfiles for a service, I will systematically:

1. **Read the design document** to understand the build patterns and conventions
2. **Fetch container definitions** from tcib, kolla, or rdo-packages for
   the service's package and dependency information
3. **Fetch the RDO spec file** to extract non-Python deps, config files,
   user/group setup, and file permissions
4. **Fetch upstream requirements** to identify Python dependencies and
   determine extra pip packages needed; also identify any top-level
   requirements the distgit strips, to reproduce as `excluded-requirements.txt`
5. **Analyze consolidation** — group sub-services by dependency profile
   and propose which share an image vs get separate images
6. **Analyze config files** — classify into upstream source, distgit, and
   excluded categories; map to common vs per-image
7. **Check user/UID** — verify the service user exists in uid_gid_manage
8. **Generate all files** — Containerfiles, dep files (builddeps,
   pythonbuilddeps, bindeps, pythondeps), config files, sources.txt
9. **Create sources.txt** with stream definitions, upper-constraints
   entries, and pinned commit hashes
10. **Ensure directory structure** (src/, config/) exists
11. **Verify** — run the verification checklist against the spec, tcib,
    and generated files to catch missing config, generators, or permissions
12. **Present output** for user review before writing

## Step 1: Read the design document

Fetch and read the container images design document and developer guide.
By default it is at:

```bash
curl -sL https://raw.githubusercontent.com/openstack-k8s-operators/s2i-openstack-containers/refs/heads/main/docs/design.md
curl -sL https://raw.githubusercontent.com/openstack-k8s-operators/s2i-openstack-containers/refs/heads/main/docs/developer-guide.md
```

If the user specifies a different location (local file path or URL), use
that instead.

From the design document, understand:
- The Containerfile template pattern (base → service image)
- The kolla interface contract (ENTRYPOINT, CMD, scripts, users, sudoers)
- The four dep files: builddeps.txt, pythonbuilddeps.txt, bindeps.txt, pythondeps.txt
- The consolidation strategy
- The multi-stage build pattern and pip install (`--prefix=/usr`, `--no-deps`)
- The sources.txt format and streams concept
- The source and constraints file locations

## Step 2: Fetch tcib container definitions

Fetch the tcib YAML definitions for the service from `https://github.com/openstack-k8s-operators/tcib` using curl.

First, get the directory listing to find all sub-service definitions:

```bash
curl -sL "https://api.github.com/repos/openstack-k8s-operators/tcib/git/trees/main?recursive=1" | jq -r '.tree[].path' | grep -i "<service>"
```

Then fetch each relevant YAML file via the raw content URL:

```bash
curl -sL https://raw.githubusercontent.com/openstack-k8s-operators/tcib/main/container-images/tcib/base/os/<service>-base/<service>-base.yaml
```

For each sub-service (e.g., `<service>-api`, `<service>-conductor`):

```bash
curl -sL https://raw.githubusercontent.com/openstack-k8s-operators/tcib/main/container-images/tcib/base/os/<service>-base/<sub-service>/<sub-service>.yaml
```

Note: Some services may not follow the `<service>-base/` hierarchy pattern. Check for direct entries under `os/` as well (e.g., `placement-api/` is directly under `os/`, not under a `placement-base/`).

Extract from each YAML:
- `tcib_packages` — RPM packages installed
- `tcib_runs` and `tcib_actions` — build-time commands
- `tcib_user` — runtime user
- Any `tcib_copies`, `tcib_envs`, `tcib_volumes`

## Step 3: Fetch the RDO spec file

Fetch the RPM spec file to cross-reference dependencies:

```bash
# Try the common spec file name patterns
curl -sL https://raw.githubusercontent.com/rdo-packages/<service>-distgit/rpm-master/openstack-<service>.spec

# If that returns 404, try the python- prefix
curl -sL https://raw.githubusercontent.com/rdo-packages/<service>-distgit/rpm-master/python-<service>.spec
```

If neither works, list the repo contents to find the spec file name:

```bash
curl -sL "https://api.github.com/repos/rdo-packages/<service>-distgit/git/trees/rpm-master" | jq -r '.tree[].path' | grep '\.spec$'
```

From the spec file, extract:
- `Requires:` lines for each subpackage (filtering out `python3-*` packages since those come via pip)
- `%pre` sections for user/group creation (UIDs, GIDs, group memberships)
- Subpackage names to understand the service decomposition
- `%install` section — directory creation (`install -d`) and file copies
  (`install -p -D`). Pay attention to permissions (`-m 755`, `-m 640`, etc.)
- `%files` section for each subpackage — which files belong to which
  subpackage (this determines which files go in which container image)
- `Source` declarations — files shipped in the spec that are NOT from the
  upstream source tree (these must be maintained in the containerfile repo)

## Step 4: Fetch upstream requirements

Fetch the service's requirements.txt:

From openstack-k8s-operators/devskills, MIT.

More from openstack-k8s-operators/devskills

Signals

Stars
9
Forks
23
Open issues
0
Last commit (this folder)
Aug 25, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from openstack-k8s-operators

Cite this page

generate-containerfile skill. Agent Mart. https://agentmart.dev/skills/openstack-k8s-operators-generate-containerfile (last updated 2026-10-24)