--dry-run
to the command to see what actions would be taken by the mirror, without performing actual modifications.<mirror>.yaml
file that details the configurations for the mirror.
Parameter | Description |
---|---|
channels | List of URLs for channels you want to mirror from. If a short channel name is supplied, Workbench uses its system-level .condarc file’s channel_alias: value to complete the channel URL. |
platforms | List of platforms you want to mirror packages for. For example, win-64 or linux-64 .If no value is supplied, the mirror will include packages for all platforms available on the source channel. |
dest_channel | The short name for the internal Workbench repository channel you are mirroring to. The rest of the channel URL is automatically completed by anaconda-enterprise-cli for you. |
dest_site | The web address or path where you want to store your mirrored packages. The specific formatting and necessity of this value depends on the type of destination repository. For more information, see repository-specific configurations. |
format_policy | Determines how the mirror manages .conda and .tar.bz2 files:
Defaults to prefer-conda for repositories that support .conda formatting and only-tarbz2 for those that do not.If your repository does not support .conda formatting, Anaconda recommends installing the conda-package-handling package and using the transmute-tarbz2 option. |
clean | true / false - If true , removes packages from the destination channel that are not on the source channel when updating.Default: false (to ensure packages are not inadvertently removed) |
dry_run | true / false - If true , outputs what actions would be taken by the mirror, without performing actual modifications.Default: false |
Parameter | Description |
---|---|
python_versions | A comma-separated list of Python versions. Restricts all Python packages and packages that depend on Python to these versions. |
r_versions | A comma-separated list of R versions. Restricts all R packages and packages that depend on R to these versions. |
pkg_list | List of package names or valid MatchSpec strings. If supplied, only the specified packages will be mirrored, not their dependencies. Cannot be paired with license_exclude , exclude , or include . |
license_exclude | List of license families to exclude from the mirror. To see a list of valid license families, use the anaconda-mirror-ae5 --help command. Cannot be paired with pkg_list . |
exclude | List of package names or valid MatchSpec strings to exclude. Cannot be paired with pkg_list . |
include | List of package names or valid MatchSpec strings to override the mirror’s other filters and include these packages even if they would otherwise be filtered out. Cannot be paired with pkg_list . |
Parameter | Description |
---|---|
username / password | Supplies credentials for repository authentication. For more information, see repository-specific configurations. |
strict_platforms | true / false - If true , excludes noarch from the mirror.Default: false (all platforms use noarch) |
max_attempts | Number of retry attempts for failed connections. Default: 5 |
max_failures | Number of failed transactions before stopping. Default: 100 |
verify_ssl | true / false - Enables or disables SSL verification.Default: true |
NO_PROXY
variable.dest_site
can be a repository hostname, or a full URL.
anaconda-mirror
interprets the channel path as:username
and password
values in your .yaml
file 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.password
value in your .yaml
file. This is delivered as a bearer token using the Authorization: Bearer
header. This must be an access token..netrc
file to store your username
and password
for the repository. These values are delivered using basic HTTP authentication.dest_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 may wish to use the AWS_PROFILE
environment variable to select among multiple configurations.
dest_site
and dest_channel
values.
No authentication is necessary for local repositories.
dest_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.
.yaml
files you can use to mirror some common repositories:
Anaconda’s main channel (full)
Anaconda’s R channel (full)
Air-gapped network mirror
anaconda-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:
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:
Parameter | Description |
---|---|
user | The local user under which the PyPI packages are imported. Default: pypi |
pkg_list | List of package names to mirror. If supplied, only the specified packages will be mirrored, not their dependencies. Cannot be paired with blocklist or allowlist . |
allowlist | List of package names to mirror. If supplied, only the specified packages will be mirrored, not their dependencies. Cannot be paired with pkg_list . |
blocklist | List of package names to skip. Packages listed here are not mirrored. Cannot be paired with pkg_list . |
latest_only | If supplied, only the latest package versions are mirrored. Default: false |
remote_url | The URL of the PyPI mirror./pypi is appended to build the XML RPC API URL, /simple for the simple index and /pypi/{package}/{version}/json for the JSON API.Default: https://pypi.python.org/ |
xml_rpc_api_url | A custom value for XML RPC URL. If this value is present, it takes precedence over the URL built using remote_url Default: null. |
simple_index_url | A custom value for the simple index URL. If this value is present, it takes precedence over the URL built using remote_url. Default: null. |
use_xml_rpc | Whether to use the XML RPC API as specified by PEP381. If this is set to true , the XML RPC API is used to determine which packages to check. Otherwise, the script falls back to the simple index. If the XML RPC fails, the simple index is used.Default: true |
use_serial | If set to true , uses the serial number provided by the XML RPC API. Only packages updated since the last serial saved are checked. If this is set to false , all PyPI packages are checked for updates. Default: true |
create_org | Creates the mirror user as an organization instead of a regular user account. All superusers are added to the Owners group of the organization. Default: false |
Example PyPI mirror (partial)
pip.conf
as follows:
pip.conf
, run the following command.