public interface VanillaSoftwareProcess extends AbstractVanillaProcess
SoftwareProcess
entity that runs commands from an archive.
Downloads and unpacks the archive indicated (optionally) then runs the management commands (scripts) indicated (relative to the root of the archive if supplied, otherwise in a tmp working dir) to manage. Uses config keys to identify the files or commands to use.
In the simplest mode, simply provide either:
AbstractVanillaProcess.DOWNLOAD_URL
containing a ./start.sh
LAUNCH_COMMAND
PID_FILE
unless one of the options below is supported.
The start command can be a complex bash command, downloading and unpacking files, and handling the PID_FILE
requirement.
For example export MY_PID_FILE=$PID_FILE ; ./my_start.sh
or nohup ./start.sh & ; echo $! > $PID_FILE ; sleep 5
.
You can supply both AbstractVanillaProcess.DOWNLOAD_URL
and LAUNCH_COMMAND
configuration as well..
In addition, you can supply an AbstractVanillaProcess.INSTALL_COMMAND
and / or a AbstractVanillaProcess.CUSTOMIZE_COMMAND
to reduce the complexity
of the LAUNCH_COMMAND
, and to avoid repeating actions that are unnecessary in subsequent launches.
By default the PID is used to stop the process using kill
followed by kill -9
if needed and restart
is implemented by stopping the process and then running VanillaSoftwareProcessSshDriver.launch()
, but it is
possible to override this behavior through config keys:
AbstractVanillaProcess.CHECK_RUNNING_COMMAND
AbstractVanillaProcess.STOP_COMMAND
SoftwareProcess.PID_FILE
to use
SoftwareProcess.ChildStartableMode, SoftwareProcess.RestartSoftwareParameters, SoftwareProcess.StopSoftwareParameters
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Startable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBody
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.lang.String> |
LAUNCH_COMMAND |
CHECK_RUNNING_COMMAND, CUSTOMIZE_COMMAND, DOWNLOAD_URL, INSTALL_COMMAND, STOP_COMMAND, SUGGESTED_VERSION
ADDRESS, 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, START_TIMEOUT, SUBNET_ADDRESS, SUBNET_HOSTNAME, SUGGESTED_INSTALL_DIR, SUGGESTED_RUN_DIR
RESTART, SERVICE_UP, START, STOP
addChild, 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, setParent
getCatalogItemId, getTagSupport, tags
config, setConfig
static final ConfigKey<java.lang.String> LAUNCH_COMMAND