public class JcloudsUtil extends java.lang.Object implements JcloudsLocationConfig
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APT_INSTALL |
static org.jclouds.scriptbuilder.domain.Statement |
APT_RUN_SCRIPT
Deprecated.
since 0.7;
installJavaAndCurl(OperatingSystem) |
static org.jclouds.scriptbuilder.domain.Statement |
YUM_RUN_SCRIPT
Deprecated.
since 0.7;
installJavaAndCurl(OperatingSystem) |
static org.jclouds.scriptbuilder.domain.Statement |
ZYPPER_RUN_SCRIPT
Deprecated.
since 0.7;
installJavaAndCurl(OperatingSystem) |
AUTO_ASSIGN_FLOATING_IP, AUTO_CREATE_FLOATING_IPS, AUTO_GENERATE_KEYPAIRS, CLOUD_PROVIDER, CUSTOM_CREDENTIALS, CUSTOM_MACHINE_SETUP_SCRIPT_URL, CUSTOM_MACHINE_SETUP_SCRIPT_VARS, DEFAULT_IMAGE_ID, DONT_CREATE_USER, EXTRA_PUBLIC_KEY_DATA_TO_AUTH, GENERATE_HOSTNAME, GRANT_USER_SUDO, GROUP_ID, HARDWARE_ID, IMAGE_CHOOSER, IMAGE_DESCRIPTION_REGEX, IMAGE_ID, IMAGE_NAME_REGEX, JCLOUDS_KEY_ENDPOINT, JCLOUDS_KEY_USERNAME, JCLOUDS_LOCATION_CUSTOMIZER, JCLOUDS_LOCATION_CUSTOMIZER_TYPE, JCLOUDS_LOCATION_CUSTOMIZERS, JCLOUDS_LOCATION_CUSTOMIZERS_SUPPLIER_TYPE, KEY_PAIR, LOCAL_TEMP_DIR, LOGIN_USER, LOGIN_USER_PASSWORD, LOGIN_USER_PRIVATE_KEY_DATA, LOGIN_USER_PRIVATE_KEY_FILE, MACHINE_CREATE_ATTEMPTS, MACHINE_CREATION_SEMAPHORE, MAP_DEV_RANDOM_TO_DEV_URANDOM, MAX_CONCURRENT_MACHINE_CREATIONS, NETWORK_NAME, OPEN_IPTABLES, OS_FAMILY, OS_VERSION_REGEX, OVERRIDE_RAM, PORT_FORWARDER, PORT_FORWARDING_MANAGER, RUN_AS_ROOT, SECURITY_GROUPS, STOP_IPTABLES, STRING_TAGS, TAGS, TEMPLATE_BUILDER, TEMPLATE_SPEC, USE_JCLOUDS_SSH_INIT, USE_PORT_FORWARDING, USER_DATA_UUENCODED, USER_METADATA, USER_METADATA_MAP, USER_METADATA_STRING
ACCESS_CREDENTIAL, ACCESS_IDENTITY, CALLER_CONTEXT, CLOUD_AVAILABILITY_ZONE_ID, CLOUD_ENDPOINT, CLOUD_REGION_ID, DESTROY_ON_FAILURE, INBOUND_PORTS, LEGACY_PRIVATE_KEY_DATA, LEGACY_PRIVATE_KEY_FILE, LEGACY_PRIVATE_KEY_PASSPHRASE, LEGACY_PUBLIC_KEY_DATA, LEGACY_PUBLIC_KEY_FILE, MIN_CORES, MIN_DISK, MIN_RAM, OS_64_BIT, PASSWORD, PRIVATE_KEY_DATA, PRIVATE_KEY_FILE, PRIVATE_KEY_PASSPHRASE, PUBLIC_KEY_DATA, PUBLIC_KEY_FILE, USER, VM_NAME_MAX_LENGTH, WAIT_FOR_SSHABLE
Constructor and Description |
---|
JcloudsUtil() |
Modifier and Type | Method and Description |
---|---|
static org.jclouds.scriptbuilder.domain.Statement |
addAuthorizedKeysToRoot(java.io.File publicKeyFile) |
static org.jclouds.scriptbuilder.domain.Statement |
addAuthorizedKeysToRoot(java.lang.String publicKey) |
static org.jclouds.scriptbuilder.domain.Statement |
authorizePortInIpTables(int port) |
static java.util.Map<java.lang.Integer,java.lang.Integer> |
dockerPortMappingsFor(JcloudsLocation docker,
java.lang.String containerId) |
static org.jclouds.compute.ComputeService |
findComputeService(ConfigBag conf) |
static org.jclouds.compute.ComputeService |
findComputeService(ConfigBag conf,
boolean allowReuse) |
static com.google.common.collect.ImmutableSet<com.google.inject.Module> |
getCommonModules()
returns the jclouds modules we typically install
|
static java.lang.String |
getFirstReachableAddress(org.jclouds.compute.ComputeServiceContext context,
org.jclouds.compute.domain.NodeMetadata node) |
static java.lang.String |
installAfterUpdatingIfNotPresent(java.lang.String cmd) |
static org.jclouds.scriptbuilder.domain.Statement |
installJavaAndCurl(org.jclouds.compute.domain.OperatingSystem os)
Deprecated.
since 0.7; see
BashCommands.installJava7() and BashCommands.INSTALL_CURL |
static void |
mapSecurityGroupRuleToIpTables(org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.NodeMetadata node,
org.jclouds.domain.LoginCredentials credentials,
java.lang.String networkInterface,
java.lang.Iterable<java.lang.Integer> ports) |
static org.jclouds.blobstore.BlobStoreContext |
newBlobstoreContext(java.lang.String provider,
java.lang.String endpoint,
java.lang.String identity,
java.lang.String credential,
boolean useSoftlayerFix)
Temporary constructor to address https://issues.apache.org/jira/browse/JCLOUDS-615.
|
static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> |
predicateMatchingById(org.jclouds.compute.domain.NodeMetadata node) |
static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> |
predicateMatchingById(java.lang.String id) |
static org.jclouds.compute.domain.ExecResponse |
runScriptOnNode(org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.NodeMetadata node,
org.jclouds.scriptbuilder.domain.Statement statement,
java.lang.String scriptName) |
static java.lang.String |
waitForPasswordOnAws(org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.NodeMetadata node,
long timeout,
java.util.concurrent.TimeUnit timeUnit) |
public static java.lang.String APT_INSTALL
@Deprecated public static final org.jclouds.scriptbuilder.domain.Statement APT_RUN_SCRIPT
installJavaAndCurl(OperatingSystem)
@Deprecated public static final org.jclouds.scriptbuilder.domain.Statement YUM_RUN_SCRIPT
installJavaAndCurl(OperatingSystem)
@Deprecated public static final org.jclouds.scriptbuilder.domain.Statement ZYPPER_RUN_SCRIPT
installJavaAndCurl(OperatingSystem)
public static java.lang.String installAfterUpdatingIfNotPresent(java.lang.String cmd)
public static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> predicateMatchingById(org.jclouds.compute.domain.NodeMetadata node)
public static com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> predicateMatchingById(java.lang.String id)
public static org.jclouds.scriptbuilder.domain.Statement authorizePortInIpTables(int port)
public static org.jclouds.compute.domain.ExecResponse runScriptOnNode(org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.NodeMetadata node, org.jclouds.scriptbuilder.domain.Statement statement, java.lang.String scriptName) throws org.jclouds.compute.RunScriptOnNodesException
org.jclouds.compute.RunScriptOnNodesException
java.lang.IllegalStateException
- If do not find exactly one matching node@Deprecated public static org.jclouds.scriptbuilder.domain.Statement installJavaAndCurl(org.jclouds.compute.domain.OperatingSystem os)
public static org.jclouds.compute.ComputeService findComputeService(ConfigBag conf)
public static org.jclouds.compute.ComputeService findComputeService(ConfigBag conf, boolean allowReuse)
public static com.google.common.collect.ImmutableSet<com.google.inject.Module> getCommonModules()
@Beta public static org.jclouds.blobstore.BlobStoreContext newBlobstoreContext(java.lang.String provider, @Nullable java.lang.String endpoint, java.lang.String identity, java.lang.String credential, boolean useSoftlayerFix)
See https://issues.apache.org/jira/browse/BROOKLYN-6 . When https://issues.apache.org/jira/browse/JCLOUDS-615 is fixed in the jclouds we use, we can remove the useSoftlayerFix argument.
(Marked Beta as that argument will likely be removed.)
public static org.jclouds.scriptbuilder.domain.Statement addAuthorizedKeysToRoot(java.io.File publicKeyFile) throws java.io.IOException
java.io.IOException
public static org.jclouds.scriptbuilder.domain.Statement addAuthorizedKeysToRoot(java.lang.String publicKey)
public static java.lang.String getFirstReachableAddress(org.jclouds.compute.ComputeServiceContext context, org.jclouds.compute.domain.NodeMetadata node)
public static java.lang.String waitForPasswordOnAws(org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.NodeMetadata node, long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutException
public static java.util.Map<java.lang.Integer,java.lang.Integer> dockerPortMappingsFor(JcloudsLocation docker, java.lang.String containerId)
public static void mapSecurityGroupRuleToIpTables(org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.NodeMetadata node, org.jclouds.domain.LoginCredentials credentials, java.lang.String networkInterface, java.lang.Iterable<java.lang.Integer> ports)