cloudsoft.io

Cloudsoft / Cloudsoft AMP / Apache Jclouds Capabilities

The following is a full list of the supported capability properties in the cloudsoft capability on tosca.nodes.Compute. Note that these mainly apply only when using a jclouds-supported location:

  • Setting up a specific cloud target:
    • provider (java.lang.String): the cloud provider, e.g. within jclouds aws-ec2
    • identity (java.lang.String): the identity for accessing the cloud provider
    • credential (java.lang.String): the credential for accessing the cloud provider
    • region (java.lang.String): the region of the cloud provider to use
    • endpoint (java.lang.String): a custom endpoint to use when connecting to the cloud provider (typically only for private clouds)
    • availabilityZone (java.lang.String): the availability zone within the cloud
    • oauth.endpoint (java.lang.String): an oauth endpoint if required by the cloud provider
  • Selecting an image
    • imageId (java.lang.String): A system-specific identifier for the VM image to be used when creating a VM
    • imageNameRegex (java.lang.String): A regular expression to be compared against the ‘name’ when selecting the VM image to be used when creating a VM
    • defaultImageId (java.lang.String): A system-specific identifier for the VM image to be used by default when creating a VM (if no other VM image selection criteria are supplied)
    • imageDescriptionRegex (java.lang.String): A regular expression to be compared against the ‘description’ when selecting the VM image to be used when creating a VM
    • imageChooser (com.google.common.base.Function<java.lang.Iterable<? extends org.jclouds.compute.domain.Image>, org.jclouds.compute.domain.Image>): An image chooser function to control which images are preferred
    • osFamily (org.jclouds.compute.domain.OsFamily): OS family, e.g. CentOS, Debian, RHEL, Ubuntu
    • osFamilyOverride (org.jclouds.compute.domain.OsFamily): OS family of VMs (ignores VM metadata from jclouds, and assumes this value)
    • osVersionRegex (java.lang.String): Regular expression for the OS version to load
  • Selecting the hardware type
    • minCores (java.lang.Integer): Minimum number of cores, for use in selecting the machine/hardware profile
    • minDisk (java.lang.Object): Minimum size of disk, either as string (100gb) or number of GB (100), for use in selecting the machine/hardware profile
    • minRam (java.lang.Object): Minimum amount of RAM, either as string (4gb) or number of MB (4096), for use in selecting the machine/hardware profile
    • os64Bit (java.lang.Boolean): Whether to require 64-bit OS images (true), 32-bit images (false), or either (null)
    • hardwareId (java.lang.String): A system-specific identifier for the hardware profile or machine type to be used when creating a VM
    • overrideRam (java.lang.Integer): Custom ram value
  • Configuring the user to create/use post-login
    • user (java.lang.String): user account for normal access to the remote machine, defaulting to local user
    • password (java.lang.String): password to use for ssh; note some images do not allow password-based ssh access
    • privateKeyData (java.lang.String): ssh private key string to use (takes precedence over privateKeyFile)
    • privateKeyFile (java.lang.String): a ‘:’ separated list of ssh private key files; uses first in list that can be read
    • privateKeyPassphrase (java.lang.String): null
    • publicKeyData (java.lang.String): ssh public key string to use (takes precedence over publicKeyFile)
    • publicKeyFile (java.lang.String): ssh public key file to use; if blank will infer from privateKeyFile by appending “.pub”
    • jclouds.openstack-nova.auto-generate-keypairs (java.lang.Boolean): Whether to generate keypairs automatically (OpenStack Nova)
    • disableRootAndPasswordSsh (java.lang.Boolean): Whether to disable direct SSH access for root and disable password-based SSH, if creating a user with a key-based login; defaults to true (set false to leave root users alone)
    • dontCreateUser (java.lang.Boolean): Whether to skip creation of ‘user’ when provisioning machines (default false). Note that setting this will prevent jclouds from overwriting /etc/sudoers which might be configured incorrectly by default. See ‘dontRequireTtyForSudo’ for details.
    • grantUserSudo (java.lang.Boolean): Whether to grant the created user sudo privileges. Irrelevant if dontCreateUser is true. Default: true.
    • dontRequireTtyForSudo (java.lang.Boolean): Whether to explicitly set /etc/sudoers, so don’t need tty (will leave unchanged if ‘false’); some machines require a tty for sudo; AMP by default does not use a tty (so that it can get separate error+stdout streams); you can enable a tty as an option to every ssh command, or you can do it once and modify the machine so that a tty is not subsequently required. Usually used in conjunction with ‘dontCreateUser’ since it will prevent jclouds from overwriting /etc/sudoers and overriding the system default. When not explicitly set will be applied if ‘dontCreateUser’ is set.
    • extraSshPublicKeyData (java.lang.String): Additional public key data to add to authorized_keys (multi-line string supported, with one key per line)
    • extraSshPublicKeyUrls (java.util.List<java.lang.String>): Additional public keys (files or URLs, in SSH2/RFC4716/id_rsa.pub format) to add to authorized_keys
  • Configuring the user who should initially log in the the machine
    • loginUser (java.lang.String): Override the user who logs in initially to perform setup (otherwise it is detected from the cloud or known defaults in cloud or VM OS)
    • loginUser.password (java.lang.String): Custom password for the user who logs in initially
    • loginUser.privateKeyData (java.lang.String): Custom private key for the user who logs in initially
    • loginUser.privateKeyFile (java.lang.String): Custom private key for the user who logs in initially
    • keyPair (java.lang.String): Custom keypair (name) known at the cloud to be installed on machines for initial login (selected clouds only); you may also need to set loginUser.privateKeyFile
    • customCredentials (org.jclouds.domain.LoginCredentials): Custom jclouds LoginCredentials object to be used to connect to the VM
    • runAsRoot (java.lang.Boolean): Whether to run initial setup as root (default true)
  • Configuring ports and network on the machine:
    • required.ports (java.lang.Object): Required additional ports to be applied when creating a VM, on supported clouds (either a single port as an Integer, or an Iterable or Integer[])
    • inboundPorts (java.lang.Object): Inbound ports to be applied when creating a VM, on supported clouds (either a single port as a String, or an Iterable or Integer[]); this defaults to `22` so that should be included if extending, or (preferred) set `required.ports`
    • domainName (java.lang.String): DNS domain where the host should be created, e.g. yourdomain.com (selected clouds only)
    • autoAssignFloatingIp (java.lang.Boolean): Whether to generate floating ips (in Nova paralance), or elastic IPs (in CloudStack parlance)
    • securityGroups (java.lang.Object): Security groups to be applied when creating a VM, on supported clouds (either a single group identifier as a String, or an Iterable or String[])
    • networkName (java.lang.String): Network name or ID where the instance should be created (e.g. the subnet ID in AWS
    • useMachinePublicAddressAsPrivateAddress (java.lang.Boolean): When true we will use the public IP/Hostname of a JClouds Location as the private IP/Hostname
    • openIptables (java.lang.Boolean): [DEPRECATED - use openIptables on SoftwareProcess entity] Whether to open the INBOUND_PORTS via iptables rules; if true then ssh in to run iptables commands, as part of machine provisioning
    • stopIptables (java.lang.Boolean): [DEPRECATED - use stopIptables on SoftwareProcess entity] Whether to stop iptables entirely; if true then ssh in to stop the iptables service, as part of machine provisioning
  • Configuring tags and user metadata on the created machine (varies from cloud to cloud):
    • tags (java.lang.Object): Tags to be applied when creating a VM, on supported clouds (either a single tag as a String, or an Iterable or String[]; note this is not key-value pairs (e.g. what AWS calls 'tags'), for that see userMetadata)
    • userMetadata (java.lang.Object): Arbitrary user metadata, as a map (or String of comma-separated key=value pairs), on supported clouds; note often values cannot be null
    • userMetadataString (java.lang.String): Arbitrary user data, as a single string, on supported clouds (AWS)
  • Specifying a custom script to be run as part of initial machine setup:
    • setup.script (java.lang.String): Custom script to customize a node
    • setup.scripts (java.util.List<java.lang.String>): A list of scripts to customize a node
    • setup.script.vars (java.lang.String): vars to customize a setup.script i.e.: key1:value1,key2:value2
    • customTemplateOptionsScriptContents (java.lang.String): A custom script to pass to jclouds as part of template options, run after AdminAccess, for use primarily where a command which must run as root on first login before switching to the admin user, e.g. to customize sudoers; may start in an odd location (e.g. /tmp/bootstrap); NB: most commands should be run by entities, or if VM-specific but sudo is okay, then via setup.script, not via this
  • Debugging options, e.g. if connection is not possible due to private cloud contraints:
    • waitForSshable (java.lang.String): Whether and how long to wait for a newly provisioned VM to be accessible via ssh; if ‘false’, won’t check; if ‘true’ uses default duration; otherwise accepts a time string e.g. ‘5m’ (the default) or a number of milliseconds
    • waitForWinRmAvailable (java.lang.String): Whether and how long to wait for a newly provisioned VM to be accessible via WinRm; if ‘false’, won’t check; if ‘true’ uses default duration; otherwise accepts a time string e.g. ‘30m’ (the default) or a number of milliseconds
    • useJcloudsSshInit (java.lang.Boolean): Whether to use jclouds for initial ssh-based setup (i.e. as part of the ‘TemplateOptions’); if false will use core AMP ssh utilities. This config is beta; its default could be changed and/or the option removed in an upcoming release.
    • localTempDir (java.lang.String): The directory on the local machine (i.e. running brooklyn) for writing temp files
    • machineCreateAttempts (java.lang.Integer): Number of times to retry if jclouds fails to create a VM
    • machineCreationSemaphore (java.util.concurrent.Semaphore): Semaphore for controlling concurrent machine creation
    • machineDeletionSemaphore (java.util.concurrent.Semaphore): Semaphore for controlling concurrent machine deletion
    • installDevUrandom (java.lang.Boolean): Map /dev/random to /dev/urandom to prevent halting on insufficient entropy
    • maxConcurrentMachineCreations (java.lang.Integer): Maximum number of concurrent machine-creations
    • maxConcurrentMachineDeletions (java.lang.Integer): Maximum number of concurrent machine-deletions
    • destroyOnFailure (java.lang.Boolean): Whether to destroy the VM if provisioningLocation.obtain() fails
    • extensions (java.util.Map<java.lang.String, java.lang.String>): Location extensions
    • includeAMPUserMetadata (java.lang.Boolean): Whether to set metadata about the context of a machine, e.g. brooklyn-entity-id, brooklyn-app-name (default true)
    • groupId (java.lang.String): The Jclouds group provisioned machines should be members of. Users of this config key are also responsible for configuring security groups.
    • pollForFirstReachableAddress (java.lang.String): Whether and how long to wait for reaching the VM’s ip:port to be accessible over SSH or WinRM; if ‘false’, the location will will choose a public or private IP as appropriate; if ‘true’ uses default duration; otherwise accepts a time string e.g. ‘5m’ (the default) or a number of milliseconds
  • Low-level configuration:
    • vmNameAllowedChars (java.lang.String): The characters allowed in a VM name
    • vmNameMaxLength (java.lang.Integer): Maximum length of VM name
    • vmNameSaltLength (java.lang.Integer): Number of characters to use for a random identifier inserted in hostname to uniquely identify machines
    • customizers (java.util.Collection<org.apache.brooklyn.location.jclouds.JcloudsLocationCustomizer>): Optional location customizers
    • machineCustomizers (java.util.Collection<org.apache.brooklyn.api.location.MachineLocationCustomizer>): Optional machine customizers
    • portforwarding.enabled (java.lang.Boolean): Whether to setup port-forwarding to subsequently access the VM (over the ssh port)
    • portforwarding.forwarder (org.apache.brooklyn.location.jclouds.networking.JcloudsPortForwarderExtension): The port-forwarder to use
    • brooklyn.portforwarding.manager (org.apache.brooklyn.core.location.access.PortForwardManager): A port-forwarding manager to use at an entity or a location, where supported; note this should normally be a serializable client instance to prevent the creation of multiple disconnected instances via config duplication
    • generate.hostname (java.lang.Boolean): Use the nodename generated by jclouds
    • lookupAwsHostname (java.lang.Boolean): Whether to lookup the AWS hostname (via a command on the VM), or to just use the IP.
    • connectivityResolver (org.apache.brooklyn.location.jclouds.ConnectivityResolver): Optional instance of a ConnectivityResolver that the location will use in favour of DefaultConnectivityResolver
    • jclouds.endpoint (java.lang.String): Equivalent to ‘endpoint’; provided for jclouds compatibility
    • userName (java.lang.String): Equivalent to ‘user’; provided for jclouds compatibility
    • templateOptions (java.util.Map<java.lang.String, java.lang.Object>): Additional jclouds template options
    • templateBuilder (org.jclouds.compute.domain.TemplateBuilder): A TemplateBuilder instance provided programmatically, to be used when creating a VM
    • templateSpec (java.lang.String): A jclouds ‘spec’ string consisting of properties and values to be used when creating a VM (in most cases the properties can, and should, be specified individually using other AMP location config keys)
    • jclouds.computeServiceModules (java.lang.Iterable<? extends com.google.inject.Module>): Optional Guice modules for a jclouds Compute Service Context
    • jclouds.computeServiceRegistry (org.apache.brooklyn.location.jclouds.ComputeServiceRegistry): Registry/Factory for creating jclouds ComputeService; default is almost always fine, except where tests want to customize behaviour
    • jclouds.linkContext (org.apache.brooklyn.location.jclouds.domain.JcloudsContext): Optional link context for jclouds Compute Service Context