Skip to content

Instantly share code, notes, and snippets.

@aramalipoor
Last active March 28, 2019 07:36
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aramalipoor/c298395d937e1ad412db2ba8c0b239e9 to your computer and use it in GitHub Desktop.
Save aramalipoor/c298395d937e1ad412db2ba8c0b239e9 to your computer and use it in GitHub Desktop.
Elasticsearch 6.x + OSS Repository Plugin
# For ES 6.x Java XML Bind module must be explicitly added
ES_JAVA_OPTS=-Xms1000m -Xmx1000m -Des.logger.level=DEBUG --add-modules java.xml.bind
FROM docker.elastic.co/elasticsearch/elasticsearch:6.3.0
USER root
RUN yum install -y unzip
RUN curl -L https://github.com/zhichen/elasticsearch-repository-oss/releases/download/v5.5.3/elasticsearch-repository-oss-5.5.3.zip -o /tmp/elasticsearch-repository-oss.zip && \
unzip /tmp/elasticsearch-repository-oss.zip -d /tmp/oss-repository && \
mv /tmp/oss-repository/elasticsearch /usr/share/elasticsearch/plugins/repository-oss && \
sed -i "/elasticsearch.version=5.5.3/c elasticsearch.version=6.3.0" /usr/share/elasticsearch/plugins/repository-oss/plugin-descriptor.properties && \
sed -i "/version=5.5.3/c version=6.3.0" /usr/share/elasticsearch/plugins/repository-oss/plugin-descriptor.properties && \
sed -i '/isolated=/d' /usr/share/elasticsearch/plugins/repository-oss/plugin-descriptor.properties && \
sed -i '/jvm=/d' /usr/share/elasticsearch/plugins/repository-oss/plugin-descriptor.properties
USER elasticsearch
PUT _snapshot/my_warehouse/
{
"type": "oss",
"settings": {
"endpoint": "http://oss-eu-central-1.aliyuncs.com",
"access_key_id": "xxxxxxxxxxxxx",
"secret_access_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"bucket": "my-bucket-name-here",
"compress": true,
"chunk_size": "500mb",
"base_path": "my_warehouse/"
}
}
GET _snapshot/my_warehouse
PUT _snapshot/my_warehouse/my_snap1?wait_for_completion=true
GET _snapshot/my_warehouse/my_snap1
PUT _snapshot/my_warehouse/my_snap2?wait_for_completion=true
GET _snapshot/my_warehouse/my_snap2
POST _snapshot/my_warehouse/my_snap1/_restore
@beebird
Copy link

beebird commented Nov 28, 2018

Hi, I have the problem with xml bind: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException, could you tell me how to use the .env file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment