Metadata-Version: 2.5
Name: cs-image-system
Version: 0.1.7
Summary: Declarative provisioning of identities, storages, base images and instance images on AWS, GCE and docker, from one YAML tree through gates: the core in one install, each provider as an extra
Project-URL: Repository, https://github.com/infrastructurebuilder/cs-image-system-3
Project-URL: Documentation, https://github.com/infrastructurebuilder/cs-image-system-3/blob/develop/docs/OPERATIONS.md
Project-URL: Configuration, https://github.com/infrastructurebuilder/cs-image-system-3/blob/develop/docs/CONFIGURATION.md
Author-email: Mykel Alvis <mykelalvis@infrastructurebuilder.org>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: cs-image-system-ansible-plugin==0.1.7
Requires-Dist: cs-image-system-base==0.1.7
Requires-Dist: cs-image-system-bash-mod-plugin==0.1.7
Requires-Dist: cs-image-system-contract<0.5,>=0.4
Requires-Dist: cs-image-system-default-os-plugin==0.1.7
Requires-Dist: cs-image-system-hashicorp-utils==0.1.7
Requires-Dist: cs-image-system-local-state-plugin==0.1.7
Requires-Dist: cs-image-system-packer-plugin==0.1.7
Requires-Dist: cs-image-system-posix-identity-plugin==0.1.7
Requires-Dist: cs-image-system-system==0.1.7
Requires-Dist: cs-image-system-tofu-roots==0.1.7
Provides-Extra: all
Requires-Dist: cs-image-system-aws-runtime-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-docker-runtime-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-gcloud-runtime-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-gcs-state-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-okta-opa-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-tf-docker-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-tf-ebs-instance-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-tf-gcp-plugin==0.1.7; extra == 'all'
Requires-Dist: cs-image-system-tf-s3-state-plugin==0.1.7; extra == 'all'
Provides-Extra: aws
Requires-Dist: cs-image-system-aws-runtime-plugin==0.1.7; extra == 'aws'
Requires-Dist: cs-image-system-tf-ebs-instance-plugin==0.1.7; extra == 'aws'
Requires-Dist: cs-image-system-tf-s3-state-plugin==0.1.7; extra == 'aws'
Provides-Extra: docker
Requires-Dist: cs-image-system-docker-runtime-plugin==0.1.7; extra == 'docker'
Requires-Dist: cs-image-system-tf-docker-plugin==0.1.7; extra == 'docker'
Provides-Extra: gcloud
Requires-Dist: cs-image-system-gcloud-runtime-plugin==0.1.7; extra == 'gcloud'
Requires-Dist: cs-image-system-gcs-state-plugin==0.1.7; extra == 'gcloud'
Requires-Dist: cs-image-system-tf-gcp-plugin==0.1.7; extra == 'gcloud'
Provides-Extra: okta
Requires-Dist: cs-image-system-okta-opa-plugin==0.1.7; extra == 'okta'
Description-Content-Type: text/markdown

# cs-image-system

