REFERENCE

Shared Snap

Reference for publishing a snap as a versioned template that every project in the org can start from.

A snap belongs to one project. A Shared Snap is a named, versioned copy that the whole org can see and use as a starting point, for example one python-dev environment that every team opens boxes from.

Commands

sys9 run shared-snap ls
sys9 run shared-snap inspect <name>
sys9 run shared-snap publish <snap-id> --name <name> [--description <text>]
sys9 run shared-snap create-snap <name> [--version <n>]
sys9 run shared-snap rm <name> [--version <n>]

Publish

sys9 run shared-snap publish <snap-id> --name python-dev

The first publish creates python-dev at version 1. Publishing to the same name again adds version 2, then 3. A version never changes after it is published, and it is independent of the snap it came from: that snap stays in its project and can change or be removed.

The person who first published a name, and org owners and managers, can add versions to it. Any org member can publish under a new name.

Use

Start a box in the current project straight from a Shared Snap:

sys9 run box create py-task --shared-snap python-dev
sys9 run box create py-task-old --shared-snap python-dev --shared-snap-version 1

Without a version, run9 uses the latest one at that moment. The box gets its own file system; later versions do not change it.

To get an ordinary snap in the current project instead, for example as a base for a prewarm profile:

sys9 run shared-snap create-snap python-dev

Using a Shared Snap needs the member or admin role in the target project.

Inspect and remove

sys9 run shared-snap ls
sys9 run shared-snap inspect python-dev
sys9 run shared-snap rm python-dev --version 1

inspect shows the version history, who published each version, and from which project. Every org member can read it.

One version can be removed by its publisher or by an org owner or manager. Removing a whole name with all its versions is for org owners and managers. Boxes and snaps already created from a version are not affected.