Get the latest docsYou are looking at documentation for an older release. Not what you want? Go to the current release documentation.
plugins you can install Python modules and use the installed or preinstalled modules to perform different operations. You can also specify where a specific plugin’s operations will be executed.
plugins section is a dictionary in which each item in the dictionary represents a plugin to use in the blueprint.
plugins: plugin1: ... plugin2: ...
|executor||yes||string||Where to execute the plugin’s operations. Valid Values:
|source||conditional||string||From where to retrieve the plugin. May be either a path relative to the
|install_arguments||no||string||Optional arguments passed to the ‘pip install’ command created for the plugin installation.|
|install||no||boolean||Whether to install the plugin, as it might already be installed as part of the agent. Defaults to
|package_name||conditional||string||Managed plugin package name. See Managed Plugins. (Supported since: cloudify_dsl_1_2) If
|package_version||no||string||Managed plugin package version. See Managed Plugins. (Supported since: cloudify_dsl_1_2)|
|supported_platform||no||string||Managed plugin supported platform (e.g.
|distribution||no||string||Managed plugin distribution. See Managed Plugins. (Supported since: cloudify_dsl_1_2)|
|distribution_version||no||string||Managed plugin distribution version. See Managed Plugins. (Supported since: cloudify_dsl_1_2)|
|distribution_release||no||string||Managed plugin distribution release. See Managed Plugins. (Supported since: cloudify_dsl_1_2)|
When a plugin definition is configured with
install: true (which is the default),
package_name must be specified as well.
package_name is specified, the Manager is queried for a matching managed plugin. If one is found, it is installed.
package_name is not specified, or no matching managed plugin is found,
source is used.
If no managed plugin is found and
source is not defined, plugin installation fails.
source specifies where the plugin to be installed is located. May be:
- A URL to an archive of the plugin to be installed.
- The name of a directory containing the plugin, which is expected to be inside the blueprint’s
sourcemethod should only be used when developing plugins and the
skip-plugins-validationflag should be passed at deployment time.
package_name specifies the name of the managed plugin to be installed.
may be used to explicitly specify the managed plugin to be installed. Otherwise, an implicit resolution mechanism is utilized that fetches the latest matching managed plugin.
Learn more about using the Cloudify plugin API here
executor specifies where the plugin should be installed and where operations using this plugin are to be executed. Valid values are
in which case the plugin is installed on the central deployment agent, and
host_agent, in which case the plugin is installed on the compute node that contains
the node that maps an operation to the plugin. To override the
executor configuration on a per-operation basis, see operation executor.
Source Plugin - External
The following is an example of a plugin definition that would be installed via a URL.
plugins: openstack: executor: central_deployment_agent source: https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/1.3.zip node_templates: vm: type: openstack.nodes.Server interfaces: my_interface: create: openstack.nove_plugin.server.create
Source Plugin - Packaged With Blueprint
The following is an example of a plugin definition that is pre-bundled with the blueprint, under its
plugins: my_blueprint_plugin: executor: central_deployment_agent # name of directory containing the plugin inside the blueprint 'plugins' directory source: my-blueprint-plugin node_templates: app: type: cloudify.nodes.Application interfaces: my_interface: delete: my_blueprint_plugin.blueprint_plugin_package.tasks.delete
The following is an example of a plugin definition so that the plugin is not installed. This might be used when a custom agent package, created using the agent-packager, already includes this plugin, meaning that no installation is necessary.
plugins: my_plugin: executor: central_deployment_agent install: false node_templates: app: type: cloudify.nodes.Application interfaces: my_interface: configure: my_plugin.my_plugin_package.operations.configure
The following is an example of a plugin definition for a plugin to be installed via the managed plugins mechanism.
plugins: some_managed_plugin: executor: host_agent package_name: some-managed-plugin node_templates: app: type: cloudify.nodes.Application interfaces: my_interface: start: some_managed_plugin.my_managed_plugin_package.operations.start
The following is an example of a plugin definition for a plugin to be installed with specific install arguments.
plugins: plugin_with_args: executor: central_deployment_agn source: http://www.example.com/path/to/plugin.tar.gz # pip install will be called with these arguments appended # with the plugin directory as the current working directory. install_arguments: -r requirements.txt node_templates: app: type: cloudify.nodes.Application interfaces: my_interface: start: plugin_with_args.withargs_plugin_package.operations.start