Packer is a powerful tool to build a golden image for multiple platforms. All the configurations are scripted therefore you can embrace Infrastructure-as-a-Code practice. And the best thing, it is FREE!
Painless is a simple, secure scripting language designed specifically for use with Elasticsearch. It is the default scripting language for Elasticsearch and can safely be used for inline and stored scripts.