about summary refs log tree commit diff
path: root/tools/nixery/build-image
AgeCommit message (Collapse)AuthorFilesLines
2019-11-09 fix(build-image): Allow "cross-builds" of images for different archVincent Ambo1-4/+9
Imports the package set twice in the builder expression: Once configured for the target system, once configured for the native system. This makes it possible to fetch the actual image contents for the required architecture, but use local tools to assemble the symlink layer and metadata.
2019-11-09 refactor(builder): Parameterise CPU architecture to use for imagesVincent Ambo1-1/+7
Adds the CPU architecture to the image configuration. This will make it possible to let users toggle architecture via meta-packages. Relates to #13
2019-10-11 refactor(server): Only compress symlink forest layer onceVincent Ambo1-8/+5
Instead of compressing & decompressing again to get the underlying tar hash, use a similar mechanism as for store path layers for the symlink layer and only compress it once while uploading.
2019-10-11 fix(server): Use uncompressed tarball hashes in image configVincent Ambo1-3/+6
Docker expects hashes of compressed tarballs in the manifest (as these are used to fetch from the content-addressable layer store), but for some reason it expects hashes in the configuration layer to be of uncompressed tarballs. To achieve this an additional SHA256 hash is calculcated while creating the layer tarballs, but before passing them to the gzip writer. In the current constellation the symlink layer is first compressed and then decompressed again to calculate its hash. This can be refactored in a future change.
2019-10-11 feat(server): Apply GZIP compression to all image layersVincent Ambo1-2/+2
This fixes #62
2019-10-06 fix(build-image): Import 'match' from builtinsVincent Ambo1-0/+1
2019-10-03 chore(build-image): Remove nixery-build-layersVincent Ambo2-64/+7
This functionality has been rolled into the server component and is no longer required.
2019-10-03 refactor: Remove remaining MD5-hash mentions and computationsVincent Ambo1-3/+2
2019-10-03 fix(nix): Minor fixes to derivations for new build processVincent Ambo1-1/+1
2019-10-03 feat(nix): Add derivation to create layer tars from a store path setVincent Ambo2-7/+64
This introduces a new Nix derivation that, given an attribute set of layer hashes mapped to store paths, will create a layer tarball for each of the store paths. This is going to be used by the builder to create layers that are not present in the cache. Relates to #50.
2019-10-03 chore(build-image): Simplify wrapper build & remove layer groupingVincent Ambo4-444/+18
Simplifies the wrapper script used to invoke Nix builds from Nixery to just contain the essentials, since the layer grouping logic is moving into the server itself.
2019-10-03 refactor(build-image): Do not assemble image layers in NixVincent Ambo1-162/+57
This is the first step towards a more granular build process where some of the build responsibility moves into the server component. Rather than assembling all layers inside of Nix, it will only create the symlink forest and return information about the runtime paths required by the image. The server is then responsible for grouping these paths into layers, and assembling the layers themselves. Relates to #50.
2019-09-22 refactor(build-image): Minor tweak to layer construction scriptVincent Ambo1-2/+2
2019-09-21 fix(build-image): Use absolute paths in tarballsVincent Ambo1-2/+2
2019-09-21 feat: Add configuration option for popularity data URLVincent Ambo2-5/+5
2019-09-10 refactor(server): Move package source management logic to serverVincent Ambo2-43/+16
Introduces three new types representing each of the possible package sources and moves the logic for specifying the package source to the server. Concrete changes: * Determining whether a specified git reference is a commit vs. a branch/tag is now done in the server, and is done more precisely by using a regular expression. * Package sources now have a new `CacheKey` function which can be used to retrieve a key under which a build manifest can be cached *if* the package source is not a moving target (i.e. a full git commit hash of either nixpkgs or a private repository). This function is not yet used. * Users *must* now specify a package source, Nixery no longer defaults to anything and will fail to launch if no source is configured.
2019-09-02 refactor(build-image): Remove implicit import of entire package setVincent Ambo1-8/+5
Explicitly refer to where things come from, and also don't import dockerTools as it is no longer used for anything.
2019-09-02 refactor(build-image): Simplify customisation layer builderVincent Ambo1-15/+16
Moves the relevant parts of the customisation layer construction from dockerTools.mkCustomisationLayer into the Nixery code base. The version in dockerTools builds additional files (including via hashing of potentially large files) which are not required when serving an image over the registry protocol.
2019-08-14 refactor(build-image): Extract package set loading into helperVincent Ambo3-64/+84
Some upcoming changes might require the Nix build to be split into multiple separate nix-build invocations of different expressions, thus splitting this out is useful. It also fixes an issue where `build-image/default.nix` might be called in an environment where no Nix channels are configured.
2019-08-14 style: Apply nixfmt to trivial Nix filesVincent Ambo1-11/+9
ALl the ones except for build-image.nix are considered trivial. On the latter, nixfmt makes some useful changes but by-and-large it is not ready for that code yet.
2019-08-14 feat(build-image): Use new image layering algorithm for imagesVincent Ambo1-38/+47
Removes usage of the old layering algorithm and replaces it with the new one. Apart from the new layer layout this means that each layer is now built in a separate derivation, which hopefully leads to better cacheability.
2019-08-14 feat(build-image): Introduce a terrifying hack to build group-layersVincent Ambo2-12/+85
The issue is described in detail in a comment in `build-image/default.nix`, please read it.
2019-08-14 refactor(server): Use wrapper script to avoid path dependencyVincent Ambo4-0/+696
Instead of requiring the server component to be made aware of the location of the Nix builder via environment variables, this commit introduces a wrapper script for the builder that can simply exist on the builders $PATH. This is one step towards a slightly nicer out-of-the-box experience when using `nix-build -A nixery-bin`.