Hi Martin,
That makes sense. I'm slightly hesitant for us to have so many config
options.
For now, should we just add PRE_LAUNCH_COMMAND and POST_LAUNCH_COMMAND
as I believe that meets your UserGrid use-case (to update a config file
being installed into a Tomcat server, without having to write Java code
that sub-classes the Tomcat7SshDriver).
---
Another useful thing (based on separate chat on another UserGrid
requirement) is to specify files to be uploaded. In
`brooklyn.entity.messaging.qpid.QpidBroker`, there are config keys for
RUNTIME_FILES and RUNTIME_TEMPLATES that are uploaded in
`QpidSshDriver.customize`. It would be good to generalise these in
SoftwareProcess.
(MongoDBClient.JS_SCRIPTS is similar, but the
MongoDBClientSshDriver.customize chooses the destination dir rather than
it being part of the config values).
Aled
p.s. the interface is SoftwareProcess rather than AbstractSoftwareProcess.
On 19/06/2014 16:19, Martin Harris wrote:
Hi Folks,
I have a use-case where I want to deploy a Tomcat server, and once it's
launched I want to modify one of the files (inject the URL of another node
into a config file)
If I were doing it in Java, I'd create a custom SSH driver and override
launch, but I want to do it in YAML
In a similar pattern to the VanillaSoftwareProcess, I'm thinking about
adding some ConfigKey<String> keys to AbstractSoftwareProcess as follows:
ConfigKey<String> PRE_INSTALL_COMMAND
ConfigKey<String> POST_INSTALL_COMMAND
ConfigKey<String> PRE_CUSTOMIZE_COMMAND
ConfigKey<String> POST_CUSTOMIZE_COMMAND
ConfigKey<String> PRE_LAUNCH_COMMAND
ConfigKey<String> POST_LAUNCH_COMMAND
These would then be executed in AbstractSoftwareProcess.start()
Any thoughts?