about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-10-28T17·37+0100
committerVincent Ambo <github@tazj.in>2019-10-28T21·31+0100
commitb736f5580de878a6fb095317058ea11190e53a4e (patch)
treeadfe9a177f40264f16a80e193ddc01cd2ba60f66
parentd8fba233655e127d54926394eacd4b9391ec8b8b (diff)
docs: Add storage configuration options to README
-rw-r--r--tools/nixery/README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/nixery/README.md b/tools/nixery/README.md
index 1574d5950a22..32e5921fa475 100644
--- a/tools/nixery/README.md
+++ b/tools/nixery/README.md
@@ -74,13 +74,17 @@ interactive images.
 Nixery supports the following configuration options, provided via environment
 variables:
 
-* `BUCKET`: [Google Cloud Storage][gcs] bucket to store & serve image layers
 * `PORT`: HTTP port on which Nixery should listen
 * `NIXERY_CHANNEL`: The name of a Nix/NixOS channel to use for building
 * `NIXERY_PKGS_REPO`: URL of a git repository containing a package set (uses
   locally configured SSH/git credentials)
 * `NIXERY_PKGS_PATH`: A local filesystem path containing a Nix package set to
   use for building
+* `NIXERY_STORAGE_BACKEND`: The type of backend storage to use, currently
+  supported values are `gcs` (Google Cloud Storage) and `filesystem`.
+
+  For each of these additional backend configuration is necessary, see the
+  [storage section](#storage) for details.
 * `NIX_TIMEOUT`: Number of seconds that any Nix builder is allowed to run
   (defaults to 60)
 * `NIX_POPULARITY_URL`: URL to a file containing popularity data for
@@ -91,6 +95,26 @@ account key, Nixery will also use this key to create [signed URLs][] for layers
 in the storage bucket. This makes it possible to serve layers from a bucket
 without having to make them publicly available.
 
+### Storage
+
+Nixery supports multiple different storage backends in which its build cache and
+image layers are kept, and from which they are served.
+
+Currently the available storage backends are Google Cloud Storage and the local
+file system.
+
+In the GCS case, images are served by redirecting clients to the storage bucket.
+Layers stored on the filesystem are served straight from the local disk.
+
+These extra configuration variables must be set to configure storage backends:
+
+* `GCS_BUCKET`: Name of the Google Cloud Storage bucket to use (**required** for
+  `gcs`)
+* `GOOGLE_APPLICATION_CREDENTIALS`: Path to a GCP service account JSON key
+  (**optional** for `gcs`)
+* `STORAGE_PATH`: Path to a folder in which to store and from which to serve
+  data (**required** for `filesystem`)
+
 ## Roadmap
 
 ### Kubernetes integration