How to vary creation/not creation of node instances during "install" workflow?

78 Views Asked by At

The task is: we have a blueprint with all needed node templates described in it, and we want to create a deployment, that includes all these nodes, but we don't want all of them to be created during the "install" workflow. I mean, e.g. it's needed to install all nodes in created deployment, except some of them, for example, openstack instance's volume. But we know - it may be needed to create and add volume later and we should leave the ability to do so. As far as volume template expects some input (it's name, for example) i want to pass 'null' as input and NOT to get volume created while "install" workflow.

Solutions like to create many various blueprints, or to delete some nodes after creation - are not acceptable.

Is that possible and how it may be performed?

I appreciate all your insights Thanks in advance!

1

There are 1 best solutions below

0
On

We've got a similar sort of requirement. Our plan is to use Cloudify 3.4's scaling capability - which is supposed to be used for multiple instances, but works just as well for just 0 or 1 instances.

Supply 0 as the value for the number_of_nodes input into the blueprint below - only tested with a local cfy install (but should be fine) - and the create & start operations will not be called. To instantiate the node post-install you'd use the built-in scale workflow. Alternatively, supply 1 at install and the node will be created.

tosca_definitions_version: cloudify_dsl_1_3

imports:
  - http://www.getcloudify.org/spec/cloudify/3.4.1/types.yaml

inputs:
  number_of_nodes:
    default: 0

node_templates:
  some_vm:
    type: cloudify.nodes.Root
    capabilities:
      scalable:
        properties:
          default_instances: { get_input: number_of_nodes }
          max_instances: 1