diff --git a/source/faq.rst b/source/faq.rst index 231110f..2c06e9a 100644 --- a/source/faq.rst +++ b/source/faq.rst @@ -34,7 +34,7 @@ If the entry exists: 2. If you ran ``nix-build`` before binary cache has been populated, Nix will maintain a negative cache for the entry. - `See a workaround to remove negative caching `_. + `See a workaround to remove negative caching `_. 3. Substitution could be disabled for that derivation via ``allowSubstitutes = false;`` attribute. diff --git a/source/getting-started.rst b/source/getting-started.rst index a8dea1b..42a1944 100644 --- a/source/getting-started.rst +++ b/source/getting-started.rst @@ -1,3 +1,5 @@ +.. _getting-started: + Getting Started =============== diff --git a/source/importing-from-s3.rst b/source/importing-from-s3.rst new file mode 100644 index 0000000..e1d3498 --- /dev/null +++ b/source/importing-from-s3.rst @@ -0,0 +1,64 @@ +Importing from S3 +================= + +.. versionadded:: 1.7 + +Overview +-------- + +When transitioning to Cachix, it's common practice to migrate your existing binary caches. + +This document outlines the procedure for importing a binary cache from an Amazon S3 bucket into Cachix. + +This migration process is beneficial for managing garbage collection, implementing enhanced authentication schemes, and consolidating multiple binary caches. + +Prerequisites +------------- + +- **AWS CLI**: The AWS Command Line Interface should be installed and configured on your system. +- **Cachix**: Ensure that Cachix is installed. For instructions on installing Cachix, refer to the Getting Started with Cachix guide. + +Importing Cache from S3 +----------------------- + +The following steps outline the process of importing a binary cache from an S3 bucket: + +Step 1: Configure AWS Credentials +********************************* + +Before proceeding, configure your AWS credentials: + +:: + + $ aws configure + + +Follow the prompts to input your AWS Access Key ID, Secret Access Key, and default region. + +Step 2: Cachix Installation +********************************** + +For installation instructions and verification, refer to the :ref:`Cachix getting started guide `. + + +Step 3: Start the Import Process +******************************** + +To import the binary cache from your S3 bucket to Cachix, use the following command: + +Syntax:: + + $ cachix import s3:// + + +Example:: + + $ cachix import mycache s3://mybucket + + +Replace `` with your Cachix cache name and `` with your S3 bucket name. + +Important Notes +--------------- + +- Data Streaming: All contents of the cache will be streamed through the machine executing the command. It is recommended to perform this operation on a machine with a fast network connection. diff --git a/source/index.rst b/source/index.rst index 4af35a5..4a55c7f 100644 --- a/source/index.rst +++ b/source/index.rst @@ -18,6 +18,7 @@ Topics installation.rst getting-started.rst continuous-integration-setup/index.rst + importing-from-s3.rst deploy/index.rst pushing.rst garbage-collection.rst diff --git a/source/installation.rst b/source/installation.rst index 7bb7e99..de15ad9 100644 --- a/source/installation.rst +++ b/source/installation.rst @@ -7,7 +7,7 @@ Installation Recommended ----------- -With `Nix installed `_:: +With `Nix installed `_:: $ nix-env -iA cachix -f https://cachix.org/api/v1/install