public class DockerHostImpl extends org.apache.brooklyn.entity.machine.MachineEntityImpl implements DockerHost
org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.ServiceNotUpDiagnosticsCollector, org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.UpdatingNotUpFromServiceProcessIsRunningorg.apache.brooklyn.core.entity.AbstractEntity.BasicConfigurationSupport, org.apache.brooklyn.core.entity.AbstractEntity.BasicEnricherSupport, org.apache.brooklyn.core.entity.AbstractEntity.BasicFeedSupport, org.apache.brooklyn.core.entity.AbstractEntity.BasicGroupSupport, org.apache.brooklyn.core.entity.AbstractEntity.BasicPolicySupport, org.apache.brooklyn.core.entity.AbstractEntity.BasicSensorSupport, org.apache.brooklyn.core.entity.AbstractEntity.BasicSubscriptionSupportorg.apache.brooklyn.core.objs.AbstractBrooklynObject.BasicTagSupportorg.apache.brooklyn.entity.software.base.SoftwareProcess.ChildStartableMode, org.apache.brooklyn.entity.software.base.SoftwareProcess.RestartSoftwareParameters, org.apache.brooklyn.entity.software.base.SoftwareProcess.StopSoftwareParametersorg.apache.brooklyn.api.entity.Entity.AdjunctSupport<T extends org.apache.brooklyn.api.objs.EntityAdjunct>, org.apache.brooklyn.api.entity.Entity.EnricherSupport, org.apache.brooklyn.api.entity.Entity.GroupSupport, org.apache.brooklyn.api.entity.Entity.PolicySupport, org.apache.brooklyn.api.entity.Entity.SensorSupportorg.apache.brooklyn.api.objs.BrooklynObject.RelationSupport<T extends org.apache.brooklyn.api.objs.BrooklynObject>, org.apache.brooklyn.api.objs.BrooklynObject.SubscriptionSupport, org.apache.brooklyn.api.objs.BrooklynObject.TagSupportorg.apache.brooklyn.api.objs.Configurable.ConfigurationSupportorg.apache.brooklyn.core.entity.trait.Startable.RestartEffectorBody, org.apache.brooklyn.core.entity.trait.Startable.StartEffectorBody, org.apache.brooklyn.core.entity.trait.Startable.StopEffectorBodyorg.apache.brooklyn.core.entity.EntityInternal.EnricherSupportInternal, org.apache.brooklyn.core.entity.EntityInternal.EntitySubscriptionSupportInternal, org.apache.brooklyn.core.entity.EntityInternal.FeedSupport, org.apache.brooklyn.core.entity.EntityInternal.GroupSupportInternal, org.apache.brooklyn.core.entity.EntityInternal.PolicySupportInternal, org.apache.brooklyn.core.entity.EntityInternal.SensorSupportInternalorg.apache.brooklyn.core.objs.BrooklynObjectInternal.ConfigurationSupportInternal, org.apache.brooklyn.core.objs.BrooklynObjectInternal.RelationSupportInternal<T extends org.apache.brooklyn.api.objs.BrooklynObject>, org.apache.brooklyn.core.objs.BrooklynObjectInternal.SubscriptionSupportInternalconnectedSensors_subscriptionTracker, CHILD_ADDED, CHILD_REMOVED, CONFIG_KEY_ADDED, CONFIG_KEY_REMOVED, DEFAULT_DISPLAY_NAME, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, GROUP_ADDED, GROUP_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, managementSupport, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, tempWorkingsADD_LOCALHOST_PERMISSION, ARCHIVE_DIRECTORY_NAME_FORMAT, BUILD_IMAGE, DEPLOY_ARCHIVE, DOCKER_CONTAINER_CLUSTER, DOCKER_CONTAINER_SPEC, DOCKER_CONTROL_PLANE_PORT, DOCKER_DATA_PLANE_PORT, DOCKER_HARDWARE_ID, DOCKER_HOST_AFFINITY_RULES, DOCKER_HOST_SUBNET_TIER, DOCKER_HOST_VOLUME_MAPPING, DOCKER_IMAGE_ID, DOCKER_IMAGE_NAME, DOCKER_INFRASTRUCTURE, DOCKER_LOGIN_PASSWORD, DOCKER_PORT, DOCKER_SSL_PORT, DOCKER_STORAGE_DRIVER, DOCKER_USE_SSH, DOCKER_VERSION, DOWNLOAD_URL, EPEL_RELEASE, ETCD_NODE, JCLOUDS_DOCKER_LOCATION, OPEN_IPTABLES, PROVISIONING_FLAGS, RUN_DOCKER_COMMAND, RUN_DOCKER_COMMAND_TIMEOUT, SCAN, SCAN_INTERVAL, START_TIMEOUTEXEC_COMMAND, EXEC_COMMAND_TIMEOUTUSE_SSH_MONITORINGADDRESS, CHILDREN_STARTABLE_MODE, CUSTOMIZE_LATCH, DONT_REQUIRE_TTY_FOR_SUDO, DOWNLOAD_ADDON_URLS, ENTITY_STARTED, EXPANDED_INSTALL_DIR, HOSTNAME, INBOUND_PORTS_AUTO_INFER, INBOUND_PORTS_CONFIG_REGEX, INSTALL_DIR, INSTALL_FILES, INSTALL_LATCH, INSTALL_RESOURCES_LATCH, INSTALL_TEMPLATES, INSTALL_UNIQUE_LABEL, LAUNCH_LATCH, LIFECYCLE_EFFECTOR_TASKS, MAXIMUM_REBIND_SENSOR_CONNECT_DELAY, PID_FILE, POST_CUSTOMIZE_COMMAND, POST_INSTALL_COMMAND, POST_LAUNCH_COMMAND, PRE_CUSTOMIZE_COMMAND, PRE_INSTALL_COMMAND, PRE_INSTALL_FILES, PRE_INSTALL_TEMPLATES, PRE_LAUNCH_COMMAND, PROVISIONING_LOCATION, PROVISIONING_PROPERTIES, REQUIRED_OPEN_LOGIN_PORTS, RETRIEVE_USAGE_METRICS, 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, STOP_IPTABLES, SUBNET_ADDRESS, SUBNET_HOSTNAME, SUGGESTED_VERSION| Constructor and Description |
|---|
DockerHostImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIpPermissions(Collection<org.jclouds.net.domain.IpPermission> permissions) |
String |
buildImage(String dockerFile,
String entrypoint,
String contextArchive,
String name,
boolean useSsh,
Map<String,Object> substitutions)
Create an image from a Dockerfile and optional entrypoint script and return the image ID.
|
void |
configureSecurityGroups() |
protected void |
connectServiceUpIsRunning() |
DockerHostLocation |
createLocation(Map<String,?> flags)
Create a new
DockerHostLocation wrapping the machine we are starting in. |
void |
deleteLocation() |
String |
deployArchive(String url)
Upload an archive file to the host and expand it, for export to a container.
|
protected void |
disconnectServiceUpIsRunning() |
int |
execCommandStatus(String command) |
int |
execCommandStatusTimeout(String command,
org.apache.brooklyn.util.time.Duration timeout)
Runs a Unix command on the
machine and returns the exit status. |
Integer |
getCurrentSize() |
String |
getDisplayName() |
org.apache.brooklyn.api.entity.Group |
getDockerContainerCluster() |
List<org.apache.brooklyn.api.entity.Entity> |
getDockerContainerList() |
Integer |
getDockerPort() |
DockerHostDriver |
getDriver() |
Class<?> |
getDriverInterface() |
DockerHostLocation |
getDynamicLocation() |
Object |
getHostMutex() |
String |
getIconUrl() |
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() |
protected Collection<org.jclouds.net.domain.IpPermission> |
getIpPermissions() |
org.apache.brooklyn.location.jclouds.JcloudsLocation |
getJcloudsLocation() |
String |
getLoginPassword() |
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.
|
String |
layerSshableImageOnFullyQualified(String fullyQualifiedName)
Create an SSHable image based on the fullyQualifiedName provided
|
protected Map<String,Object> |
obtainProvisioningFlags(org.apache.brooklyn.api.location.MachineProvisioningLocation location) |
void |
postStart() |
protected void |
preStart() |
void |
preStop() |
void |
rebind() |
void |
removeIpPermissions(Collection<org.jclouds.net.domain.IpPermission> permissions) |
String |
runDockerCommand(String command)
Execute a Docker command and return the output.
|
String |
runDockerCommandTimeout(String command,
org.apache.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, getMachine, initEnrichersisSshMonitoringEnabledcallRebindHooks, doInitDriver, getLifecycleEffectorTasks, getMachineOrNull, getProvisioningLocation, initDriver, newDriver, onManagementStarted, onManagementStarting, populateServiceNotUpDiagnostics, postDriverStart, postRebind, postRestart, postStop, preRestart, preStopConfirmCustom, restart, setProvisioningLocation, start, stop, waitForEntityStart, waitForServiceUp, waitForServiceUp, waitForServiceUp, waitForServiceUpaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, clearLocations, clearParent, config, configure, configure, configure, configure, configure, configure, destroy, emit, emitInternal, enrichers, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getFeedSupport, getGroups, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionTracker, groups, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStopped, onTagsChanged, policies, refreshInheritedConfig, relations, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, requestPersist, resetProxy, sensors, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDefaultDisplayName, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, subscriptions, toMetadataRecord, toString, toStringHelper, unsubscribe, unsubscribeconfigure, getCatalogItemId, getId, isLegacyConstruction, isRebinding, setCatalogItemId, tagsclone, finalize, getClass, notify, notifyAll, wait, wait, waitexecCommand, execCommandTimeoutpopulateServiceNotUpDiagnosticsaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, clearParent, enrichers, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getEnrichers, getEntityType, getGroups, getId, getLocations, getParent, getPolicies, groups, invoke, policies, relations, removeChild, removeEnricher, removeGroup, removePolicy, sensors, setDisplayName, setParentgetCatalogItemId, subscriptions, tagsconfig, getConfig, setConfigpublic Object getHostMutex()
getHostMutex in interface DockerHostpublic void init()
init in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic String getIconUrl()
getIconUrl in interface org.apache.brooklyn.api.entity.EntitygetIconUrl in class org.apache.brooklyn.core.entity.AbstractEntitypublic String getDisplayName()
getDisplayName in interface org.apache.brooklyn.api.entity.EntitygetDisplayName in interface org.apache.brooklyn.api.objs.BrooklynObjectgetDisplayName in class org.apache.brooklyn.core.entity.AbstractEntityprotected Collection<Integer> getRequiredOpenPorts()
getRequiredOpenPorts in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplprotected Map<String,Object> obtainProvisioningFlags(org.apache.brooklyn.api.location.MachineProvisioningLocation location)
obtainProvisioningFlags in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic String getShortName()
getShortName in interface org.apache.brooklyn.api.objs.HasShortNamepublic Integer getCurrentSize()
getCurrentSize in interface DockerHostpublic Class<?> getDriverInterface()
getDriverInterface in interface org.apache.brooklyn.api.entity.drivers.DriverDependentEntitygetDriverInterface in class org.apache.brooklyn.entity.machine.MachineEntityImplpublic DockerHostDriver getDriver()
getDriver in interface org.apache.brooklyn.api.entity.drivers.DriverDependentEntitygetDriver in interface org.apache.brooklyn.entity.software.base.EmptySoftwareProcessgetDriver in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic Integer getDockerPort()
getDockerPort in interface DockerHostpublic List<org.apache.brooklyn.api.entity.Entity> getDockerContainerList()
getDockerContainerList in interface DockerHostpublic DockerInfrastructure getInfrastructure()
getInfrastructure in interface DockerHostpublic String getLoginPassword()
getLoginPassword in interface DockerHostpublic String buildImage(String dockerFile, @Nullable String entrypoint, @Nullable String contextArchive, String name, boolean useSsh, Map<String,Object> substitutions)
buildImage in interface DockerHostdockerFile - URL of Dockerfile template, or an archive including Dockerfile and all required contextentrypoint - URL of entrypoint script for Dockerfile, may be nullcontextArchive - URL of context archive for Dockerfile, may be nullname - Registry nameuseSsh - Add SSHable layer after buildingsubstitutions - Extra template substitutions for the DockerfileDockerHostDriver#buildImage(String, Optional, String, boolean)public String layerSshableImageOnFullyQualified(String fullyQualifiedName)
DockerHostlayerSshableImageOnFullyQualified in interface DockerHostfullyQualifiedName - The fully qualified name to base the new image on. E.g. quay.io/graemem/myrepo/redis:2public 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, org.apache.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 org.apache.brooklyn.core.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public boolean isLocationAvailable()
isLocationAvailable in interface org.apache.brooklyn.core.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public org.apache.brooklyn.api.entity.Group getDockerContainerCluster()
getDockerContainerCluster in interface DockerHostpublic org.apache.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, org.apache.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 org.apache.brooklyn.core.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public void deleteLocation()
deleteLocation in interface org.apache.brooklyn.core.location.dynamic.LocationOwner<DockerHostLocation,DockerHost>public void configureSecurityGroups()
configureSecurityGroups in interface DockerHostpublic void removeIpPermissions(Collection<org.jclouds.net.domain.IpPermission> permissions)
removeIpPermissions in interface DockerHostpublic void addIpPermissions(Collection<org.jclouds.net.domain.IpPermission> permissions)
addIpPermissions in interface DockerHostprotected Collection<org.jclouds.net.domain.IpPermission> getIpPermissions()
protected void preStart()
preStart in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic void postStart()
postStart in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic void rebind()
rebind in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic void preStop()
preStop in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplpublic void scanContainers()
protected void connectServiceUpIsRunning()
connectServiceUpIsRunning in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplprotected void disconnectServiceUpIsRunning()
disconnectServiceUpIsRunning in class org.apache.brooklyn.entity.software.base.SoftwareProcessImplCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.