Developer documentation¶
Ignite is a Go project using well-known libraries like:
- github.com/spf13/cobra
- github.com/spf13/pflag
- k8s.io/apimachinery
- sigs.k8s.io/yaml
- github.com/firecracker-microvm/firecracker-go-sdk
and so on.
It uses Go modules as the vendoring mechanism.
Build from source¶
The only build requirement is Docker.
To build ignite, ignited and ignite-spawn for all supported architectures, run:
make build-all
To only build for a specific architecture, append the architecture to the command:
make build-all-amd64
make build-all-arm64
Pre-commit tidying¶
Before committing, please run this make target to (re)generate autogenerated content and tidy your local environment:
make autogen tidy
Building reference OS images¶
make -C images WHAT=ubuntu
make -C images WHAT=centos
Generic instructions on releasing a version¶
- Fix all issues in the
v0.X.Ymilestone - Create a
v0.X.Ytracking issue (like https://github.com/weaveworks/ignite/issues/379) - Update documentation for the latest version (like https://github.com/weaveworks/ignite/pull/378)
- Make sure your git remote
upstreampoints togit@github.com:weaveworks/ignite.git, andorigintogit@github.com:<user>/ignite.git - Get a Github API token with
repoaccess, and put it inbin/gren_tokenfor automatic release note generation - Make sure you're part of the Ignite DockerHub Team so you have access to push to the
weaveworks/ignite*repositories
Releasing a minor version¶
- A minor version is done based off the
mainbranch - Set the environment variable to tell what minor version to release:
export MINOR=X - If this is a prerelease, set e.g.
export EXTRA=-alpha.1,export EXTRA=-beta.1, orexport EXTRA=-rc.1 - The script to run is
hack/minor-release.sh all. It will: - Tidy your environment by running
make tidy autogen graphand doing a commit - Autogenerate the changelog, provisionally using GREN. The script will wait for you to open an editor and manually fixup
docs/releases/v0.X.0.md. Then proceed withY, which will create the commit to be taggedv0.X.0 - Create the
v0.X.0tag usinggit tag - Build the release binaries to
bin/releases/v0.X.0and push theweaveworks/ignite:v0.X.0images and manifest list to Docker Hub - Push the tag, and latest commits to the
mainand newly-createdrelease-0.Xbranch
Releasing a patch version¶
- A patch version is done based off the
release-0.Xbranch - Note: Before running the release,
git cherrypickrelevant commits into the release branch - Set the environment variables to tell what patch version to release:
export MINOR=Xandexport PATCH=Y - If this is a prerelease, set e.g.
export EXTRA=-alpha.1,export EXTRA=-beta.1, orexport EXTRA=-rc.1 - The script to run is
hack/patch-release.sh all - Tidy your environment by running
make tidy autogen graphand doing a commit - Autogenerate the changelog, provisionally using GREN. The script will wait for you to open an editor and manually fixup
docs/releases/v0.X.Y.md. Then proceed withY, which will create the commit to be taggedv0.X.Y - Create the
v0.X.Ytag usinggit tag - Build the release binaries to
bin/releases/v0.X.Yand push theweaveworks/ignite:v0.X.Yimages and manifest list to Docker Hub - Push the tag, and latest commits to the
release-0.Xbranch
Publishing a release¶
- Go to
Project Releasesin the Github UI, and selectDraft a new release - Select the tag you've just created
v0.X.Yfrom either themain(minor releases) orrelease-0.Xbranch - Let the release title be
v0.X.Y - Paste the content in
docs/releases/v0.X.Y.mdin the release description, and add installing guidelines as per the earlier releases - Upload the binaries in
bin/releases/v0.X.Ynamed as{ignite,ignited}-{amd64,arm64} - Click
Publish Releaseand announce to everyone you know!