This is quick start guide for developing and building this project from source on a Linux machine.
The canonical development location of this project is on GitHub. You can fetch the full source with history via
git clone https://github.com/coreos/zincati.git cd zincati
It is recommend to fork a copy of the project to your own GitHub account, and add it as an additional remote:
git remote add my-fork firstname.lastname@example.org:<YOURUSER>/zincati.git
This project is written in Rust, and requires a stable toolchain to build. Additionally,
rustfmt are used by CI jobs to ensure that patches are properly formatted and linted.
You can obtain a Rust toolchain via many distribution methods, but the simplest way is via rustup:
rustup component add clippy rustup component add rustfmt rustup install stable
Building and testing is handled via
make build make check
If you prefer running builds in a containerized environment, you can use the FCOS buildroot image at
docker pull quay.io/coreos-assembler/fcos-buildroot:testing-devel docker run --rm -v "$(pwd):/source:z" quay.io/coreos-assembler/fcos-buildroot:testing-devel bash -c "cd source; make"
The FCOS buildroot image is the same image that is used by integration jobs in CI. It contains all the required dependencies and can be used to build other CoreOS projects too (not only Zincati).
cosa) makes it very handy to embed build artifacts in a custom OS image, in order to test patches in the final environment.
Once a new
cosa workspace has been initialized, you can place the binaries in the
overrides/ directory before building your custom image:
pushd /tmp mkdir test-image cd test-image cosa init https://github.com/coreos/fedora-coreos-config popd docker run --rm -v "$(pwd):/source:z" -v "/tmp/test-image:/assembler:z" \ -e DESTDIR="/assembler/overrides/rootfs" -e TARGETDIR="/assembler/tmp/zincati/target" \ quay.io/coreos-assembler/fcos-buildroot:testing-devel bash -c "cd source; make install" pushd /tmp/test-image cosa fetch cosa build
For more details, see
coreos-assembler overrides documentation.