Skip to content

Commit

Permalink
Add a readme for the "files" dir
Browse files Browse the repository at this point in the history
Signed-off-by: Johanan Liebermann <jliebermann@microsoft.com>
  • Loading branch information
johananl committed May 30, 2022
1 parent ff20049 commit 1417bbb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions images/capi/packer/files/flatcar/README.md
@@ -0,0 +1,42 @@
# Flatcar-Related Build Files

This directory contains files needed for building Flatcar Container Linux CAPI images.

The following subdirectories exist:

- `clc` - contains [Container Linux Config][1] files.
- `ignition` - contains [Ignition][2] files generated from the CLC files in the `clc` directory.
- `scripts` - contains scripts which are used by the various Flatcar builds.

## Ignition Files

Some Flatcar builds (e.g. QEMU) require Ignition files during OS installation. These files can be
consumed directly from the `ignition` directory. Ignition files are generated from CLC files by the
[Container Linux Config Transpiler][3].

### Adding New Files

To add a new Ignition file, do the following:

1. Place a CLC YAML file with the desired config in `clc`.
1. Add the name of the file without an extension to the `ignition_files` variable under the
`gen-ignition` target in the [Makefile](../../../Makefile). For example, for a CLC file named
`foo.yaml`, add `foo` to the Make target.
1. Run `make gen-ignition` under `images/capi`. A new Ignition file is generated under `ignition`.
1. Commit both the CLC file and the resulting Ignition file and open a PR to merge the changes.

Once the changes are merged, the new Ignition file can be referenced in Flatcar builds and consumed
as a raw file directly from GitHub.

### Changing Existing Files

To change an existing Ignition file, do the following:

1. Edit the relevant CLC YAML file in `clc`.
1. Run `make gen-ignition` under `images/capi`. The corresponding Ignition file is updated under
`ignition`.
1. Commit the changes and open a PR to merge them.

[1]: https://flatcar-linux.org/docs/latest/provisioning/cl-config/
[2]: https://flatcar-linux.org/docs/latest/provisioning/ignition/
[3]: https://flatcar-linux.org/docs/latest/provisioning/config-transpiler/

0 comments on commit 1417bbb

Please sign in to comment.