Deploying script files to disk across all nodes

I intend to store scripts on disk as specified in http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.htm

I have few questions on using this -

  1. How do I version control my scripts ? I can store different versions in different directories, but I would like it if I could specify a subdirectory that should be used inside config/scripts.
    I'm open to other ideas too.
  2. How do I ensure that my copied scripts have been successfully picked up by ES and compiled. An API to test for failures would be nice (maybe augment _cat/nodes) ?
  1. Versioning maintenance is up to you. You could use git with a hook to push files once they have been committed. The scripting directory cannot be customised, but please feel free to raise a GH enhancement request if you want.
  2. It should log when a script is loaded and compiled, so you need to watch for that.

W.r.t #2 - I know I can look at parse the logs to see when a script was picked up, but wouldn't it be better if there was an API which let you know which scripts were available on a particular node ?
In the absence of this, the deployment validations of a file push is much harder; the only way is to run the actual script (and that too on a particular shard on a particular node) to see if it runs without errors

You're right. Feel free to raise a GH feature request to get this added :slight_smile:

  1. Did you ever file an enhancement request for this?

  2. We placed a script in a subdirectory and it appeared to be compiled, but for some reason upon execution we get, "ElasticsearchIllegalArgumentException[Unable to find on disk script ..." - did you have any issues executing scripts located in subdirectories of config/scripts/?