Problems encountered when setting-up ES6 on deployment-prep:
- install elasticsearch-oss not elasticsearch
- /etc/default/elasticsearch is required when installing the package because /usr/share/elasticsearch/bin/elasticsearch-env will source it
- Environment=ES_PATH_CONF=/etc/elasticsearch/%i must be added to the system unit
- ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec must be removed from the unit file
- /etc/default/elasticsearch must be emptied after package installation because /usr/share/elasticsearch/bin/elasticsearch-env will source it and overrides ES_CONF_PATH to /etc/elasticsearch
- /etc/elasticsearch/$cluster/log4j.properties ${sys:es.logs} must be changed to ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}
- /etc/elasticsearch/$cluster must be writable by elasticsearch
- remove -Epath.conf=/etc/elasticsearch/%i from /usr/share/elasticsearch/bin/elasticsearch options in the unit file