|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.location.basic.AbstractLocation
brooklyn.location.cloud.AbstractCloudMachineProvisioningLocation
brooklyn.location.jclouds.JcloudsLocation
public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation
For provisioning and managing VMs in a particular provider/region, using jclouds. Configuration flags are defined in JcloudsLocationConfig.
Field Summary | |
---|---|
static java.util.List |
COMMON_USER_NAMES_TO_TRY
|
static Logger |
LOG
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.util.List |
ROOT_ALIASES
|
static java.lang.String |
ROOT_USERNAME
|
static java.util.Map |
SUPPORTED_TEMPLATE_BUILDER_PROPERTIES
|
static java.util.Map |
SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES
properties which cause customization of the TemplateOptions |
Fields inherited from class AbstractLocation | |
---|---|
LOG, PARENT_LOCATION, hostGeoInfo, name |
Constructor Summary | |
JcloudsLocation()
|
|
JcloudsLocation(java.util.Map conf)
|
Method Summary | |
---|---|
static java.io.File
|
asFile(java.lang.Object o)
|
protected Template
|
buildTemplate(ComputeService computeService, ConfigBag config)
|
void
|
configure(java.util.Map properties)
|
protected JcloudsSshMachineLocation
|
createJcloudsSshMachineLocation(NodeMetadata node, java.lang.String vmHostname, ConfigBag setup)
|
protected java.lang.String
|
extractAvailabilityZone(ConfigBag setup, NodeMetadata node)
|
protected java.lang.String
|
extractNodeLocationId(ConfigBag setup, NodeMetadata node, LocationScope scope)
|
protected java.lang.String
|
extractProvider(ConfigBag setup, NodeMetadata node)
Extracts the user that jclouds tells us about (i.e. from the jclouds node). |
protected java.lang.String
|
extractRegion(ConfigBag setup, NodeMetadata node)
|
protected java.util.Map
|
extractSshConfig(ConfigBag setup, NodeMetadata node)
|
protected LoginCredentials
|
extractVmCredentials(ConfigBag setup, NodeMetadata node)
|
static java.lang.String
|
fileAsString(java.lang.Object o)
|
static java.util.Set
|
getAllSupportedProperties()
|
ComputeService
|
getComputeService()
|
ComputeService
|
getComputeService(java.util.Map flags)
attaches a string describing where something is being created (provider, region/location and/or endpoint, callerContext) |
java.lang.String
|
getCredential()
|
protected java.util.Collection
|
getCustomizers(ConfigBag setup)
|
java.lang.String
|
getEndpoint()
|
java.lang.String
|
getIdentity()
returns the location ID used by the provider, if set, e.g. us-west-1 |
java.lang.String
|
getJcloudsProviderLocationId()
|
protected java.util.concurrent.Semaphore
|
getMachineCreationSemaphore()
|
java.lang.String
|
getProvider()
|
java.util.Map
|
getProvisioningFlags(java.util.Collection tags)
|
java.lang.String
|
getRegion()
@deprecated since 0.5.0 use getRegion |
java.lang.String
|
getUser(ConfigBag config)
|
void
|
init()
|
protected LoginCredentials
|
initUserTemplateOptions(Template template, ConfigBag config)
|
java.util.Set
|
listNodes()
|
java.util.Set
|
listNodes(java.util.Map flags)
|
protected void
|
logAvailableTemplates(ConfigBag config)
|
JcloudsLocation
|
newSubLocation(java.util.Map newFlags)
|
JcloudsSshMachineLocation
|
obtain()
core method for obtaining a VM using jclouds; Map should contain CLOUD_PROVIDER and CLOUD_ENDPOINT or CLOUD_REGION, depending on the cloud, as well as ACCESS_IDENTITY and ACCESS_CREDENTIAL, plus any further properties to specify e.g. images, hardware profiles, accessing user (for initial login, and a user potentially to create for subsequent ie normal access) |
JcloudsSshMachineLocation
|
obtain(TemplateBuilder tb)
|
JcloudsSshMachineLocation
|
obtain(java.util.Map flags, TemplateBuilder tb)
|
JcloudsSshMachineLocation
|
obtain(java.util.Map flags)
|
protected JcloudsSshMachineLocation
|
obtainOnce(ConfigBag setup)
|
JcloudsSshMachineLocation
|
rebindMachine(NodeMetadata metadata)
|
JcloudsSshMachineLocation
|
rebindMachine(java.util.Map flags, NodeMetadata metadata)
|
JcloudsSshMachineLocation
|
rebindMachine(ConfigBag setup)
|
JcloudsSshMachineLocation
|
rebindMachine(java.util.Map flags)
|
protected JcloudsSshMachineLocation
|
registerJcloudsSshMachineLocation(NodeMetadata node, java.lang.String vmHostname, ConfigBag setup)
|
void
|
release(SshMachineLocation machine)
|
protected void
|
releaseNode(java.lang.String instanceId)
|
protected void
|
releaseNodeSafely(NodeMetadata node)
|
protected void
|
releaseSafely(SshMachineLocation machine)
|
protected void
|
setCreationString(ConfigBag config)
|
void
|
setDefaultImageId(java.lang.String val)
|
protected boolean
|
setHostname(ConfigBag setup, NodeMetadata metadata, boolean rethrow)
|
protected void
|
setHostnameUpdatingCredentials(ConfigBag setup, NodeMetadata metadata)
|
void
|
setTagMapping(java.util.Map val)
|
protected static byte[]
|
toByteArray(java.lang.Object v)
|
protected static double
|
toDouble(java.lang.Object v)
|
protected static java.util.List
|
toListOfStrings(java.lang.Object v)
|
protected static java.util.Map
|
toMapStringString(java.lang.Object v)
|
java.lang.String
|
toString()
|
protected static java.lang.String[]
|
toStringArray(java.lang.Object v)
|
java.lang.String
|
toVerboseString()
|
protected void
|
waitForReachable(ComputeService computeService, NodeMetadata node, LoginCredentials expectedCredentials, ConfigBag setup)
|
Methods inherited from class AbstractCloudMachineProvisioningLocation | |
---|---|
extractSshConfig, getProvisioningFlags, newSubLocation |
Field Detail |
---|
public static final java.util.List COMMON_USER_NAMES_TO_TRY
public static final Logger LOG
public static final java.util.List ROOT_ALIASES
public static final java.lang.String ROOT_USERNAME
public static final java.util.Map SUPPORTED_TEMPLATE_BUILDER_PROPERTIES
public static final java.util.Map SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES
Constructor Detail |
---|
public JcloudsLocation()
public JcloudsLocation(java.util.Map conf)
Method Detail |
---|
public static java.io.File asFile(java.lang.Object o)
protected Template buildTemplate(ComputeService computeService, ConfigBag config)
} public void configure(java.util.Map properties)
protected JcloudsSshMachineLocation createJcloudsSshMachineLocation(NodeMetadata node, java.lang.String vmHostname, ConfigBag setup)
protected java.lang.String extractAvailabilityZone(ConfigBag setup, NodeMetadata node)
protected java.lang.String extractNodeLocationId(ConfigBag setup, NodeMetadata node, LocationScope scope)
protected java.lang.String extractProvider(ConfigBag setup, NodeMetadata node)
protected java.lang.String extractRegion(ConfigBag setup, NodeMetadata node)
protected java.util.Map extractSshConfig(ConfigBag setup, NodeMetadata node)
protected LoginCredentials extractVmCredentials(ConfigBag setup, NodeMetadata node)
public static java.lang.String fileAsString(java.lang.Object o)
public static final java.util.Set getAllSupportedProperties()
public ComputeService getComputeService()
public ComputeService getComputeService(java.util.Map flags)
public java.lang.String getCredential()
protected java.util.Collection getCustomizers(ConfigBag setup)
public java.lang.String getEndpoint()
public java.lang.String getIdentity()
public java.lang.String getJcloudsProviderLocationId()
protected java.util.concurrent.Semaphore getMachineCreationSemaphore()
public java.lang.String getProvider()
public java.util.Map getProvisioningFlags(java.util.Collection tags)
public java.lang.String getRegion()
public java.lang.String getUser(ConfigBag config)
@Override public void init()
protected LoginCredentials initUserTemplateOptions(Template template, ConfigBag config)
public java.util.Set listNodes()
public java.util.Set listNodes(java.util.Map flags)
protected void logAvailableTemplates(ConfigBag config)
} public JcloudsLocation newSubLocation(java.util.Map newFlags)
public JcloudsSshMachineLocation obtain()
public JcloudsSshMachineLocation obtain(TemplateBuilder tb)
public JcloudsSshMachineLocation obtain(java.util.Map flags, TemplateBuilder tb)
public JcloudsSshMachineLocation obtain(java.util.Map flags)
protected JcloudsSshMachineLocation obtainOnce(ConfigBag setup)
public JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata)
public JcloudsSshMachineLocation rebindMachine(java.util.Map flags, NodeMetadata metadata)
public JcloudsSshMachineLocation rebindMachine(ConfigBag setup)
public JcloudsSshMachineLocation rebindMachine(java.util.Map flags)
protected JcloudsSshMachineLocation registerJcloudsSshMachineLocation(NodeMetadata node, java.lang.String vmHostname, ConfigBag setup)
LOG.warn("overriding username 'root' in favour of '"+nodeCredentials.getUser()+"' at {}; this behaviour may be removed in future", node); public void release(SshMachineLocation machine)
protected void releaseNode(java.lang.String instanceId)
protected void releaseNodeSafely(NodeMetadata node)
protected void releaseSafely(SshMachineLocation machine)
protected void setCreationString(ConfigBag config)
public void setDefaultImageId(java.lang.String val)
protected boolean setHostname(ConfigBag setup, NodeMetadata metadata, boolean rethrow)
protected void setHostnameUpdatingCredentials(ConfigBag setup, NodeMetadata metadata)
public void setTagMapping(java.util.Map val)
protected static byte[] toByteArray(java.lang.Object v)
protected static double toDouble(java.lang.Object v)
protected static java.util.List toListOfStrings(java.lang.Object v)
protected static java.util.Map toMapStringString(java.lang.Object v)
public java.lang.String toString()
protected static java.lang.String[] toStringArray(java.lang.Object v)
public String getProvider() { public java.lang.String toVerboseString()
protected void waitForReachable(ComputeService computeService, NodeMetadata node, LoginCredentials expectedCredentials, ConfigBag setup)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.