-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we remove file-based scripts and templates? #21798
Comments
See #10959 |
Totally agreed. People should use API to distribute their scripts in the cluster. |
I'm leaving this open for feedback from users - are there situations solved by having file based scripts which are not solved by stored scripts? |
It know it is often used to create scripts with automated deployment tools like ansible or chef. These tools could use the REST API too but it is usually easier to copy files rather than waiting for the cluster to be green/put the script/handle retries and authentication. We could maybe use a "drop in" folder where the user can copy the scripts and they will be loaded and added as stored script by the node itself? This would still allow to deploy scripts as simple files, and plugins during their installation could also add files in this drop in folder (and then they won't need to access the filesystem). Once processed/acked, file can be deleted by the node. |
The way to do this is, when building your package, to fire up a one node cluster with the right cluster name, add all the scripts/templates/whatever that is needed for the new cluster, then shut the node down and use it as a base image. Then when deploying, the first node in your cluster has all the right settings etc, and the other nodes that join the cluster inherit them directly from the cluster state (ignoring whatever they have locally). |
We discussed this further on fix it friday. We are tending to remove file based scripts but want to wait more and get more feedback from users. Some finer points of the discussion that are worth mentioning:
|
Seems like we got no feedback from users in 5 months. Maybe time to mark adoptme? |
I'm in favour of removing file scripts and just keeping stored and inline. The APIs for storing scripts should be protected by the application. Marking as adoptme |
File scripts have 2 related settings: the path of file scripts, and whether they can be dynamically reloaded. This commit deprecates those settings. relates elastic#21798
File scripts have 2 related settings: the path of file scripts, and whether they can be dynamically reloaded. This commit deprecates those settings. relates #21798
File scripts have 2 related settings: the path of file scripts, and whether they can be dynamically reloaded. This commit deprecates those settings. relates #21798
This commit removes file scripts, which were deprecated in 5.5. closes elastic#21798
This commit removes file scripts, which were deprecated in 5.5. closes #21798
We have largely removed support for file-based configuration (eg mappings, settings, index templates) in favour of storing this info in the cluster.
For scripts and mustache templates, we allow them to be passed inline or to be stored in the cluster state. We used to be concerned about locking down scripts in Groovy etc, but with Painless we have safe scripting. Are file based scripts now redundant?
The one upside of files is that scripts can be written with new lines and formatting, while with inline/stored scripts they have to be passed in in a single line of JSON with newlines escaped. However this could be solved by improving Console to do the multi->single line conversion automatically.
Any other reasons for keeping file scripts?
The text was updated successfully, but these errors were encountered: