vCloud Plugin

The vCloud Plugin 2 enables you to use a vCloud-based infrastructure for deploying services and applications.

Plugin Requirements

The plugin is not compatible with blueprints written for tosca-vcloud-plugin.

Authentication with vCloud Director

Each node template, has a client_config property which stores your account credentials. Use an intrinsic function to assign these to the values of secrets](/working_with/manager/using-secrets/) in your manager.

  test_gateway:
    type: cloudify.nodes.vcloud.Gateway
    properties:
      client_config:
        uri: { get_secret: vcloud_uri }
        org: { get_secret: vcloud_org }
        vdc: { get_secret: vcloud_vdc }
        user: { get_secret: vcloud_user }
        password: { get_secret: vcloud_password }
        verify_ssl_certs: false
      resource_id: { get_input: vcloud_gateway_id }

Common Properties

The vCloud Plugin node types have these common properties, except where noted:

Properties

Common Runtime Properties

The vCloud Plugin stores runtime properties reflecting important data about the resource in VCD. These are the common properties:

Runtime Properties

Node Types

Each node type refers to a resource in vCloud.

cloudify.nodes.vcloud.Gateway

Allows Cloudify to verify that a given gateway exists, to store the gateway’s properties in runtime properties, and to allow other resources to interact with it.

Properties

Runtime Properties

Example:

  my_gateway:
    type: cloudify.nodes.vcloud.Gateway
    properties:
      client_config: *client_config
      resource_id: MyGatewayName

cloudify.nodes.vcloud.NatRules

Create and delete NAT rules in the gateway. As this resource is on the gateway, it also preserves the runtime properties of cloudify.nodes.vcloud.Gateway.

Properties

Runtime Properties

Relationships

Examples

  my_nat_rules:
    type: cloudify.nodes.vcloud.NatRules
    properties:
      client_config: *client_config
      resource_config:
        - action: 'dnat'
          original_address: '10.10.10.10.'
          translated_address: '10.10.11.10'
          description: 'Test blueprint example 1'
        - action: 'dnat'
          original_address: '10.11.10.10.'
          translated_address: '10.11.11.10'
          description: 'Test blueprint example 2'
    relationships:
      - type: cloudify.relationships.vcloud.nat_rules_contained_in_gateway
        target: my_gateway

cloudify.nodes.vcloud.DHCPPools

Create and delete DHCP Pool in the gateway. As this resource is on the gateway, it also preserves the runtime properties of cloudify.nodes.vcloud.Gateway.

Properties

Runtime Properties

Relationships

Examples

In this example, we show a dependency on my_network. This is because in the example blueprint,my_dhcp_pools depends on my_network to create a subnet with the required subnet for our DCHP pool.

  my_dhcp_pools:
    type: cloudify.nodes.vcloud.DHCPPools
    properties:
      client_config: *client_config
      resource_config:
        - ip_range: '192.178.2.2-192.178.2.100'
        - ip_range: '192.178.2.101-192.178.2.150'
    relationships:
      - type: cloudify.relationships.vcloud.dhcp_pools_contained_in_gateway
        target: my_gateway
      - type: cloudify.relationships.depends_on
        target: my_network

cloudify.nodes.vcloud.StaticRoutes

Create and delete static routes in the gateway. As this resource is on the gateway, it also preserves the runtime properties of cloudify.nodes.vcloud.Gateway.

Properties

Runtime Properties

Relationships

Examples

In this example, we show a dependency on my_network. This is because in the example blueprint,my_static_route depends on my_network to create a subnet with the required subnet for our DCHP pool.

  my_static_route:
    type: cloudify.nodes.vcloud.StaticRoutes
    properties:
      client_config: *client_config
      resource_config:
        - network: 192.178.3.0/24
          next_hop: 192.168.1.1
          description: 'Test blueprint example'
    relationships:
      - type: cloudify.relationships.vcloud.static_routes_contained_in_gateway
        target: my_gateway
      - type: cloudify.relationships.depends_on
        target: my_network

cloudify.nodes.vcloud.FirewallRules

Create and delete firewall rules in the gateway. As this resource is on the gateway, it also preserves the runtime properties of cloudify.nodes.vcloud.Gateway.

Properties

Runtime Properties

Relationships

Examples

In this example, we show a dependency on my_network. This is because in the example blueprint,my_firewall_rules depends on my_network to create a subnet with the required subnet for our DCHP pool.

  my_firewall_rules:
    type: cloudify.nodes.vcloud.FirewallRules
    properties:
      client_config: *client_config
      resource_config:
        test_rule1:
          source_values:
            - 'VLAN-102:gatewayinterface'
            - { concat: [ { get_attribute: [ my_network, resource_id ] }, ':network']}
            - '192.178.1.0:ip'
          destination_values:
            - 'VLAN-102:gatewayinterface'
            - { concat: [ { get_attribute: [ my_network2, resource_id ] }, ':network']}
            - '192.178.1.0:ip'
          services: [{'tcp': {'any': 'any'}}]
    relationships:
      - type: cloudify.relationships.vcloud.firewall_rules_contained_in_gateway
        target: my_gateway
      - type: cloudify.relationships.depends_on
        target: my_network
      - type: cloudify.relationships.depends_on
        target: my_network2

cloudify.nodes.vcloud.IsolatedVDCNetwork

Create and delete an isolated network.

Properties

Runtime Properties

Relationships

Examples

  my_isolated_network:
    type: cloudify.nodes.vcloud.IsolatedVDCNetwork
    properties:
      client_config: *client_config
      resource_config:
        network_cidr: 192.178.3.1/24
        description: test isolated network
        primary_dns_ip: 8.8.8.4
        secondary_dns_ip: 8.8.8.8
        default_lease_time: 300
        max_lease_time: 900
    relationships:
      - type: cloudify.relationships.vcloud.network_connected_to_gateway
        target: my_gateway

