about summary refs log tree commit diff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2019-08-21 chore(build): Add iana-etc to Nixery's own imageVincent Ambo1-0/+1
This package is used by a variety of programs that users may want to embed into Nixery in addition, for example cachix, but those packages don't refer to it explicitly.
2019-08-21 chore(docs): Update embedded nix-1p versionVincent Ambo1-2/+2
The new version of the document has syntactic fixes that render pipes in code blocks in tables correctly across dialects. Fixes #44
2019-08-19 fix(build): Force nix-env to use NIX_PATHVincent Ambo1-6/+5
Thanks to clever!
2019-08-19 chore(build): Pin nixpkgs to a specific commitVincent Ambo1-0/+2
This is the same commit for which Nixery has popularity data, but that isn't particularly relevant.
2019-08-19 feat(build): Add 'extraPackages' parameterVincent Ambo1-2/+4
This makes it possible to inject additional programs (e.g. Cachix) into a Nixery container.
2019-08-19 fix(docs): Correct link to layering strategyVincent Ambo1-1/+1
2019-08-17 fix(build): Ensure root user is known inside of containerVincent Ambo1-0/+4
This is required by git in cases where Nixery is configured with a custom git repository. I've also added a shell back into the image to make debugging a running Nixery easier. It turns out some of the dependencies already pull in bash anyways, so this is just surfacing it to $PATH.
2019-08-17 fix(server): Sort requested packages in image name & specVincent Ambo1-3/+13
Before this change, Nixery would pass on the image name unmodified to Nix which would lead it to cache-bust the manifest and configuration layers for images that are content-identical but have different package ordering. This fixes #38.
2019-08-17 docs(README): Update links to layering strategyVincent Ambo1-4/+7
2019-08-16 feat(server): add iana-etc and cacert to the shell convenience packageFlorian Klink1-1/+1
These probably should be part of every container image by default, but adding it to the "shell" convenience name probably is our best bet for now.
2019-08-15 fix(build): Ensure GCS signing is used in CIVincent Ambo1-0/+2
2019-08-15 docs: Add asciinema demo to README & bookVincent Ambo2-17/+12
2019-08-15 docs(book): Update information on new layering strategyVincent Ambo2-8/+11
2019-08-15 feat(build): Add an integration test that runs on TravisVincent Ambo1-2/+47
This test, after performing the usual Nixery build, loads the built image into Docker, runs it, pulls an image from Nixery and runs that image. To make this work, there is some configuration on the Travis side. Most importantly, the following environment variables have special values: * `GOOGLE_KEY`: This is set to a base64-encoded service account key to be used in the test. * `GCS_SIGNING_PEM`: This is set to a base64-encoded signing key (in PEM) that is used for signing URLs. Both of these are available to all branches in the Nixery repository.
2019-08-14 chore(server): Add 'go vet' to build processVincent Ambo1-0/+8
2019-08-14 fix(server): Print correct project name during startupVincent Ambo1-1/+1
They grow up so fast :')
2019-08-14 feat(builder): Implement build cache for manifests & layersVincent Ambo3-42/+152
Implements a cache that keeps track of: a) Manifests that have already been built (for up to 6 hours) b) Layers that have already been seen (and uploaded to GCS) This significantly speeds up response times for images that are full or partial matches with previous images served by an instance.
2019-08-14 refactor(server): Extract build logic into separate moduleVincent Ambo3-304/+365
This module is going to get more complex as the implementation of #32 progresses.
2019-08-14 refactor(build-image): Extract package set loading into helperVincent Ambo4-65/+87
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 Ambo5-27/+21
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 Ambo3-13/+86
The issue is described in detail in a comment in `build-image/default.nix`, please read it.
2019-08-14 feat: Add shell.nix for running a local NixeryVincent Ambo1-0/+27
2019-08-14 feat(popcount): Clean up popularity counting scriptVincent Ambo5-51/+93
Adds the script used to generate the popularity information for all of nixpkgs. The README lists the (currently somewhat rough) usage instructions.
2019-08-14 refactor(server): Use wrapper script to avoid path dependencyVincent Ambo7-9/+73
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`.
2019-08-14 chore(docs): Move mdBook derivation to docs/default.nixVincent Ambo2-23/+20
2019-08-14 refactor: Move registry server to a subfolderVincent Ambo4-29/+18
2019-08-14 chore(build): Update Go dependencies & add gonumVincent Ambo1-4/+13
2019-08-14 feat(group-layers): Finish layering algorithm implementationVincent Ambo1-58/+103
This commit adds the actual logic for extracting layer groupings and merging them until the layer budget is satisfied. The implementation conforms to the design doc as of the time of this commit.
2019-08-14 feat(group-layers): Add initial popcount scriptsVincent Ambo2-0/+64
This script generates an entry in a text file for each time a derivation is referred to by another in nixpkgs. For initial testing, this output can be turned into group-layers compatible JSON with this *trivial* invocation: cat output | awk '{ print "{\"" $2 "\":" $1 "}"}' | jq -s '. | add | with_entries(.key |= sub("/nix/store/[a-z0-9]+-";""))' > test-data.json
2019-08-14 feat(group-layers): Add preliminary size & popularity considerationsVincent Ambo1-26/+66
As described in the design document, this adds considerations for closure size and popularity. All closures meeting a certain threshold for either value will have an extra edge from the image root to themselves inserted in the graph, which will cause them to be considered for inclusion in a separate layer. This is preliminary because popularity is considered as a boolean toggle (the input I generated only contains the top ~200 most popular packages), but it should be using either absolute popularity values or percentiles (needs some experimentation).
2019-08-14 feat(group-layers): Implement first half of new layering strategyVincent Ambo1-0/+267
The strategy is described in-depth in the comment at the top of the implementation file, as well as in the design document: https://storage.googleapis.com/nixdoc/nixery-layers.html
2019-08-08 docs: Update embedded nix-1pVincent Ambo1-2/+2
The new commit has an operator table, which is nice to have!
2019-08-08 chore(nix): Increase maximum number of layers to 96Vincent Ambo2-6/+5
This uses a significantly larger percentage of the total available layers (125) than before, which means that cache hits for layers become more likely between images.
2019-08-08 fix(go): Fix breakage in unsigned URLsVincent Ambo1-1/+1
This affected the public instance which is still running without URL signing. Should add some monitoring!
2019-08-05 docs: Minor fixes to README after new website releaseVincent Ambo1-5/+6
2019-08-05 docs: Add a section on Nix itselfVincent Ambo1-0/+31
2019-08-05 docs: Add a section on running your own NixeryVincent Ambo2-2/+145
2019-08-05 docs: Add an "under-the-hood" page explaining the build processVincent Ambo3-4/+110
This page describes the various steps that Nixery goes through when "procuring" an image. The intention is to give users some more visibility into what is going on and to make it clear that this is not just an image storage service.
2019-08-05 feat(build): Build Nixery book and embed it into Nixery imageVincent Ambo2-8/+46
Executes the previously added mdBook on the previously added book source to yield a directory that can be served by Nixery on its index page. This is one of those 'I <3 Nix' things due to how easy it is to do.
2019-08-05 feat(build): Add mdBook 0.3.1 to build environmentVincent Ambo1-0/+18
Upstream nixpkgs currently only has an older versin of mdBook. Until that changes, we keep a different version in here.
2019-08-05 docs: Replace static page with mdBook siteVincent Ambo11-108/+97
Uses mdBook[1] to generate a documentation overview page instead of the previous HTML site. This makes it possible to add more elaborate documentation without having to deal with finicky markup. [1]: https://github.com/rust-lang-nursery/mdBook
2019-08-04 feat(build): Configure Cachix for build caching in CIVincent Ambo1-0/+5
The CI setup is configured with an appropriate key to enable pushes to the nixery.cachix.org binary cache.
2019-08-04 feat(build): Support additional pre-launch commands in imageVincent Ambo1-1/+4
This makes it possible for users to hook basically arbitrary things into the Nixery container image.
2019-08-03 fix(nix): Support retrieving differently cased top-level attributesVincent Ambo1-4/+29
As described in issue #14, the registry API does not allow image names with uppercase-characters in them. However, the Nix package set has several top-level keys with uppercase characters in them which could previously not be retrieved using Nixery. This change implements a method for retrieving those keys, but it is explicitly only working for the top-level package set as nested sets (such as `haskellPackages`) often contain packages that differ in case only.
2019-08-03 docs: Add GCS signing envvars to READMEVincent Ambo1-0/+4
2019-08-03 feat(go): Support signed GCS URLs with static keysVincent Ambo1-20/+57
Google Cloud Storage supports granting access to protected objects via time-restricted URLs that are cryptographically signed. This makes it possible to store private data in buckets and to distribute it to eligible clients without having to make those clients aware of GCS authentication methods. Nixery now uses this feature to sign URLs for GCS buckets when returning layer URLs to clients on image pulls. This means that a private Nixery instance can run a bucket with restricted access just fine. Under the hood Nixery uses a key provided via environment variables to sign the URL with a 5 minute expiration time. This can be set up by adding the following two environment variables: * GCS_SIGNING_KEY: Path to the PEM file containing the signing key. * GCS_SIGNING_ACCOUNT: Account ("e-mail" address) to use for signing. If the variables are not set, the previous behaviour is not modified.
2019-08-03 fix(go): Registry API acknowledgement URI has a trailing slashVincent Ambo1-6/+6
Previously the acknowledgement calls from Docker were receiving a 404 (which apparently doesn't bother it?!). This corrects the URL, which meant that acknowledgement had to move inside of the registryHandler.
2019-08-03 chore: Prevent accidental key leaks via gitignoreVincent Ambo1-0/+6
2019-08-03 fix(static): Fix logo nitpick (smoothened λ edges)Vincent Ambo1-0/+0