vCloud Plugin
Get the latest docs
You are looking at documentation for an older release. Not what you want? Go to the current release documentation.
Cloudify vCloud plugin description and configuration
The vCloud plugin enables you to use a vCloud-based infrastructure for deploying services and applications.
Plugin Requirements
- Python version 2.7.x
Types
Tip
Each type has a vcloud_config property. It can be used to pass parameters for authentication. You do not need to override this property and, by default, the authentication uses the same credentials that were used for the Cloudify bootstrap process.
cloudify.vcloud.nodes.Server
Derived From: cloudify.nodes.Compute
Properties:
serverkey-value server configuration.nameServer name.templatevApp template from which the server will be spawned. For more information, see the Misc section - vApp template.catalogvApp templates catalog.guest_customizationGuest customization section, including:public_keysPublic keys to be injected. List of key-value configurations.keyPublic SSH keyuserUser name
computer_nameVM hostname.admin_passwordRoot password.pre_scriptPre-customization script.post_scriptPost-customization script.script_executorScript executor. Default is/bin/bash.
hardwareKey-value hardware customization section, including:cpuVM CPU count.memoryVM memory size, in MB.
management_networkManagement network name.vcloud_configSee the vCloud Configuration.
Mapped Operations:
cloudify.interfaces.lifecycle.createCreates the vApp.cloudify.interfaces.lifecycle.startStarts the vApp, if it is not already started.cloudify.interfaces.lifecycle.stopStops the vApp, if it is not already stopped.cloudify.interfaces.lifecycle.deleteDeletes the vApp and waits for termination.cloudify.interfaces.lifecycle.creation_validationValidates server node parameters before creation.
Attributes:
vcloud_vapp_namecreated vApp name
Two additional runtime-properties are available on node instances of this type after the cloudify.interfaces.host.get_state operation succeeds:
networksServer networks information.ipThe private IP address (IP on the internal network) of the server.
cloudify.vcloud.nodes.Network
Derived From: cloudify.nodes.Network
Properties:
networkKey-value network configuration.edge_gatewayEdge gateway name.nameNetwork name.static_rangeStatic IP allocation pool range.netmaskNetwork netmask.gateway_ipNetwork gateway.dnsList of DNS IP addresses.dns_suffixDNS suffix.dhcpDHCP settings.dhcp_rangeDHCP pool rangedefault_leaseDefault lease in secondsmax_leaseMaximum lease in seconds
use_external_resourceA boolean for setting whether to create the resource or use an existing one. Defaults tofalse.resource_idName to give to the new resource or the name or ID of an existing resource when theuse_external_resourceproperty is set totrue. Defaults to''(empty string).vcloud_configSee the vCloud Configuration.
Mapped Operations:
cloudify.interfaces.lifecycle.createCreates the network.cloudify.interfaces.lifecycle.deleteDeletes the network.cloudify.interfaces.lifecycle.creation_validationValidates network node parameters before creation.
Attributes:
vcloud_network_nameNetwork name.
cloudify.vcloud.nodes.Port
Derived From: cloudify.nodes.Port
Properties:
portKey-value server network port configuration.networkNetwork name.ip_allocation_modeIP allocation mode. Can bedhcp,poolormanual’.ip_addressIP address if the IP allocation mode ismanual.mac_addressInterface MAC address.primary_interfaceWhether the interface the primary interface (trueorfalse).
vcloud_configSee the vCloud Configuration.
Mapped Operations:
cloudify.interfaces.lifecycle.creation_validationValidates port node parameters.
cloudify.vcloud.nodes.FloatingIP
Derived From: cloudify.nodes.VirtualIP
Properties:
floatingipKey-value floating IP configuration.edge_gatewayvCloud gateway name.public_ipPublic IP address. If not specified, the public IP is allocated from the pool of free public IPs.
vcloud_configSee the vCloud Configuration.
Mapped Operations:
cloudify.interfaces.lifecycle.creation_validationValidates the floating IP node parameters.
Attributes:
public_ipPublic IP address.
cloudify.vcloud.nodes.PublicNAT
Derived From: cloudify.nodes.VirtualIP
Properties:
natKey-value NAT configuration.edge_gatewayvCloud gateway name.public_ipPublic IP. If not specified, the public IP is allocated from the pool of free public IPs.
rulesKey-value NAT rules configuration.protocolNetwork protocol. Can betcp,udporany. Applies only forDNAT.original_portOriginal port. Applies only forDNAT.translated_portTranslated port. Applies only forDNAT.typeList of NAT types. Can beSNAT,DNATor both.
use_external_resourceA boolean for setting whether to create the resource or use an existing one. Defaults tofalse.vcloud_configSee the vCloud Configuration.
Mapped Operations:
cloudify.interfaces.lifecycle.creation_validationvalidates PublicNAT node parameters
Attributes:
public_ipPublic IP address.
cloudify.vcloud.nodes.KeyPair
Derived From: cloudify.nodes.Root
Properties:
private_key_pathPath to private SSH key file.public_keyKey-value public key configuration:keySSH public keyuserUser name
private_keyKey-value private key configuration.create_fileWhether to save the file. Use withauto_generate: true.
auto_generateUse to auto-generate the key.
Mapped Operations:
cloudify.interfaces.lifecycle.creation_validationValidates key-pair node parameters.
cloudify.vcloud.nodes.SecurityGroup
Derived From: cloudify.nodes.SecurityGroup
Properties:
security_groupKey-value SecurityGroup configuration.edge_gatewayvCloud gateway name.
rulesSecurity group rules. List of key-value configurations.protocoltcp,udp,icmporany.sourceSource of traffic on which to apply firewall. Can beinternal,external,host,any, IP address or IP range.source_portPort number orany.destinationDestination of traffic on which to apply firewall rule. Can beinternal,external,host,any, IP address or IP range.destination_portPort number orany.actionallowordeny.log_trafficCapture traffic.trueorfalse.’descriptionRule description.
vcloud_configSee the vCloud Configuration.
Mapped Operations:
cloudify.interfaces.lifecycle.creation_validationValidates SecurityGroup node parameters.
Relationships
cloudify.vcloud.server_connected_to_floating_ip
Description: A relationship for associating the FloatingIP node with the Server node.
Mapped Operations:
cloudify.interfaces.relationship_lifecycle.establishAssociates the floating IP with the server.cloudify.interfaces.relationship_lifecycle.unlinkDisassociates the floating IP from the server.
cloudify.vcloud.server_connected_to_port
Description: A relationship for connecting the server to a port. Note: This relationship has no operations associated with it. The server uses this relationship to connect to the port upon server creation.
cloudify.vcloud.port_connected_to_network
Description: A relationship for connecting a port to the network. Note: This relationship has no operations associated with it.
cloudify.vcloud.server_connected_to_network
Description: A relationship for connecting the server to the network. Note: This relationship has no operations associated with it. The server uses this relationship to connect to the network upon server creation. It uses DHCP for IP allocation.
cloudify.vcloud.server_connected_to_public_nat
Description: A relationship for associating the PublicNAT and the server.
Mapped Operations:
cloudify.interfaces.relationship_lifecycle.establishAssociates PublicNAT with the server.cloudify.interfaces.relationship_lifecycle.unlinkDisassociates PublicNAT from the server.
cloudify.vcloud.server_connected_to_security_group
Description: A relationship for associating a SecurityGroup and server.
Mapped Operations:
cloudify.interfaces.relationship_lifecycle.establishAssociates a SecurityGroup with a server.cloudify.interfaces.relationship_lifecycle.unlink: Disassociates a SecurityGroup from a server.
cloudify.vcloud.net_connected_to_public_nat
Description: A relationship for associating a PublicNAT and the network.
Mapped Operations:
cloudify.interfaces.relationship_lifecycle.establishAssociates a PublicNAT with the network.cloudify.interfaces.relationship_lifecycle.unlinkDisassociates a PublicNAT from the network.
Examples
Example I: Using Plugin Types
This example demonstrates how to use some of the types of this plugin.
Following is an excerpt from the blueprint’s blueprint.node_templates section:
example_server:
type: cloudify.vcloud.nodes.Server
properties:
server:
name: example-server
catalog: example-catalog
template: example-vapp-template
hardware:
cpu: 2
memory: 4096
guest_customization:
public_keys:
- key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCi64cS8ZLXP9xgzscr+m7bKBDdnhTxXaarJ8hIVgG5C7FHkF1Yj9Za+JIMqGjlwsOugFt09ZTvR1kQcIXdZQhs5HWhnG8UY7RkuUwO4FOFpL2VtMAleP/ZNXSZIGwwy4Sm/wtYOo8V5GPrJNbQnVtsW2NJNt6mB1geJzlshbl9wpshHlFSOz6jV2L8k2kOq32nt/Wa3qpDk20IbKnO9wJYWHVzvyJ4bTOyHowStAABFEj8O7XmoQp8jdUuTj+qAOgCROTAQh93XbS3PJjaQYBhxLOOreYYeqjKG/8IUlFxtRdUn7MLS6Rd15AP2HnjhjKad2KqnOuFZqiTLBu+CGWf
user: ubuntu
computer_name: { get_input: manager_server_name }
management_network: existing-network
vcloud_config: { get_property: [vcloud_configuration, vcloud_config] }
relationships:
- target: example_port
type: cloudify.vcloud.server_connected_to_port
- target: example_port2
type: cloudify.vcloud.server_connected_to_port
- target: manager_floating_ip
type: cloudify.vcloud.server_connected_to_floating_ip
manager_floating_ip:
type: cloudify.vcloud.nodes.FloatingIP
properties:
floatingip:
edge_gateway: M000000000-1111
public_ip: 24.44.244.44
vcloud_config: { get_property: [vcloud_configuration, vcloud_config] }
example_port:
type: cloudify.vcloud.nodes.Port
properties:
port:
network: existing-network
ip_allocation_mode: dhcp
primary_interface: true
vcloud_config: { get_property: [vcloud_configuration, vcloud_config] }
relationships:
- target: example_network
type: cloudify.vcloud.port_connected_to_network
example_network:
type: cloudify.vcloud.nodes.Network
properties:
use_external_resource: true
resource_id: existing-network
vcloud_config: { get_property: [vcloud_configuration, vcloud_config] }
example_port2:
type: cloudify.vcloud.nodes.Port
properties:
port:
network: new-network
ip_allocation_mode: manual
ip_address: 10.10.0.2
mac_address: 00:50:56:01:01:49
primary_interface: false
vcloud_config: { get_property: [vcloud_configuration, vcloud_config] }
relationships:
- target: example_network2
type: cloudify.vcloud.port_connected_to_network
example_network2:
type: cloudify.vcloud.nodes.Network
properties:
network:
edge_gateway: M000000000-1111
name: new-network
static_range: 10.10.0.2-10.10.0.64
netmask: 255.255.255.0
gateway_ip: 10.10.0.1/24
dns: ['10.0.0.1', '8.8.8.8']
dns_suffix: test
dhcp:
dhcp_range: 10.0.0.65-10.0.0.254
default_lease: 3600
max_lease: 7200
vcloud_config: { get_property: [vcloud_configuration, vcloud_config] }
vcloud_configuration:
type: vcloud_configuration
properties:
vcloud_config:
username: user
password: pw
url: https://vchs.vmware.com
service_type: subscription
service: M000000000-1111
vdc: M000000000-1111
org: M000000000-1111
vCloud Configuration
The vCloud plugin requires credentials in order to authenticate and interact with vCloud.
The information is gathered by the plugin from the following sources. Each source might partially or completely override values gathered from the previous ones.
- JSON file at
~/vcloud_config.jsonor at a path specified by the value of an environment variable namedVCLOUD_CONFIG_PATH. - Values specified in the
vcloud_configproperty for the node thats operation is currently being executed. (In the case of relationship operations, thevcloud_configproperty of either the source or target nodes are used if available, with the source node’s property taking precedence).
The structure of the JSON file in the first bullet, and of the vcloud_config property in the second bullet, is as follows:
{
"username": "",
"password": "",
"url": "",
"org": "",
"vdc": "",
"service": "",
"service_type": "",
"api_version": "",
"instance": "",
"org_url": "",
"ssl_verify": ""
}
usernamevCloud account username.passwordvCloud account password.urlvCloud URL.orgOrganization name. Required only for theondemandandsubscriptionservice types.instanceInstance UUID. Required only for theondemandservice type.vdcVirtual datacenter name.servicevCloud service name.service_typeService type. Can besubscription,ondemand,vcdorprivate.Privateis an alias forvcdand both types can be used with a private vCloud environment without any difference. Defaults tosubscription.api_versionvCloud API version. ForSubscription, defaults to5.6. ForOnDemand, defaults to5.7.regionRegion name. Applies toOnDemand.org_urlOrganization URL. Required only forprivateservice type.edge_gatewayEdge gateway name.ssl_verifyA boolean flag for disabling SSL certificate check. Only applicable for aprivatecloud service with self-signed certificates. Defaults toTrue
Tip
The vCloud Manager blueprint stores the vCloud configuration used for the bootstrap process in a JSON file (as described in the first bullet of this section) at ~/vcloud_config.json. Therefore, if they have been used for bootstrapping, the vCloud configuration for applications is not mandatory, because the plugin defaults to these same settings.
Misc
vApp template
The template requires a VM with root disk with OS, SSH server and VMware Tools installed.
The template must not have any networks connected.