- Follow the steps for administration server setup on your current machine to install the necessary tools for mirroring.
- Configure the Workbench CLI.
It can take several hours to mirror an entire repository, depending on its size.
Creating a conda mirror
The basic steps for creating a conda mirror are:- Prepare your mirror configuration file.
- Log in to the Workbench CLI.
- If necessary, create a channel in the internal Workbench repository.
-
Initiate the mirror by running the following command:
Append
--dry-runto the command to see what actions would be taken by the mirror, without performing actual modifications.
Preparing your mirror configuration file
Create a<mirror>.yaml file that details the configurations for the mirror.
Basic configurations
Define source channel locations, package platforms, and destination/storage location details. Manage package formats, clean up outdated packages, and test configurations without applying changes by including these configurations.Filtering configurations
Fine-tune which packages are included in the mirror. Specify versions of Python or R packages that your packages should be compatible with, include only specific packages, or exclude packages by name and license family type.For more information about MatchSpec, see package match specifications.
Advanced configurations
Configure repository authentication, enforce platform restrictions, and manage SSL verification for secure connections.If Workbench is installed in a proxied environment, see Configuring conda in Workbench for information on setting the
NO_PROXY variable.Repository-specific configurations
JFrog Artifactory
For Artifactory destinations, thedest_site can be a repository hostname, or a full URL.
- Hostname
- URL
If you supply the hostname only,
anaconda-mirror interprets the channel path as:- Configure the
usernameandpasswordvalues in your.yamlfile to contain your credentials. If both values are supplied, they are delivered using basic HTTP authentication. You can substitute an access token for your password if necessary. - Configure just the
passwordvalue in your.yamlfile. This is delivered as a bearer token using theAuthorization: Bearerheader. This must be an access token. - Configure your
.netrcfile to store yourusernameandpasswordfor the repository. These values are delivered using basic HTTP authentication.
S3 bucket
For Simple Storage Service (S3) buckets, the channel path is a concatenation of thedest_site and dest_channel values.
For example, if you were mirroring to an S3 bucket, your dest_site would be set to <bucket_name>/full/path/to/ and the full channel path is interpreted as:
aws CLI tool to configure the target region and authenticate. You might want to use the AWS_PROFILE environment variable to select among multiple configurations.
Local
Much like the S3 bucket, the local repository channel path consists of a concatenation of thedest_site and dest_channel values.
No authentication is necessary for local repositories.
anaconda-enterprise-cli
Thedest_site value defaults to the <SITE_NAME> value established when you configure the workbench CLI. If you have only configured the CLI to be able to access one site (that is, your Workbench instance), there is no need to specify this value.
Authentication is handled when you log in to the CLI.
Example conda and R mirrors
Here are some example mirror.yaml files you can use to mirror some common repositories:
Anaconda’s main channel (full)
Anaconda’s main channel (full)
Anaconda’s R channel (full)
Anaconda’s R channel (full)
Air-gapped network mirror
Air-gapped network mirror
Mirroring a PyPI repository
The full PyPI mirror size is currently close to 10TB, so ensure that your file storage location has sufficient disk space before proceeding. Becauseanaconda-mirror does not handle .pip package formatting, mirrors for PyPI repositories containing such packages are managed by the anaconda-enterprise-cli tool.
The steps are identical to creating a conda mirror:
- Prepare your mirror configuration file.
- Log in to the Workbench CLI.
- If necessary, create a channel in the internal Workbench repository.
-
Initiate the mirror by running the following command:
https://pypi.org into the user’s account.
Mirrored packages can be viewed at https://<FQDN>/repository/pypi/pypi/simple/, replacing <FQDN> with the fully qualified domain name of your installation of Workbench. (The second pypi in the url should match the user configuration value described below.)
PyPI configurations:
PyPI mirror .yaml configuration values consist of the following:
All mirrored PyPI-like channels are publicly available to pull packages from both inside and outside Workbench (no authentication is required).
Example PyPI mirror (partial)
Example PyPI mirror (partial)
Configuring pip
To configure pip to use this new mirror, createpip.conf as follows:
pip.conf, run the following command.