Orchestration

Mutagen v0.10.0+ adds support for session orchestration using YAML configuration files. This support makes it easier to integrate Mutagen with a project by defining a set of synchronization and forwarding sessions that work with existing remote infrastructure or container orchestration setups.

By combining Mutagen’s orchestration support with (for example) Docker® Compose, you can create reproducible development environments that you can share across your development team and run on remote infrastructure. You can see an example of this for Mutagen itself in a later section.

Usage

In order to use Mutagen’s orchestration functionality, you need to create a mutagen.yml file in your project. The format of this file is an extension of Mutagen’s core YAML configuration format and is documented in the next section.

Starting a project

Orchestration is managed using the mutagen project commands. Once you’ve created a mutagen.yml file, you can switch to that directory and run:

mutagen project start

Or, if you want to use a file with a different name or in a different directory, you can do:

mutagen project start <path-to-configuration>

The project configuration file provided to mutagen project start is used as a lock file of sorts, and thus it can also be passed to the commands described later in this section to point them to a currently running project. Only one instance of a project is allowed to run at any given time, and Mutagen will warn you if you attempt to invoke mutagen project start on a project that’s already running. If you want to make changes to the configuration for a project, you’ll need to restart the project.

Listing sessions

To list the sessions associated with a project, you can use:

mutagen project list

This will show the status of individual sessions, including and problems or conflicts that may have arisen.

Flushing synchronization sessions

To flush the synchronization sessions associated with a project, you can use:

mutagen project flush

Pausing sessions

To pause the sessions associated with a project, you can use:

mutagen project pause

Resuming sessions

To resume or reconnect sessions associated with a project, you can use:

mutagen project resume

Terminating sessions

To terminate all sessions associated with a project and shut down the project itself, you can use:

mutagen project terminate