salt.modules.marathon module

Module providing a simple management interface to a marathon cluster.

Currently this only works when run through a proxy minion.

New in version 2015.8.2.

salt.modules.marathon.app(id)

Return the current server configuration for the specified app.

CLI Example:

salt marathon-minion-id marathon.app my-app
salt.modules.marathon.apps()

Return a list of the currently installed app ids.

CLI Example:

salt marathon-minion-id marathon.apps
salt.modules.marathon.has_app(id)

Return whether the given app id is currently configured.

CLI Example:

salt marathon-minion-id marathon.has_app my-app
salt.modules.marathon.info()

Return configuration and status information about the marathon instance.

CLI Example:

salt marathon-minion-id marathon.info
salt.modules.marathon.restart_app(id, restart=False, force=True)

Restart the current server configuration for the specified app.

Parameters
  • restart -- Restart the app

  • force -- Override the current deployment

CLI Example:

salt marathon-minion-id marathon.restart_app my-app

By default, this will only check if the app exists in marathon. It does not check if there are any tasks associated with it or if the app is suspended.

salt marathon-minion-id marathon.restart_app my-app true true

The restart option needs to be set to True to actually issue a rolling restart to marathon.

The force option tells marathon to ignore the current app deployment if there is one.

salt.modules.marathon.rm_app(id)

Remove the specified app from the server.

CLI Example:

salt marathon-minion-id marathon.rm_app my-app
salt.modules.marathon.update_app(id, config)

Update the specified app with the given configuration.

CLI Example:

salt marathon-minion-id marathon.update_app my-app '<config yaml>'