Brooklyn

brooklyn.location.basic.jclouds
[Java] Class JcloudsLocation

java.lang.Object
  brooklyn.location.basic.AbstractLocation
      brooklyn.location.basic.jclouds.JcloudsLocation
All Implemented Interfaces:
MachineProvisioningLocation

public class JcloudsLocation
extends AbstractLocation

For provisioning and managing VMs in a particular provider/region, using jclouds. Configuration flags include the following: - provider (e.g. "aws-ec2") - providerLocationId (e.g. "eu-west-1") - defaultImageId - user (defaults to "root" or other known superuser) - publicKeyFile - privateKeyFile - privateKeyPasspharse - loginUser (if should initially login as someone other that root / default VM superuser) - loginUser.privateKeyFile - loginUser.privateKeyPasspharse // deprecated - sshPublicKey - sshPrivateKey - rootSshPrivateKey (@Beta) - rootSshPublicKey (@Beta) - rootSshPublicKeyData (@Beta; calls templateOptions.authorizePublicKey()) - dontCreateUser (otherwise if user != root, then creates this user) The flags can also includes values passed straight through to jclouds; to the TemplateBuilder: - minRam - hardwareId - imageSize - imageId - imageDescriptionRegex - imageNameRegex - imageDescriptionPattern (deprecated: use imageDescriptionRegex) - imageNamePattern (deprecated: use imageNameRegex) And flag values passed to TemplateOptions: - securityGroups (for ec2) - inboundPorts - userMetadata - runAsRoot - overrideLoginUser


Nested Class Summary
static class JcloudsLocation.BrooklynJcloudsSetupHolder

static class JcloudsLocation.JcloudsSshMachineLocation

 
Field Summary
static Logger LOG

static java.util.List NON_ADDABLE_USERS

static java.util.List ROOT_ALIASES

these userNames are known to be the preferred/required logins in some common/default images where root@ is not allowed to log in

static java.lang.String ROOT_USERNAME

static int START_SSHABLE_TIMEOUT

static java.util.Collection SUPPORTED_BASIC_PROPERTIES

static java.util.Map SUPPORTED_TEMPLATE_BUILDER_PROPERTIES

note, it is important these be written in correct camel case, so the routines which convert it to "min-ram" syntax and MIN_RAM syntax are correct

static java.util.Map SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES

 
Fields inherited from class AbstractLocation
LOG, hostGeoInfo, leftoverProperties, name
 
Constructor Summary
JcloudsLocation(java.util.Map conf)

JcloudsLocation(java.lang.String identity, java.lang.String credential, java.lang.String providerLocationId)

 
Method Summary
static java.io.File asFile(java.lang.Object o)

protected void configure(java.util.Map properties)

static java.lang.String fileAsString(java.lang.Object o)

static java.lang.String generateGroupId()

static java.util.Set getAllSupportedProperties()

ComputeService getComputeService()

ComputeService getComputeService(java.util.Map flags)

java.util.Map getConf()

java.lang.String getJcloudsProviderLocationId()

returns the location ID used by the provider, if set, e.g. us-west-1

java.io.File getPrivateKeyFile()

returns private key file, if one has been configured

java.io.File getPrivateKeyFile(java.util.Map allconf)

java.lang.String getProvider()

java.util.Map getProvisioningFlags(java.util.Collection tags)

java.io.File getPublicKeyFile()

returns public key file, if one has been configured

java.io.File getPublicKeyFile(java.util.Map allconf)

java.util.Set listNodes()

java.util.Set listNodes(java.util.Map flags)

JcloudsLocation.JcloudsSshMachineLocation obtain(TemplateBuilder tb)

JcloudsLocation.JcloudsSshMachineLocation obtain(java.util.Map flags, TemplateBuilder tb)

JcloudsLocation.JcloudsSshMachineLocation obtain()

JcloudsLocation.JcloudsSshMachineLocation obtain(java.util.Map flags)

JcloudsLocation.JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata)

JcloudsLocation.JcloudsSshMachineLocation rebindMachine(java.util.Map flags, NodeMetadata metadata)

JcloudsLocation.JcloudsSshMachineLocation rebindMachine(java.util.Map flags)

Brings an existing machine with the given details under management.

void release(SshMachineLocation machine)

void setDefaultImageId(java.lang.String val)

protected boolean setHostname(JcloudsLocation.BrooklynJcloudsSetupHolder setup, NodeMetadata metadata, boolean rethrow)

