public class DockerHostImpl extends brooklyn.entity.machine.MachineEntityImpl implements DockerHost
brooklyn.entity.basic.SoftwareProcessImpl.UpdatingNotUpFromServiceProcessIsRunningbrooklyn.entity.basic.AbstractEntity.BasicConfigurationSupport, brooklyn.entity.basic.AbstractEntity.BasicFeedSupportbrooklyn.basic.AbstractBrooklynObject.BasicTagSupportbrooklyn.entity.basic.SoftwareProcess.ChildStartableMode, brooklyn.entity.basic.SoftwareProcess.RestartSoftwareParameters, brooklyn.entity.basic.SoftwareProcess.StopSoftwareParametersbrooklyn.basic.BrooklynObject.TagSupportbrooklyn.entity.trait.Configurable.ConfigurationSupportbrooklyn.entity.trait.Startable.RestartEffectorBody, brooklyn.entity.trait.Startable.StartEffectorBody, brooklyn.entity.trait.Startable.StopEffectorBody_subscriptionTracker, CHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, managementSupport, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, tempWorkingsCREATE_SSHABLE_IMAGE, DEPLOY_ARCHIVE, DOCKER_CONTAINER_CLUSTER, DOCKER_CONTAINER_SPEC, DOCKER_HARDWARE_ID, DOCKER_HOST_AFFINITY_RULES, DOCKER_HOST_NAME, DOCKER_HOST_NAME_FORMAT, DOCKER_HOST_SUBNET_TIER, DOCKER_HOST_VOLUME_MAPPING, DOCKER_IMAGE_ID, DOCKER_IMAGE_NAME, DOCKER_INFRASTRUCTURE, DOCKER_PASSWORD, DOCKER_PORT, DOCKER_SSL_PORT, DOCKER_STORAGE_DRIVER, DOCKER_VERSION, DOWNLOAD_URL, EPEL_RELEASE, JCLOUDS_DOCKER_LOCATION, OPEN_IPTABLES, PROVISIONING_FLAGS, RUN_DOCKER_COMMAND, RUN_DOCKER_COMMAND_TIMEOUT, SCAN, SCAN_INTERVAL, START_TIMEOUTCPU_USAGE, EXEC_COMMAND, EXEC_COMMAND_TIMEOUT, FREE_MEMORY, LOAD_AVERAGE, TOTAL_MEMORY, UPTIME, USED_MEMORYADDRESS, CHILDREN_STARTABLE_MODE, CUSTOMIZE_LATCH, DOWNLOAD_ADDON_URLS, ENTITY_STARTED, EXPANDED_INSTALL_DIR, HOSTNAME, INSTALL_DIR, INSTALL_FILES, INSTALL_LATCH, INSTALL_RESOURCES_LATCH, INSTALL_TEMPLATES, INSTALL_UNIQUE_LABEL, LAUNCH_LATCH, MAXIMUM_REBIND_SENSOR_CONNECT_DELAY, PID_FILE, POST_INSTALL_COMMAND, POST_LAUNCH_COMMAND, PRE_INSTALL_COMMAND, PRE_INSTALL_FILES, PRE_INSTALL_TEMPLATES, PRE_LAUNCH_COMMAND, PROVISIONING_LOCATION, PROVISIONING_PROPERTIES, REQUIRED_OPEN_LOGIN_PORTS, RUN_DIR, RUNTIME_FILES, RUNTIME_RESOURCES_LATCH, RUNTIME_TEMPLATES, SERVICE_PROCESS_IS_RUNNING, SERVICE_STATE_ACTUAL, SERVICE_STATE_EXPECTED, SETUP_LATCH, SHELL_ENVIRONMENT, SKIP_ENTITY_START_IF_RUNNING, SKIP_INSTALLATION, START_LATCH, SUBNET_ADDRESS, SUBNET_HOSTNAME, SUGGESTED_INSTALL_DIR, SUGGESTED_RUN_DIR, SUGGESTED_VERSION| Constructor and Description |
|---|
DockerHostImpl() |
| Modifier and Type | Method and Description |
|---|---|
DockerHostLocation |
createLocation(Map<String,?> flags)
Create a new
DockerHostLocation wrapping the machine we are starting in. |
String |
createSshableImage(String dockerFile,
String name)
Create an SSHable image and returns the image ID.
|
void |
deleteLocation() |
String |
deployArchive(String url)
Upload an archive file to the host and expand it, for export to a container.
|
int |
execCommandStatus(String command) |
int |
execCommandStatusTimeout(String command,
brooklyn.util.time.Duration timeout)
Runs a Unix command on the
machine and returns the exit status. |
Integer |
getCurrentSize() |
brooklyn.entity.group.DynamicCluster |
getDockerContainerCluster() |
List<brooklyn.entity.Entity> |
getDockerContainerList() |
String |
getDockerHostName() |
Integer |
getDockerPort() |
DockerHostDriver |
getDriver() |
Class<?> |
getDriverInterface() |
DockerHostLocation |
getDynamicLocation() |
com.google.common.base.Optional<String> |
getImageNamed(String name)
As
DockerHost.getImageNamed(String, String) and looking for the latest image. |
com.google.common.base.Optional<String> |
getImageNamed(String name,
String tag) |
DockerInfrastructure |
getInfrastructure() |
brooklyn.location.jclouds.JcloudsLocation |
getJcloudsLocation() |
String |
getPassword() |
protected Collection<Integer> |
getRequiredOpenPorts() |
String |
getShortName() |
brooklyn.networking.subnet.SubnetTier |
getSubnetTier() |
void |
init() |
boolean |
isLocationAvailable() |
String |
layerSshableImageOn(String baseImage,
String tag)
Create an SSHable image based on the image with the given name.
|
protected Map<String,Object> |
obtainProvisioningFlags(brooklyn.location.MachineProvisioningLocation location) |
void |
postStart() |
void |
postStop() |
protected void |
preStart() |
void |
preStop() |
void |
rebind() |
Integer |
resize(Integer desiredSize) |
String |
runDockerCommand(String command)
Execute a Docker command and return the output.
|
String |
runDockerCommandTimeout(String command,
brooklyn.util.time.Duration timeout)
Execute a Docker command and return the output, or throw an exception after a timeout.
|
void |
scanContainers() |
connectSensors, disconnectSensors, execCommand, execCommandTimeout, getMachinecallRebindHooks, callStartHooks, checkModifiable, connectServiceUpIsRunning, disconnectServiceUpIsRunning, doInitDriver, doRestart, doRestart, doStart, doStop, getLocalHostname, getMachineOrNull, getProvisioningLocation, initDriver, initEnrichers, newDriver, onManagementStarted, onManagementStarting, postDriverStart, postRebind, postRestart, preRestart, preStopConfirmCustom, restart, setProvisioningLocation, start, startInLocation, startInLocation, startInLocation, startInLocation, stop, waitForEntityStart, waitForServiceUp, waitForServiceUp, waitForServiceUp, waitForServiceUpaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, addTag, clearLocations, clearParent, config, configure, configure, configure, configure, configure, containsTag, destroy, emit, emitInternal, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getFeedSupport, getGroups, getIconUrl, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getSubscriptionTracker, getTags, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStopped, onTagsChanged, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDefaultDisplayName, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, toStringHelper, unsubscribe, unsubscribeconfigure, getCatalogItemId, getId, getTagSupport, isLegacyConstruction, isRebinding, setCatalogItemId, tagsclone, finalize, getClass, notify, notifyAll, wait, wait, waitexecCommand, execCommandTimeoutaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, addTag, clearParent, containsTag, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getTags, invoke, removeChild, removeEnricher, removeGroup, removePolicy, removeTag, setParentpublic void init()
init in class brooklyn.entity.machine.MachineEntityImplprotected Collection<Integer> getRequiredOpenPorts()
getRequiredOpenPorts in class brooklyn.entity.basic.SoftwareProcessImplprotected Map<String,Object> obtainProvisioningFlags(brooklyn.location.MachineProvisioningLocation location)
obtainProvisioningFlags in class brooklyn.entity.basic.SoftwareProcessImplpublic Integer resize(Integer desiredSize)
resize in interface brooklyn.entity.trait.Resizablepublic String getShortName()
getShortName in interface brooklyn.entity.trait.HasShortNamepublic Integer getCurrentSize()
getCurrentSize in interface brooklyn.entity.trait.Resizablepublic Class<?> getDriverInterface()
getDriverInterface in interface brooklyn.entity.drivers.DriverDependentEntitygetDriverInterface in class brooklyn.entity.machine.MachineEntityImplpublic DockerHostDriver getDriver()
getDriver in interface brooklyn.entity.basic.EmptySoftwareProcessgetDriver in interface brooklyn.entity.drivers.DriverDependentEntitygetDriver in class brooklyn.entity.basic.SoftwareProcessImplpublic Integer getDockerPort()
getDockerPort in interface DockerHostpublic String getDockerHostName()
getDockerHostName in interface DockerHostpublic List<brooklyn.entity.Entity> getDockerContainerList()
getDockerContainerList in interface DockerHostpublic DockerInfrastructure getInfrastructure()
getInfrastructure in interface DockerHostpublic String getPassword()
getPassword in interface DockerHostpublic String createSshableImage(String dockerFile, String name)
createSshableImage in interface DockerHostdockerFile - URL of Dockerfile to copyname - Repository nameDockerHostDriver.buildImage(String, String)public String layerSshableImageOn(String baseImage, String tag)
DockerHostlayerSshableImageOn in interface DockerHostbaseImage - The parent image to base the new image on, e.g. "tomcat" or "redis"tag - The tag of the parent image, e.g. "latest"public String runDockerCommand(String command)
runDockerCommand in interface DockerHostcommand - Docker commandpublic String runDockerCommandTimeout(String command, brooklyn.util.time.Duration timeout)
runDockerCommandTimeout in interface DockerHostcommand - Docker commandtimeout - Timeoutpublic String deployArchive(String url)
deployArchive in interface DockerHosturl - Archive source URLpublic DockerHostLocation getDynamicLocation()
getDynamicLocation in interface brooklyn.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public boolean isLocationAvailable()
isLocationAvailable in interface brooklyn.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public brooklyn.entity.group.DynamicCluster getDockerContainerCluster()
getDockerContainerCluster in interface DockerHostpublic brooklyn.location.jclouds.JcloudsLocation getJcloudsLocation()
getJcloudsLocation in interface DockerHostpublic brooklyn.networking.subnet.SubnetTier getSubnetTier()
getSubnetTier in interface DockerHostpublic int execCommandStatus(String command)
execCommandStatus in interface DockerHostDockerHost.execCommandStatusTimeout(String, Duration)public int execCommandStatusTimeout(String command, brooklyn.util.time.Duration timeout)
DockerHostmachine and returns the exit status.execCommandStatusTimeout in interface DockerHostMachineEntity.execCommandTimeout(String, Duration)public com.google.common.base.Optional<String> getImageNamed(String name)
DockerHostDockerHost.getImageNamed(String, String) and looking for the latest image.getImageNamed in interface DockerHostpublic com.google.common.base.Optional<String> getImageNamed(String name, String tag)
getImageNamed in interface DockerHostpublic DockerHostLocation createLocation(Map<String,?> flags)
DockerHostLocation wrapping the machine we are starting in.createLocation in interface brooklyn.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public void deleteLocation()
deleteLocation in interface brooklyn.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>protected void preStart()
preStart in class brooklyn.entity.basic.SoftwareProcessImplpublic void postStart()
postStart in class brooklyn.entity.basic.SoftwareProcessImplpublic void rebind()
rebind in class brooklyn.entity.basic.SoftwareProcessImplpublic void preStop()
preStop in class brooklyn.entity.basic.SoftwareProcessImplpublic void postStop()
postStop in class brooklyn.entity.basic.SoftwareProcessImplpublic void scanContainers()
Copyright © 2015. All rights reserved.