Closed 5andi5 closed 6 years ago
Managed to get Elasticsearch 6 up and running by modifying dokku-elasticsearch plugin source. But it's an ugly hack which disables configuration files from host machine.
Here are patching steps:
/var/lib/dokku/plugins/enabled/elasticsearch/functions
and replace function service_create_container
with:service_create_container() {
local SERVICE="$1"
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
local SERVICE_NAME="$(get_service_name "$SERVICE")"
# /etc/elasticsearch does not exists in the image.
# And /usr/share/elasticsearch/config is present in container without mounting.
# Don't mount config volume and work with elastic default configuration files.
ID=$(docker run --name "$SERVICE_NAME" -v "$SERVICE_ROOT/data:/usr/share/elasticsearch/data" --env-file="$SERVICE_ROOT/ENV" -d --restart always --label dokku=service --label dokku.service=elasticsearch "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION")
# ID=$(docker run --name "$SERVICE_NAME" -v "$SERVICE_ROOT/data:/usr/share/elasticsearch/data" -v "$SERVICE_ROOT/config:/usr/share/elasticsearch/config" --env-file="$SERVICE_ROOT/ENV" -d --restart always --label dokku=service --label dokku.service=elasticsearch "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION")
echo "$ID" > "$SERVICE_ROOT/ID"
# dokku_log_info2 "Copying config files into place"
# retry-docker-command "$ID" "cp -arfp --no-clobber /etc/elasticsearch/. /usr/share/elasticsearch/config/"
# retry-docker-command "$ID" "echo 'network.host: 0.0.0.0' >> /usr/share/elasticsearch/config/elasticsearch.yml"
# retry-docker-command "$ID" "rm -rf /etc/elasticsearch && ln -sfn /usr/share/elasticsearch/config /etc/elasticsearch"
# retry-docker-command "$ID" "chown -R root:elasticsearch /etc/elasticsearch"
# Grant permissions on data volume.
# Elasticsearch service is not run as root anymore.
dokku_log_info2 "Granting permissions on data volume"
retry-docker-command "$ID" "chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data"
docker restart "$ID" > /dev/null
dokku_log_verbose_quiet "Waiting for container to be ready"
docker run --rm --link "$SERVICE_NAME:$PLUGIN_COMMAND_PREFIX" dokkupaas/wait:0.2 -p "$PLUGIN_DATASTORE_WAIT_PORT" > /dev/null
dokku_log_info2 "$PLUGIN_SERVICE container created: $SERVICE"
service_info "$SERVICE"
}
export ELASTICSEARCH_IMAGE="docker.elastic.co/elasticsearch/elasticsearch"
export ELASTICSEARCH_IMAGE_VERSION="6.2.4"
dokku elasticsearch:create lollipop
This is related to #53. Basically the image maintainers made it more difficult to provision without some orchestration layer because they disabled public host networking.
As this is an OSS project, there is no project roadmap. If you'd like to see support for some feature land, you'll need to file the requisite pull requests and work with us to get it mergeable. If you'd like to see a roadmap and are willing to pay for that roadmap, feel free to email me and we can work something out.
Closing in favor of #53.
Looks like Elasticsearch 6 is not supported currently.
dokku elasticsearch:create
completes with error when trying to copy configuration files. Is support for v6 on project roadmap?