[![CI](https://github.com/infrastructurebuilder/cs-image-system-3/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/infrastructurebuilder/cs-image-system-3/actions/workflows/ci.yml)

A plugin-based, configuration-driven system that turns one YAML tree into
infrastructure-as-code for identities, storages, base images and instance
images, and applies it through gates, on AWS, on GCE and on a docker host.
Its purpose is scientific compute: machine images that are correct for a
given HPC model, formally released, whose users log in through Okta
Privileged Access.

## Where to start

- [docs/DAILY_DRIVER.md](docs/DAILY_DRIVER.md) — how a person actually uses the system: what must exist first, the first run, making and changing things, what proves what, and what a failure means.
- [docs/DESCRIPTION.md](docs/DESCRIPTION.md) — what the system is and how it works, in one read.
- [GOALS.md](GOALS.md) — what it is for and the properties it keeps.
- [docs/OPERATIONS.md](docs/OPERATIONS.md) — the operating manual: runs, the developer workflow, CI, the operator's cycles, the rules.
- [docs/CONFIGURATION.md](docs/CONFIGURATION.md) — the configuration reference: every file, every type, every field, one example each.
- [docs/DESIGN.md](docs/DESIGN.md) — the design and its rationale.
- [docs/GLOSSARY.md](docs/GLOSSARY.md) — the house words (the bar, the walk, the take, the record, the gate, …), one paragraph each, every term linked to the page that owns it.
- [docs/PLUGINS.md](docs/PLUGINS.md) — the packages, each with its own README ending in the same four sections: prerequisites, configuration, what it tests, when it fails.
- [GOLDEN.md](GOLDEN.md) — the pinned emission every change is judged against.
- [docs/PARITY.md](docs/PARITY.md) — how the system and its documentation can diverge, and how to check.
- [REMINDERS.md](REMINDERS.md) — what the operator checks at intervals: the monthly general items and the GCP account's cost housekeeping.
- [docs/history/](docs/history/README.md) — frozen records of how the system got here; nothing there describes the present.
- [INPROGRESS/TODO.md](INPROGRESS/TODO.md) and [PLAN.md](PLAN.md) — the work in flight; a worksheet, not documentation.

## The Justfile contract

The `Justfile` is the single entry point for the build lifecycle. Five
names are reserved, in lifecycle order:

| Target      | Does                                                                                   |
|-------------|----------------------------------------------------------------------------------------|
| `init`      | Toolchain and every workspace package (`uv sync`), the pre-commit hook; idempotent     |
| `build`     | Every workspace member as sdist + wheel under `dist/`; no tests                        |
| `test`      | The fast suite, all blocking: ruff, pyright, the unit tests (the golden included)      |
| `full-test` | `test` plus the docker-backed modification tests and, when the runtime sessions are present, a headless dry `run --all` with `state query --strict`; an absent prerequisite reports SKIPPED |
| `release`   | `just release <part\|version> [test\|pypi]`: probe the index and the token, then the bar (TestPyPI) or `full-test` (PyPI), bump every version line and pin, lock, `build`, publish, commit, tag `v<version>` |

`just` alone lists every recipe, the contract first. `just publish
[test|pypi]` builds and uploads the version in the tree (TestPyPI by
default; a pushed `v*` tag makes CI do the same). `just cli …` runs
the CLI against the reference configuration for the system's own live
proofs; `just fixture-live` proves the frozen fixture against the real
accounts; `just public-safe` is the gate that keeps secrets and people
out of anything published. The cloud change cycle (`cloud-*`,
`ci-login-proof`, `sft-install`) is a configuration repository's own
business: its `Justfile` comes from the release (`cs-image-system
init-config`), and a team runs those recipes from its own repository.
`cs-image-system bootstrap` is the one-time initialisation of such a
repository as terraform from an interview: the answers to
`bootstrap.yaml`, the root to `generated/bootstrap/`, regenerated by every
run and applied by the operator. The manual describes each.

## Layout

`packages/` holds the uv workspace: five core packages and seventeen
plugins, each with its own README ([docs/PLUGINS.md](docs/PLUGINS.md)
describes them together). Twenty are published; `uv tool install
cs-image-system` installs the core and the plugins marked **bare**, each
provider's plugins come with the extra marked beside them (`[aws]`,
`[gcloud]`, `[docker]`, `[okta]`; `[all]` is every one), and the two
marked **never published** are workspace-only. The core (all **bare**):

- [contract](packages/contract/README.md) — the plugin contract: what a
  plugin is written against.
- [base](packages/base/README.md) — the models, the lifecycles, the
  registry and plugin loader, state and the records.
- [system](packages/system/README.md) — the `cs-image-system` CLI.
- [hashicorp-utils](packages/hashicorp-utils/README.md) — the terraform
  library (a library, not a plugin): HCL rendering and the per-run
  collectors, on the contract alone.
- [tofu-roots](packages/tofu-roots/README.md) — the provider-neutral
  terraform roots every OpenTofu root plugin subclasses (a library, not a
  plugin).

The plugins, discovered through Python entry points, one package each:

- [aws-runtime-plugin](packages/aws-runtime-plugin/README.md) — the `aws`
  runtime: profiles, regions, VPCs and subnets. `[aws]`
- [gcloud-runtime-plugin](packages/gcloud-runtime-plugin/README.md) — the
  `gcloud` runtime: projects, zones and networks. `[gcloud]`
- [docker-runtime-plugin](packages/docker-runtime-plugin/README.md) — the
  `docker` runtime: a host's container daemon. `[docker]`
- [default-os-plugin](packages/default-os-plugin/README.md) — the OS
  families a base image is built from. **bare**
- [packer-plugin](packages/packer-plugin/README.md) — the one `packer`
  image builder, which bakes on whichever runtime it is bound to. **bare**
- [ansible-plugin](packages/ansible-plugin/README.md) — modifications as
  ansible playbooks. **bare**
- [bash-mod-plugin](packages/bash-mod-plugin/README.md) — modifications as
  shell scripts and `ensure` items. **bare**
- [okta-opa-plugin](packages/okta-opa-plugin/README.md) — Okta users and
  OPA groups. `[okta]`
- [posix-identity-plugin](packages/posix-identity-plugin/README.md) —
  POSIX groups and users on the machines, with declared ids. **bare**
- [tf-ebs-instance-plugin](packages/tf-ebs-instance-plugin/README.md) —
  the OpenTofu instance and storage builders for AWS. `[aws]`
- [tf-gcp-plugin](packages/tf-gcp-plugin/README.md) — the OpenTofu
  instance and storage builders for Google Cloud. `[gcloud]`
- [tf-docker-plugin](packages/tf-docker-plugin/README.md) — containers and
  named volumes through OpenTofu's docker provider. `[docker]`
- [tf-s3-state-plugin](packages/tf-s3-state-plugin/README.md) — the `s3`
  state backend. `[aws]`
- [gcs-state-plugin](packages/gcs-state-plugin/README.md) — the `gcs`
  state backend. `[gcloud]`
- [local-state-plugin](packages/local-state-plugin/README.md) — the
  `local` state backend: a state file on disk. **bare**
- [contract-example-plugin](packages/contract-example-plugin/README.md) —
  the `inmem` state backend: the proof that a plugin can be written
  against the contract alone, never a backend for a real tree. **never
  published**: installed with the workspace through the root's `dev`
  group, classified `Private :: Do Not Upload`.
- [dummy-plugin](packages/dummy-plugin/README.md) — the extension
  template and test double. **never published**, the same way.

A tree's `Justfile` reads the extras it needs from its own `type:`
words (`just extras`), and `validate` names the extra to install when a
declared word's plugin is absent ("Installing a release" in
[docs/OPERATIONS.md](docs/OPERATIONS.md)).

The terraform modules the builders emit calls to ship inside their
plugin's package (`packages/<plugin>/src/cs_image_system/<pkg>/tfmodules/`,
declared through the `cs_image_system.modules` entry point);
`cs-image-system modules` lists them and `cs-image-system modules --write
<dir>` writes them into a tree.
`tests/` is the suite, with the frozen fixture configuration under
`tests/fixtures/config/` and the golden emission under
`tests/fixtures/v2_golden/`. `docs/examples/` holds the five starter
configuration repositories the release ships and `init-config` writes
out: `complete`, `standard-aws`, `standard-aws-posix`, `standard-docker`
and `standard-gce`. The reference configuration is its own
repository, `cs-image-system-testconfig`, which stands alone with its own
`Justfile` and CI; it is checked out beside this one (`CSIS_CONFIG_ROOT`
overrides) for the system's own live proofs only, and the tests never
read it.

## Licence

Apache-2.0 ([LICENSE](LICENSE)); every package carries the licence file and
declares it in its project metadata.
