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.Y
milestoneCreate a
v0.X.Y
tracking 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
upstream
points togit@github.com:weaveworks/ignite.git
, andorigin
togit@github.com:<user>/ignite.git
Get a Github API token with
repo
access, and put it inbin/gren_token
for automatic release note generationMake sure you have access to push to the
weaveworks/ignite*
repositories to Docker Hub
Releasing a minor version¶
A minor version is done based off the
master
branchSet 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 graph
and doing a commitAutogenerate 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.0
tag usinggit tag
Build the release binaries to
bin/releases/v0.X.0
and push theweaveworks/ignite:v0.X.0
images and manifest list to Docker HubPush the tag, and latest commits to the
master
and newly-createdrelease-0.X
branch
Releasing a patch version¶
A patch version is done based off the
release-0.X
branchNote: Before running the release,
git cherrypick
relevant commits into the release branch
Set the environment variables to tell what patch version to release:
export MINOR=X
andexport 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 graph
and doing a commitAutogenerate 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.Y
tag usinggit tag
Build the release binaries to
bin/releases/v0.X.Y
and push theweaveworks/ignite:v0.X.Y
images and manifest list to Docker HubPush the tag, and latest commits to the
release-0.X
branch
Publishing a release¶
Go to
Project Releases
in the Github UI, and selectDraft a new release
Select the tag you’ve just created
v0.X.Y
from either themaster
(minor releases) orrelease-0.X
branchLet the release title be
v0.X.Y
Paste the content in
docs/releases/v0.X.Y.md
in the release description, and add installing guidelines as per the earlier releasesUpload the binaries in
bin/releases/v0.X.Y
named as{ignite,ignited}-{amd64,arm64}
Click
Publish Release
and announce to everyone you know!