- Export all packages and package information from your Anaconda Enterprise 4 Repository.
- Import the packages into Workbench.
- Export each project environment to a
.yml
file. - Convert each project into a format compatible with Workbench.
- Upload each project into Workbench.
Exporting packages
Workbench enables you to create a site dump of all packages used by your organization, including the owners and permissions associated with each package.-
Log in to the Anaconda Enterprise 4 Repo and switch to the
anaconda-server
user. -
To export your packages, run the following command on the server hosting your Anaconda Enterprise 4 Repository:
site-dump
contains the contents of the Repository as it pertains to a particular user. For example anaconda-user-1
has two packages, moto
and pysocks
. The meta.json
file in each user directory contains information about any groups of end users that user belongs to, as well as their organizations.
Package directories contain the package files, prefixed with the id of the database. The meta.json
file in each package directory contains metadata about the packages, including version, build number, dependencies, and build requirements.
Other files included in the site-dump—such as projects and environments—are NOT imported by the package import tool. That’s why users have to export their Notebook projects separately.
Importing packages
You can choose whether to import packages into Workbench by username or organization, or import all packages. Before you begin:- Anaconda recommends you compare the import options before proceeding, so you can choose the option that most closely aligns with the desired outcome for your organization.
- You’ll be using the Workbench command line interface (CLI) to import the packages you exported, so be sure to install the Workbench CLI if you haven’t already.
-
Log in to the command line interface using the following command:
- Follow the instructions below for the method you want to use to import packages.
site-dump
using the following command:
name
with the actual name of the directory you want to import.
You can also pass a list of directories to import.
anaconda-user-1
has the following packages:
moto-0.4.31-2.tar.bz2
with labelmain
pysocks-1.6.6-py35_0.tar.bz2
with labeltest
anaconda-user-1
containing the package filemoto-0.4.31-2.tar.bz2
anaconda-user-1/test
containing the package filepysocks-1.6.6-py35_0.tar.bz2
anaconda-organization
includes a group called Devs
, and the site dump for anaconda-organization
contains a package file named xz-5.2.2-1.tar.bz2
with the label Test
, running the script will create the following channels:
anaconda-organization
– This channel contains all packages that the organization owner can access.anaconda-organization/Devs
– This channel contains all packages that theDev
group can access.anaconda-organization/Devs/Test
– This channel contains all packages labeledTest
that theDev
group can access.
anaconda-user-1
is granted read-write access to the anaconda-user-1
and anaconda-user-1/test
channels, and all members of the Devs
group will have read permission for everything in the Devs
channel.
You can change these access permissions as needed using the Workbench UI or CLI. See Managing channels and packages for more information.
Migrating Anaconda Enterprise 4 Notebook Projects
Before you begin:- If your project refers to channels in your on-premises repository or other channels in anaconda.org, ask you System Administrator to mirror those channels and make them available to you in Workbench.
- If your project use non-conda packages, you’ll need to upload those packages to Workbench.
- If your notebook refers to multiple kernels or environments, set the kernel to a single environment.
- If your project contains several notebooks, verify that they all are using the same kernel or environment.
Exporting your project
Exporting a project creates a yml file that includes all the environment information for the project.- Log in to your Anaconda Enterprise 4 Notebooks server.
- Open a terminal window and activate conda environment 2.6 for your project.
-
Install
anaconda project
in the environment:If you get anot found
message, install it from anaconda.org: -
Export your environment to a file:
<default>
is the name of the environment where the notebook runs. -
Verify that the format of the environment file looks similar to the following, and that the dependencies for each notebook in the project are listed:
If it contains any warning messages, run this script to modify the encoding and remove the warnings:
Converting your project
To create a project that’s compatible with Workbench, perform these steps:-
Run the following command from an interactive shell:
-
Anaconda Enterprise 4 supports Linux only, so run the following command to remove the Windows and macOS platforms from the project’s
anaconda-project.yml
configuration file: -
Run the following command to verify the platforms were removed:
-
Add
/.indexer.pid
and.git
to the.projectignore
file. -
Run the following command to compress your project:
Project names cannot contain spaces or special characters. There is a 1GB size limit for project archive files.
-
In Anaconda Enterprise 4 Notebooks, from your project home page, open the AEN Workbench. Locate your project file (for example,
AENProject.tar.gz
in the image below) in the file list, right-click and select Download.
Uploading your project to Workbench
Log in to Workbench and upload your project archive file<FILENAME>.tar.gz
. See Working with projects for help.
To maintain performance, there is a 1GB file size limit for project files you upload. Workbench projects are based on Git, so Anaconda recommends you commit only text-based files relevant to a project, and keep them under 100MB. Binary files are difficult for version control systems to manage, so Anaconda recommends using storage solutions designed for that type of data, and connecting to those data sources from within your sessions.
Migrating code
Anaconda Enterprise 4 and Workbench are based on a different architecture. This means that code inside your Anaconda Enterprise 4 notebooks might not run as expected in Workbench. Anaconda Enterprise 4 sessions ran directly on the host filesystem, where the libraries, drivers, packages, and connectors required to run them were available. Workbench sessions run in isolated containers with their own independent file system, so they don’t necessarily have access to everything on the host. This difference in architecture primarily impacts the following:Connecting to external data sources
If you currently rely on ODBC/JDBC drivers to connect to specific databases such as Oracle and Impala, Anaconda recommends you use services that support this, such as Apache Impala and Apache Hive, instead. Additionally, using a language and platform agnostic connector such as Thrift allows you to create reproducible code that is more portable. For best practices on how to connect to different external systems inside Workbench, see Connecting to the Hadoop and Spark ecosystem.Service/System | Recommended |
---|---|
Apache Impala | impyla |
Apache Hive | pyhive |
Oracle | build conda package with their driver |
Sharing custom Python libraries
It’s quite common to share custom libraries by adding them to a location in the filesystem where all users can access the libraries they need. Workbench sessions and deployments run in isolated containers, so users cannot use this method to access shared libraries. Instead, Anaconda recommends you create a conda package for each library. This enables you to control access to each package library and version—both essential to managing software at the enterprise level. After you create the package, upload it to the internal Workbench repository, where it can be shared with users and included as a dependency in user sessions and deployments.Installing external dependencies
If you typically install dependencies using system package managers such asapt
and yum
, you can continue to do so in Workbench. Dependencies installed from the command line are available during the current session only, however.
If you want them to persist across project sessions and deployments, add them as packages in the project’s anaconda-project.yml
configuration file. See Configuring project settings for more information.
If your project depends on a package that is not available in your internal Workbench Repository, search anaconda.org or build your own conda package using conda-build, then upload the conda package to the Workbench repository.
If you don’t have the expertise required to build the custom packages your organization needs, consider engaging our professional services team to make your mission-critical analytics libraries available as conda packages.