| nav_order | 10 |
|---|
{: .no_toc }
- TOC {:toc}
Internally, Butane has a versioned base component which contains support for
a particular Ignition spec version, plus distro-independent sugar. New base
functionality is added only to the experimental base package. Eventually the
experimental base package is stabilized and a new experimental package
created. The base component is versioned independently of any particular
distro, and its versions are not exposed to the user. Client code should
not need to import anything from base.
Each config variant/version pair corresponds to a config package, which
derives either from a base package or from another config package. New
functionality is similarly added only to an experimental config version,
which is eventually stabilized and a new experimental version created.
(This will often happen when the underlying package is stabilized.) A
config package can contain sugar or validation logic specific to a distro
(for example, additional properties for configuring etcd).
Packages outside the Butane repository can implement additional config versions
by deriving from a base or config package and registering their
variant/version pair with config.
-
config/— Top-levelTranslateBytes()function that determines which config version to parse and emit. Clients should typically use this to translate configs. -
config/common/— Common definitions for all spec versions, including translate options structs and error definitions. -
config/*/vX_Y/— User facing definitions of the spec. Each is derived from another config package or from a base package. Each one defines its own translate functions to be registered in theconfigpackage. Clients can use these directly if they want to translate a specific spec version. -
config/util/— Utility code for implementing config packages, including the (un)marshaling helpers. Clients don't need to import this unless they're implementing an out-of-tree config version. -
base/— Distro-agnostic code targeting individual Ignition spec versions. Clients don't need to import this unless they're implementing an out-of-tree config version. -
internal/—main, non-exported code.
Create a release checklist and follow those steps.
Note that the binaries released in this repository are not built using the build script from this repository
but using a butane.spec maintained in Fedora rpms/butane.
This build process uses the go-rpm-macros to set up the Go build environment and is
subject to the Golang Packaging Guidelines.
Consult the Package Maintenance Guide and the Pull Requests Guide if you want to contribute to the build process.
In case you have trouble with the aforementioned standard Pull Request Guide, consult the Pagure documentation on the Remote Git to Pagure pull request workflow.
This checklist describes bumping the Ignition spec version, base version, and distro versions. If your scenario is different, modify to taste.
- Bump
go.modfor new Ignition release and update vendor. - Update imports. Drop
-experimentalfrom Ignition spec versions in*/translate_test.go.
- Rename
base/vB_exptobase/vBand updatepackagestatements. Update imports. - Copy
base/vBtobase/vB+1_exp. - Update
packagestatements inbase/vB+1_exp.
- Rename
config/distro/vD_exptoconfig/distro/vDand updatepackagestatements. Update imports. - Drop
-experimentalfrominit()inconfig/config.go. - Drop
-experimentalfrom examples indocs/. - Copy
config/distro/vDtoconfig/distro/vD+1_exp. - Update
packagestatements inconfig/distro/vD+1_exp. Bump its base dependency tobase/vB+1_exp. - Import
config/vD+1_expinconfig/config.goand adddistroC+1-experimentaltoinit().
- Bump Ignition types imports and rename
ToIgnIandTestToIgnIfunctions inbase/vB+1_exp. Bump Ignition spec versions inbase/vB+1_exp/translate_test.go. - Bump Ignition types imports in
config/distro/vD+1_exp. UpdateToIgnIfunction names,utilcalls, and header comments toToIgnI+1.
- Copy the
C-expspec doc toC+1-exp. Update the header and the version numbers in the description of theversionfield. - Rename the
C-expspec doc toC. Update the header, delete the experimental config warning, and update the version numbers in the description of theversionfield. Update thenav_orderto one less than the previous stable release. - Update
docs/specs.md. - Update
docs/upgrading-*.mdfor the new spec version. Copy the relevant section from Ignition'sdoc/migrating-configs.md, convert the configs to Butane configs, convert field names to snake case, and update wording as needed. Add subsections for any new Butane-specific features.