Bundles — hatcher 0.15.0 documentation (original) (raw)
An EDM environment bundle is essentially a JSON serialization of an environment’s metadata. Bundles are the most reliable way of sharing EDM environments as they not only allow the user to replicate the set of installed dependencies but also support persistence for constraint modifiers, the list of manually installed packages, and the runtime version and implementation.
EDS supports bundle repositories to store and share edm bundles.
List bundles in a repository¶
A common part of upload workflow is to interactively inspect the contents of a repository to verify that new artifacts are present. The format of the command to list bundles is:
$ hatcher bundles list
For example, to list the bundles in the enthought/free repository for the win-x86_64 platform, the following command is used:
$ hatcher bundles list enthought free win-x86_64
Bundle Name Bundle Version Python Tag
mayavi_demo 1.0-1 cp27 mayavi_demo 1.0-2 cp27 ...
Upload bundle to a repository¶
As part of an automated build workflow, it may be required to upload the new build artifact to a development repository in the Enthought Deployment Server. The upload command for bundles is constructed as follows:
$ hatcher bundles upload
For example, if a new mayavi_demo-2.0-2.bundle bundle has been built it may be uploaded to aninternal-dev repository:
$ hatcher bundles upload enthought internal-dev win-x86_64 mayavi_demo-2.0-2.bundle
Once the upload is complete, before long the bundle should be visible in the repository:
$ hatcher bundles list enthought internal-dev win-x86_64
Bundle Name Bundle Version Python Tag
mayavi_demo 2.0-2 cp27 mayavi_demo 1.0-1 cp27 mayavi_demo 1.0-2 cp27 ...
Note
- The valid platforms can be listed with the command inListing current platforms recognized by an Enthought Deployment Server.
- The filename of the bundle is expected to follow the
<name-with-underscores>-<version>-<build>.bundletemplate. - Only metadata bundles are supported for uploading.
Download bundle from a repository¶
After a bundle has been uploaded to one of the Enthought Deployment Server repositories, you may want to download it on some machine and create a new Python environment. The download command for bundles is constructed as follows:
$ hatcher bundles download
To create a new environment with the downloaded bundle, you can use EDM in the same way you would for any other bundle file:
$ edm envs import -f
Note
For the environment creation to work, you will need to make sure your ~/.edm.yaml includes the corresponding package and runtime repositories that are referenced by the bundle description under the repositories and runtime_repositories configuration options.
Retrieve the bundle repository index¶
The bundle repository index can be also downloaded as a json string with theindex command which is constructed as follows:
$ hatcher bundles metadata
Which returns the index of available bundles as a json string grouped by python tag and bundle name.