cloudify.nodes.vcloud.RoutedVDCNetwork

Create and delete a routed network.

Properties

Runtime Properties

Relationships

Examples

  my_network:
    type: cloudify.nodes.vcloud.RoutedVDCNetwork
    properties:
      client_config: *client_config
      resource_config:
        gateway_name: { get_attribute: [ my_gateway, resource_id ] }
        network_cidr: 192.178.1.1/24
        description: test routed network
        primary_dns_ip: 8.8.8.4
        secondary_dns_ip: 8.8.8.8
        ip_range_start: 192.178.1.2
        ip_range_end: 192.178.1.254
    relationships:
      - type: cloudify.relationships.vcloud.network_connected_to_gateway
        target: my_gateway

cloudify.nodes.vcloud.VApp

Creates an internal object representing a vApp. (It does not actually create. This occurs during the first VM initialization.) However, this node template does perform destructive actions: shudown, power off, undeploy, delete on vApps.

Properties

Runtime Properties

Relationships

Examples

  my_vapp:
    type: cloudify.nodes.vcloud.VApp
    properties:
      client_config: *client_config
      resource_config:
        description: test description
        fence_mode: natRouted
        accept_all_eulas: true
    relationships:
      - type: cloudify.relationships.vcloud.vapp_connected_to_network
        target: my_network

cloudify.nodes.vcloud.VM

Initializes vApp and creates/starts/stops/deletes VMs.

Properties

Runtime Properties

Relationships

Examples

  test_vm:
    type: cloudify.nodes.vcloud.VM
    properties:
      client_config: *client_config
      resource_config:
        catalog: { get_input: catalog }
        template: { get_input: template }
        description: 'test description'
        fence_mode: 'bridged'
        ip_allocation_mode: 'manual'
        deploy: false
        power_on: false
        accept_all_eulas: true
        password: 'test_password'
        hostname: 'testvm'
        ip_address: '192.178.1.2'
      agent_config:
        install_method: none
    relationships:
      - type: cloudify.relationships.vcloud.vm_connected_to_network
        target: test_routed_network
      - type: cloudify.relationships.vcloud.vm_contained_in_vapp
        target: test_vapp
      - type: cloudify.relationships.vcloud.vm_connected_to_disk
        target: test_disk
      - type: cloudify.relationships.vcloud.vm_connected_to_media
        target: test_media
      - type: cloudify.relationships.vcloud.vm_connected_to_nic
        target: test_nic

cloudify.nodes.vcloud.NIC

Creates and Deletes NICs. Connects the NIC network to the vapp.

Properties

Runtime Properties

Same as cloudify.nodes.vcloud.VM

Relationships

Examples

  my_nic:
    type: cloudify.nodes.vcloud.NIC
    properties:
      client_config: *client_config
      resource_config:
        adapter_type: 'VMXNET3'
        is_primary: false
        is_connected: false
        ip_address_mode: 'MANUAL'
        ip_address: '192.178.2.2'
    relationships:
      - type: cloudify.relationships.vcloud.nic_connected_to_network
        target: my_network
      - type: cloudify.relationships.depends_on
        target: my_dchp_pool # To ensure we create the NIC after the required DHCP pool exists.

cloudify.nodes.vcloud.Media

Properties

Examples

  my_media:
    type: cloudify.nodes.vcloud.Media
    properties:
      client_config: *client_config
      resource_config:
        catalog_name: { get_input: catalog }
      iso:
        vol_ident: cidata
        sys_ident: ''
        files:
          ISO/FOLDER/content.json: test content

cloudify.nodes.vcloud.Disk

Properties

Examples

  my_disk:
    type: cloudify.nodes.vcloud.Disk
    properties:
      client_config: *client_config
      resource_config:
        size: 2097152
        description: test disk

Relationships types

Relationships express a dependency and may perform some operation or be used by internal code.

cloudify.relationships.vcloud.network_connected_to_gateway

Ensures that the network is created in the targeted gateway.

cloudify.relationships.vcloud.firewall_rules_contained_in_gateway

Creates the firewall rules. Deletes the firewall rules.

cloudify.relationships.vcloud.static_routes_contained_in_gateway

Creates the static routes. Deletes the static routes.

cloudify.relationships.vcloud.dhcp_pools_contained_in_gateway

Creates the DHCP pools. Deletes the DHCP pools.

cloudify.relationships.vcloud.nat_rules_contained_in_gateway

Creates the NAT rules. Deletes the NAT rules.

cloudify.relationships.vcloud.vm_connected_to_network

Ensures that the VM is created in the targeted network.

cloudify.relationships.vcloud.vapp_connected_to_network

Ensures that the vApp is created in the targeted network.

cloudify.relationships.vcloud.vm_contained_in_vapp

Ensures that the VM is created in the targeted vApp.

cloudify.relationships.vcloud.vm_connected_to_disk

Attaches the VM to the targeted disk. Detaches the VM from the targeted disk.

cloudify.relationships.vcloud.vm_connected_to_media

Attaches the VM to the targeted ISO. Detaches the VM from the targeted ISO.

cloudify.relationships.vcloud.vm_connected_to_nic

Connects the network targeted in cloudify.relationships.vcloud.nic_connected_to_network to the VM’s vApp. Attaches the VM to the targeted NIC. Disconnects the network targeted in cloudify.relationships.vcloud.nic_connected_to_network from the VM’s vApp. Detaches the VM from the targeted NIC.

cloudify.relationships.vcloud.nic_connected_to_network

Ensures that the NIC is created in the targeted network.