Host-Pool Plugin

The Host-Pool plugin is an infrastrcture-provisioning plugin that is used in conjunction with the Cloudify Host-Pool Service to use hosts from a pool of existing hosts. When the plugin is requested to provision a host, it makes a request to the host-pool service which, in turn, looks for available matching hosts inside the pool, and assigns one to that request.

The same flow is executed when the plugin is requested to release that host. The pool of available hosts is determined at the time of the host-pool service installation, as explained in this topic.

Plugin Requirements

Host-Pool Plugin

cloudify.hostpool.nodes.Host

The base type for a pool host.

Derived From: cloudify.nodes.Compute

Properties:

Mapped Operations:

Note that you must provide the service_url of the host pool service as an input to the lifecycle operations.

Attributes:

cloudify.hostpool.nodes.LinuxHost

Derived From: [cloudify.hostpool.nodes.Host]

Properties:

cloudify.hostpool.nodes.WindowsHost

Derived From: [cloudify.hostpool.nodes.Host]

Properties:

Host-Pool Service

The Host-Pool service is a Web service that is designed to manage a large pool of hosts for use by Cloudify deployments. It enables the use of multiple existing hosts to be allocated for a deployment. It supports defining hosts by:

The Host-Pool plugin makes calls to this service every time that a new host must to be provisioned/terminated.

To simplify the installation of this service, it is provided as a regular Cloudify node type.

cloudify.nodes.HostPoolService

Derived From: cloudify.nodes.SoftwareComponent

Properties:

Mapped Operations:

Attributes:

You must have a running Host-Pool service before you can start using the plugin.

Examples

The following is an example of using the host-pool-plugin node types.

tosca_definitions_version: cloudify_dsl_1_2

imports:
  - http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml
  - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-host-pool-plugin/1.4/plugin.yaml

inputs:
  hostpool_svc_endpoint:
    type: string
    description: |
      Endpoint for the host-pool REST service
    default: http://192.168.1.100:8080

node_templates:
  host_from_pool:
    type: cloudify.hostpool.nodes.LinuxHost
    properties:
      filters:
        tags:
        - redhat
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          inputs:
            service_url: { get_input: hostpool_svc_endpoint }
        delete:
          inputs:
            service_url: { get_input: hostpool_svc_endpoint }

A full example that installs the nodecellar application using this plugin is available here.