NO_PROXY
variable.anaconda.yaml
file included in the mirror tool installation, create two yaml
files, one for mirroring the main
channel, and another for mirroring the free
channel.
-c
flag to get a clean mirror each time. This will automatically remove any packages that have been removed from the Anaconda repository between mirrors from your internal repository—excluding any packages your organization has blacklisted.$PREFIX/etc/anaconda-platform/mirrors/pypi.yaml
to customize the mirror behavior and specify the subset of packages you want to mirror.
To create a PyPI mirror:
https://pypi.org
into the pypi
user account. Mirrored
packages can be viewed at <https://anaconda.example.com>/repository/pypi/pypi/simple/
,
replacing <https://anaconda.example.com>
with the actual URL to your installation of Anaconda Enterprise. (The second pypi
in the url should match the user
configuration value described below.)
The following configuration options are available for you to customize your configuration file:
Name | Description |
---|---|
user | The local user under which the PyPI packages are imported. Default: pypi . |
pkg_list | A list of packages to mirror. Only packages listed are mirrored. If this is set, blacklist and whitelist settings are ignored. Default: [] . |
whitelist | A list of packages to mirror. Only packages listed are mirrored. If the list is empty, all packages are checked. Default: [] . |
blacklist | A list of packages to skip. The packages listed are ignored. Default: [] . |
latest_only | Only download the latest versions of the packages. 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 scripts falls back to the simple index. If the XML RPC fails, the simple index is used. Default: true . |
use_serial | Whether to use 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 | Create 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 . |
pip.conf
as follows:
<https://anaconda.example.com>
with the actual URL to your Anaconda Enterprise.
To configure Anaconda Enterprise sessions and deployments to automatically use
the pip.conf
, run the following command.
--index-url
flag directly when invoking pip.
For example,
<https://anaconda.example.com>
with the actual URL to your Anaconda Enterprise
installation, and <package_name>
with the name of a package that is in your local mirror. In
the example URL, the second pypi
should match the user
configuration value described
above.
For more specific information on configuring pip, refer to the official documentation at
https://pip.pypa.io/en/stable/user_guide/#config-file.
cas-sync-api-v5
to the extracted tarball.
In this example we will
extract to /tmp
:
/tmp/mirror/pkgs
. You can
mirror this repository by editing <path to cas-mirror>/etc/anaconda-platform/mirrors/anaconda.yaml
to contain:
anaconda
.
<anaconda.example.com>
with the actual URL to your installation of Anaconda Enterprise.
ap-workspace
pod must be restarted for the configuration change to take effect on new project editor sessions.main
, free
, and r
with group everyone
for read access:
share
command, verify by logging onto the user interface and viewing the Channels list.
For more information, see Sharing channels and packages
https://repo.continuum.io/
.
channels
Specifies the remote channels from which conda packages are downloaded. The
default is a list of the channels <remote_url>/pkgs/free/
and <remote_url>/pkgs/pro/
All specification information should be included in the same file, and can be
passed to the cas-sync-api-v5 command via the --file
argument:
dest_channel
specifies where files will be uploaded.
The default value is: anaconda
.
ssl_verify
setting
from anaconda-enterprise-cli
to determine how to validate certificates. For example,
to use a custom certificate authority:
NO_PROXY
variable. This ensures the mirroring tool does not use the proxy when
communicating with the repository service, and prevents errors such as Max retries exceeded
, Cannot connect to proxy
, and Tunnel connection failed: 503 Service Unavailable
.
cas-sync-api-v5
tool mirrors all platforms. If you do
not need all platforms, edit the YAML file to specify the platform(s)
you want mirrored:
blacklist
, whitelist
or license_blacklist
arguments—it can only be combined with platform-specific and version-specific mirroring.license_blacklist
and blacklist
arguments are combined, license_blacklist
is evaluated first, and blacklist
is a supplemental modifier.
EXAMPLE:
bzip2
, Tk
, and OpenSSL
packages.
whitelist
argument adds or includes packages that would be otherwise excluded by the blacklist
and/or license_blacklist
functions.
EXAMPLE:
readline
, despite the fact that it is GPL3-licensed.
license_blacklist
and blacklist
arguments are combined, license_blacklist
is evaluated first, and blacklist
is a supplemental modifier.
EXAMPLE: In this example, the mirror configuration does not mirror GPL2-licensed packages. It does not mirror the GPL3 licensed package pyqt
because it has been blacklisted. It does mirror all other packages in the repository:
blacklist
and whitelist
arguments are both employed, the blacklist is evaluated first, with the whitelist functioning as a modifier.
EXAMPLE: This example mirrors all packages in the repository except astropy
and pygments
. Despite being listed on the blacklist, accelerate is mirrored because it is listed on the whitelist.