protected void setHostnameUpdatingCredentials(JcloudsLocation.BrooklynJcloudsSetupHolder setup, NodeMetadata metadata)

void setTagMapping(java.util.Map val)

java.lang.String toString()

 
Methods inherited from class AbstractLocation
addChildLocation, configure, configure, containsLocation, equals, findLocationProperty, getChildLocations, getHostGeoInfo, getId, getLocationProperty, getName, getParentLocation, hasLocationProperty, hashCode, removeChildLocation, setHostGeoInfo, setParentLocation, string, toString
 

Field Detail

LOG

public static final Logger LOG


NON_ADDABLE_USERS

public static final java.util.List NON_ADDABLE_USERS


ROOT_ALIASES

public static final java.util.List ROOT_ALIASES
these userNames are known to be the preferred/required logins in some common/default images where root@ is not allowed to log in


ROOT_USERNAME

public static final java.lang.String ROOT_USERNAME


START_SSHABLE_TIMEOUT

public static final int START_SSHABLE_TIMEOUT


SUPPORTED_BASIC_PROPERTIES

public static final java.util.Collection SUPPORTED_BASIC_PROPERTIES


SUPPORTED_TEMPLATE_BUILDER_PROPERTIES

public static final java.util.Map SUPPORTED_TEMPLATE_BUILDER_PROPERTIES
note, it is important these be written in correct camel case, so the routines which convert it to "min-ram" syntax and MIN_RAM syntax are correct


SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES

public static final java.util.Map SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES


 
Constructor Detail

JcloudsLocation

public JcloudsLocation(java.util.Map conf)


JcloudsLocation

public JcloudsLocation(java.lang.String identity, java.lang.String credential, java.lang.String providerLocationId)


 
Method Detail

asFile

public static java.io.File asFile(java.lang.Object o)


configure

protected void configure(java.util.Map properties)


fileAsString

public static java.lang.String fileAsString(java.lang.Object o)


generateGroupId

public static java.lang.String generateGroupId()


getAllSupportedProperties

public static final java.util.Set getAllSupportedProperties()


getComputeService

public ComputeService getComputeService()


getComputeService

public ComputeService getComputeService(java.util.Map flags)


getConf

public java.util.Map getConf()


getJcloudsProviderLocationId

public java.lang.String getJcloudsProviderLocationId()
returns the location ID used by the provider, if set, e.g. us-west-1


getPrivateKeyFile

public java.io.File getPrivateKeyFile()
returns private key file, if one has been configured


getPrivateKeyFile

public java.io.File getPrivateKeyFile(java.util.Map allconf)


getProvider

public java.lang.String getProvider()


getProvisioningFlags

public java.util.Map getProvisioningFlags(java.util.Collection tags)


getPublicKeyFile

public java.io.File getPublicKeyFile()
returns public key file, if one has been configured


getPublicKeyFile

public java.io.File getPublicKeyFile(java.util.Map allconf)


listNodes

public java.util.Set listNodes()


listNodes

public java.util.Set listNodes(java.util.Map flags)


obtain

public JcloudsLocation.JcloudsSshMachineLocation obtain(TemplateBuilder tb)


obtain

public JcloudsLocation.JcloudsSshMachineLocation obtain(java.util.Map flags, TemplateBuilder tb)


obtain

public JcloudsLocation.JcloudsSshMachineLocation obtain()


obtain

public JcloudsLocation.JcloudsSshMachineLocation obtain(java.util.Map flags)


rebindMachine

public JcloudsLocation.JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata)


rebindMachine

public JcloudsLocation.JcloudsSshMachineLocation rebindMachine(java.util.Map flags, NodeMetadata metadata)


rebindMachine

public JcloudsLocation.JcloudsSshMachineLocation rebindMachine(java.util.Map flags)
Brings an existing machine with the given details under management.

Required fields are:


release

public void release(SshMachineLocation machine)


setDefaultImageId

public void setDefaultImageId(java.lang.String val)


setHostname

protected boolean setHostname(JcloudsLocation.BrooklynJcloudsSetupHolder setup, NodeMetadata metadata, boolean rethrow)


setHostnameUpdatingCredentials

protected void setHostnameUpdatingCredentials(JcloudsLocation.BrooklynJcloudsSetupHolder setup, NodeMetadata metadata)


setTagMapping

public void setTagMapping(java.util.Map val)


toString

@Override
public java.lang.String toString()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.