GithubHelp home page GithubHelp logo

pires / docker-elasticsearch-kubernetes Goto Github PK

View Code? Open in Web Editor NEW
224.0 224.0 251.0 86 KB

Ready to use Elasticsearch + Kubernetes discovery plug-in Docker image.

License: Apache License 2.0

Dockerfile 100.00%
container docker elasticsearch kubernetes

docker-elasticsearch-kubernetes's People

Contributors

hikhvar avatar jjungnickel avatar jpiper avatar mindw avatar mstrzele avatar pires avatar selvakn avatar vichargrave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-elasticsearch-kubernetes's Issues

Alpine doesn't work with kubernetes

You have moved to Alpine linux quite some time ago (pires/docker-jre@00104da), since that moment kubernetes elasticsearch doesn't work. The reason is simple - alpine doesn't support search parameter in resolve.conf.
The plugin for kubernetes node discovery has kubernetes.default.svc as desitnation name, but kubernetes DNS doesn't have this address completely, but domain name search instead... so as a result - this builds are useless since that commit.
I see 2 options:

  1. change name in plugin to kubernetes.default.svc.cluster.local
  2. move to debian or any other base image with normal glibc.

Image does not run

Using docker and in kubernetes the container keeps crashing
The only output is
Not setting JVM max heap size, already set
By setting the args to /run.sh in kubernetes, the container started as expected

Add an image for 2.4.2?

Wanted to know if you are going to make an image for 2.4.2?

I see that you don't do branches or folders to represent each version but instead just update the image on master and tag so I'm not sure how much it'll make sense to do this tag but just asking.

Release 5.6.9

The Elasticsearch 5.6 branch continues to be maintained. On April 17, 2018, Elasticsearch 5.6.9 was released. Consider releasing a 5.6.9 version of this image.

Got KubernetesClientException when running this docker image

When I tried to run this docker image on my linux server, it throw out this warning:

[WARN ][i.f.e.d.k.KubernetesUnicastHostsProvider] [fd_rT8G] Exception caught during discovery: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
I'm using the latest 5.1.1 docker image.

The command to start the docker is:

docker run -d --privileged -p 9201:9200 -p 9301:9300 quay.io/pires/docker-elasticsearch-kubernetes:5.1.1

Can you help on this? Thank you!

Got exception when start up

I'm runing kubernetes1.2 on centos7

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
level=info msg="Starting go-dnsmasq server 0.9.8 ..."
level=info msg="Search domains in use: [default.svc.cluster.local. svc.cluster.local. cluster.local.]"
level=info msg="Ready for queries on tcp://127.0.0.1:53 - Nameservers: [10.254.210.250:53 10.45.8.11:53]"
level=info msg="Ready for queries on udp://127.0.0.1:53 - Nameservers: [10.254.210.250:53 10.45.8.11:53]"
[services.d] done.
[2016-03-28 09:24:55,025][INFO ][node ] [Saint Anna] version[2.2.1], pid[171], build[d045fc2/2016-03-09T09:38:54Z]
[2016-03-28 09:24:55,026][INFO ][node ] [Saint Anna] initializing ...
[2016-03-28 09:24:55,495][INFO ][plugins ] [Saint Anna] modules [lang-expression, lang-groovy], plugins [cloud-kubernetes], sites []
[2016-03-28 09:24:55,513][INFO ][env ] [Saint Anna] using [1] data paths, mounts [[/data (/dev/mapper/rhel-root)]], net usable_space [19.4gb], net total_space [40gb], spins? [possibly], types [xfs]
[2016-03-28 09:24:55,513][INFO ][env ] [Saint Anna] heap size [1007.3mb], compressed ordinary object pointers [true]
[2016-03-28 09:24:57,340][INFO ][node ] [Saint Anna] initialized
[2016-03-28 09:24:57,340][INFO ][node ] [Saint Anna] starting ...
Exception in thread "main" java.lang.IllegalArgumentException: No up-and-running site-local (private) addresses found, got [name:lo (lo), name:eth0 (eth0)]
at org.elasticsearch.common.network.NetworkUtils.getSiteLocalAddresses(NetworkUtils.java:186)
at org.elasticsearch.common.network.NetworkService.resolveInternal(NetworkService.java:233)
at org.elasticsearch.common.network.NetworkService.resolveInetAddresses(NetworkService.java:209)
at org.elasticsearch.common.network.NetworkService.resolveBindHostAddresses(NetworkService.java:122)
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:424)
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:321)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:170)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.node.Node.start(Node.java:252)
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:221)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:287)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.
[2016-03-28 09:24:57,421][INFO ][node ] [Saint Anna] stopping ...
[2016-03-28 09:24:57,433][INFO ][node ] [Saint Anna] stopped
[2016-03-28 09:24:57,433][INFO ][node ] [Saint Anna] closing ...
[2016-03-28 09:24:57,441][INFO ][node ] [Saint Anna] closed
/run.sh exited 1
level=info msg="Application exit requested by signal: terminated"
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Permissions erros installing plugins

The base user elasticsearch does not have the required permissions to install the s3-repository plugin.

sh: error setting limit: Operation not permitted
elasticsearch.yml  jvm.options        log4j2.properties
-> Downloading repository-s3 from elastic
[=================================================] 100%
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
Exception in thread "main" java.nio.file.FileSystemException: /elasticsearch/config/repository-s3: Operation not permitted
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileAttributeViews$Posix.setOwners(UnixFileAttributeViews.java:252)
	at sun.nio.fs.UnixFileAttributeViews$Posix.setGroup(UnixFileAttributeViews.java:291)
	at org.elasticsearch.plugins.InstallPluginCommand.setOwnerGroup(InstallPluginCommand.java:596)
	at org.elasticsearch.plugins.InstallPluginCommand.installConfig(InstallPluginCommand.java:569)
	at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:495)
	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:212)
	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:195)
	at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
	at org.elasticsearch.cli.Command.main(Command.java:62)
	at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:42)

we were running that with the command

yes | sudo -E -u elasticsearch /elasticsearch/bin/elasticsearch-plugin install repository-s3

it does work with the root container user:

yes | /elasticsearch/bin/elasticsearch-plugin install repository-s3

ERROR: no log4j2.properties found; tried [/elasticsearch/config] and its subdirectories

I'm investigating this issue but we've some clusters running with this version without problem.

Steps to reproduce

kubectl run -it  --rm --restart=Never -i --image=quay.io/pires/docker-elasticsearch-kubernetes:5.6.0 sh
If you don't see a command prompt, try pressing enter.
ERROR: no log4j2.properties found; tried [/elasticsearch/config] and its subdirectories
lspod default/sh terminated (Error)

Versions affected:

5.6.0
5.6.1
5.6.2
5.6.3
5.6.4

K8s version

kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.4+coreos.0", GitCommit:"4292f9682595afddbb4f8b1483673449c74f9619", GitTreeState:"clean", BuildDate:"2017-11-21T17:22:25Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

Documentation should list OpenJRE rather than Oracle JRE

Hello!
Great work adapting the production grade ES cluster and following upstream. Congrats and thanks, much appreciated.

One (very small) comment: I was a bit confused in the documentation for this as it states "Oracle JRE" but the original docker-jre is based on OpenJDK. I think it would be more accurate to mention OpenJDK JRE 8u92 (at least atm).

Best,

MEMORY_LOCK: false does not disable swapping

The docs state

Another option is to use mlockall on Linux/Unix systems, or VirtualLock on Windows, to try to lock the process address space into RAM, preventing any Elasticsearch memory from being swapped out.

The default should be to turn on bootstrap.memory_lock, not disable it.

elasticsearch-discovery hostname not found (related to closed issue #35)

Hi. Working on 6.0.0 with @morphers82. I've been attempting many fixes (read #35 a dozen times and focused on kube-dns) and getting the following error only on es-client nodes:

[2017-11-26T21:47:04,470][WARN ][o.e.d.z.ZenDiscovery ] [es-client-79f5fc4588-6p7v2] not enough master nodes discovered during pinging (found [[]], but needed [1]), pinging again [2017-11-26T21:47:04,471][WARN ][o.e.d.z.UnicastZenPing ] [es-client-79f5fc4588-6p7v2] failed to resolve host [elasticsearch-discovery] java.net.UnknownHostException: elasticsearch-discovery at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[?:1.8.0_131] at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_131] at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_131] at org.elasticsearch.transport.TcpTransport.parse(TcpTransport.java:882) ~[elasticsearch-6.0.0.jar:6.0.0] at org.elasticsearch.transport.TcpTransport.addressesFromString(TcpTransport.java:837) ~[elasticsearch-6.0.0.jar:6.0.0] at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:706) ~[elasticsearch-6.0.0.jar:6.0.0] at org.elasticsearch.discovery.zen.UnicastZenPing.lambda$null$0(UnicastZenPing.java:213) ~[elasticsearch-6.0.0.jar:6.0.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-6.0.0.jar:6.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

I understand "this is not elasticsearch or kubernetes" as mentioned in #35 , but it was working before upgrading to 6.0.0. Is there an alternative to kube-dns that may work?

DNS based discovery not configurable

Since commit d1907da it's no longer possible to automatically discover the master nodes in your cluster if the service has a different name. I run multiple ES clusters with different names inside the same namespace.

You used to be able to use the following environment variable:

service: ${DISCOVERY_SERVICE}

But now the following hardcoded name is used:

ping.unicast.hosts: elasticsearch-discovery

Is it possible to either revert this change or make sure it's configurable via the same envvar again? Thx

NFS for PS needs rpc.statd running

I am attempting to create a statefulset. My PS is locally hosted from an NFS share. My storage and claims are coming online but I get the following error:

MountVolume.SetUp failed for volume "kubernetes.io/nfs/fa7984c6-6f1a-11e7-b489-021fcfb21298-storage-es-data-0" (spec.Name: "storage-es-data-0") pod "fa7984c6-6f1a-11e7-b489-021fcfb21298" (UID: "fa7984c6-6f1a-11e7-b489-021fcfb21298") with: mount failed: exit status 32 Mounting command: mount Mounting arguments: 10.7.135.250:/vol/multiint/dev01/esearch/es001 /var/lib/kubelet/pods/fa7984c6-6f1a-11e7-b489-021fcfb21298/volumes/kubernetes.io~nfs/storage-es-data-0 nfs [] Output: mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use '-o nolock' to keep locks local, or start statd. mount.nfs: an incorrect mount option was specified Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "default"/"es-data-1". list of unattached/unmounted volumes=[storage]

Maybe we need to add an NFS package?

Upgrade Elasticsearch to 2.4.0

A new version of the plug-in was released but the merge didn't work out fabric8io/elasticsearch-cloud-kubernetes#43.

$ docker build -t quay.io/pires/docker-elasticsearch-kubernetes:2.4.0 .
Sending build context to Docker daemon 136.7 kB
Step 1 : FROM quay.io/pires/docker-elasticsearch:2.4.0
 ---> 9665d441ec66
Step 2 : MAINTAINER <....>
 ---> Using cache
 ---> d6aecc8468bf
Step 3 : ADD do_not_use.yml /elasticsearch/config/elasticsearch.yml
 ---> Using cache
 ---> 3e4dd14d6a94
Step 4 : RUN /elasticsearch/bin/plugin install io.fabric8/elasticsearch-cloud-kubernetes/2.4.0 --verbose
 ---> Running in 9ee2d1c42fad
-> Installing io.fabric8/elasticsearch-cloud-kubernetes/2.4.0...
Plugins directory [/elasticsearch/plugins] does not exist. Creating...
Trying https://download.elastic.co/io.fabric8/elasticsearch-cloud-kubernetes/elasticsearch-cloud-kubernetes-2.4.0.zip ...
Failed: FileNotFoundException[https://download.elastic.co/io.fabric8/elasticsearch-cloud-kubernetes/elasticsearch-cloud-kubernetes-2.4.0.zip]; nested: FileNotFoundException[https://download.elastic.co/io.fabric8/elasticsearch-cloud-kubernetes/elasticsearch-cloud-kubernetes-2.4.0.zip];
Trying https://search.maven.org/remotecontent?filepath=io/fabric8/elasticsearch-cloud-kubernetes/2.4.0/elasticsearch-cloud-kubernetes-2.4.0.zip ...
Downloading ..............................................................................................................................................................................................................................................................................................................................................................................................................DONE
Verifying https://search.maven.org/remotecontent?filepath=io/fabric8/elasticsearch-cloud-kubernetes/2.4.0/elasticsearch-cloud-kubernetes-2.4.0.zip checksums if available ...
Downloading .DONE
ERROR: Plugin [cloud-kubernetes] is incompatible with Elasticsearch [2.4.0]. Was designed for version [2.3.5]
The command '/bin/sh -c /elasticsearch/bin/plugin install io.fabric8/elasticsearch-cloud-kubernetes/2.4.0 --verbose' returned a non-zero code: 64

Disable Java DNS (for-ever-)Cache, which prevents discovery of moving masters

The base image doesn't change the default Java DNS cache setting, which is set to "cache for ever". This is not the desired behaviour in a kubernetes setup, where the IP adresses of the pods can change because of rescheduling, draining etc.
Unfortunately it's not realy possible (just with a deprecated option) to overwrite that behaviour with java startup parameters.
See https://stackoverflow.com/a/17219327/1460924

I'd suggest that either during image creation or at the docker-entrypoint.sh (at the base image) the "networkaddress.cache.ttl" setting is set to a value >= 0, for example:

sed -i 's/.*networkaddress.cache.ttl.*/networkaddress.cache.ttl=60' \
/usr/lib/jvm/default-jvm/jre/lib/security/java.security

Use hostname as node name

I run elastic in a statefulset where the hostnames are predictable. It would be nice if the name of the node is the same as the hostname in that case. Could this be configured or are there reasons not to do so?

Release 2.4.6

Hi,

Could you please perform a release for 2.4.6 image and push it to quay repo ?

Thanks

question about environment variables

Is this image really using fabric8 kubernetes plugin at all? Links in readme goes to fabric8 documentation, but elasticsearch config file does not contain that stuff? And I cannot see that fabric8 plugin installed? Anyways it looks like this docker image is working, i can create elasticsearch cluster to kubernetes which really works (i can kill pods etc and still it can recover its state)

Stateful Example not working due to: StatefulSet in version "v1alpha1" cannot be handled as a StatefulSet: no kind "StatefulSet" is registered for version "apps/v1alpha1"

I get the following error:
Error from server (BadRequest): error when creating "es-data-stateful.yaml": StatefulSet in version "v1alpha1" cannot be handled as a StatefulSet: no kind "StatefulSet" is registered for version "apps/v1alpha1"

I read that stateful sets were introduced in k8s version 1.5. I'm using 1.5.2, do I need to be using 1.6?

Here is my version info:

Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:44:38Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"08e099554f3c31f6e6f07b448ab3ed78d0520507", GitTreeState:"clean", BuildDate:"2017-01-12T04:52:34Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}

Why was run.sh removed?

I'm not sure why run.sh was removed. There should be defaults for all the environment variables.

failed to resolve host [elasticsearch-discovery]

Hello,
I'm using something similar to https://github.com/exoscale/multi-master-kubernetes for creating my cluster on some servers based on RHEL7 ( not the atomic host version ).
I've tried with or without discovery plugin ( depending on my version of elasticsearch ), and i found your implementation through dns. My problem when i try it, is ( like always for me ) the discovery which seem to not be able to resolve.
It loop with :

[2017-02-14T13:25:51,406][WARN ][o.e.d.z.UnicastZenPing ] [LX8rjyK] failed to resolve host [elasticsearch-discovery] java.net.UnknownHostException: elasticsearch-discovery at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[?:1.8.0_111] at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_111] at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_111] at org.elasticsearch.transport.TcpTransport.parse(TcpTransport.java:857) ~[elasticsearch-5.2.0.jar:5.2.0] at org.elasticsearch.transport.TcpTransport.addressesFromString(TcpTransport.java:812) ~[elasticsearch-5.2.0.jar:5.2.0] at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:657) ~[elasticsearch-5.2.0.jar:5.2.0] at org.elasticsearch.discovery.zen.UnicastZenPing.lambda$null$0(UnicastZenPing.java:212) ~[elasticsearch-5.2.0.jar:5.2.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_111] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:527) [elasticsearch-5.2.0.jar:5.2.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] [2017-02-14T13:25:59,408][WARN ][o.e.d.z.UnicastZenPing ] [LX8rjyK] timed out after [5s] resolving host [elasticsearch-discovery]

I also have this has logs of my kube-dns which might be causing problem :
server.go:155] Starting SkyDNS server (0.0.0.0:10053) server.go:165] Skydns metrics enabled (/metrics:10055) logs.go:41] skydns: ready for queries on cluster.local. for tcp://0.0.0.0:10053 [rcache 0] logs.go:41] skydns: ready for queries on cluster.local. for udp://0.0.0.0:10053 [rcache 0] sync.go:105] Error getting ConfigMap kube-system:kube-dns err: configmaps "kube-dns" not found dns.go:190] Error getting initial ConfigMap: configmaps "kube-dns" not found, starting with default values server.go:126] Setting up Healthz Handler (/readiness) server.go:131] Setting up cache handler (/cache) server.go:120] Status HTTP port 8081

I hope you will be able to give me a hint, i've spent a lot's of time in this discovery problem !

issues using /bin/plugin to install

Hi there,

I am currently trying to use both elasticsearch and couchbase db in a GKE kubernetes cluster. Part of this involves installing the couchbase elasticsearch plugin.

My k8s cluster currently has operational couchbase pods, and I have added elasticsearch as described at https://github.com/pires/kubernetes-elasticsearch-cluster.

The instructions I am using to install the plugin are described at http://developer.couchbase.com/documentation/server/4.0/connectors/elasticsearch-2.1/install-intro.html.

According to the above plugin instructions, I must install the plugin in each instance of ES. I enter the ES containers (sudo docker ps -a, get the ES container id, then sudo docker exec -ti sh) and then attempt to run the install instructions as described above.

When I first did this, I would get the following error:
Exception in thread "main" java.lang.IllegalArgumentException: Could not resolve placeholder 'HTTP_CORS_ALLOW_ORIGIN'.

I then set environment variables in each the yaml files for the ES deployments as follows:
name: HTTP_CORS_ENABLE
value: "true"
name: HTTP_CORS_ALLOW_ORIGIN
value: /https?://github.com/couchbaselabs/elasticsearch-transport-couchbase/releases/download/*/

I had hoped this would alleviate the issue, but then when I repeated the process I got the same error, except now the environment variable having an issue was NETWORK_HOST.

I set the env variable similarly, this time name: NETWORK_HOST and value: "local" as per the ES documentation.

Now I am being presented with the same error except now the variable having an issue is DISCOVERY_SERVICE. When I check the link on https://github.com/pires/docker-elasticsearch-kubernetes regarding DISCOVERY_SERVICE, it brings me to another plugin page. When I try to install this plugin by running plugin install io.fabric8/elasticsearch-cloud-kubernetes/2.3.4, I get the same errors as when I try to install the ES-CB plugin.

Is there something I'm inherently doing wrong here? If so, what should I be doing to successfully install plugins?

Thanks for any and all help you can provide :)

Installing plugins fails since 6.2.x

Since trying to bake a 6.2.x version of of this container I can no longer install plugins, it fails with a mktemp: Invalid argument error.

FROM quay.io/pires/docker-elasticsearch-kubernetes:6.2.2

ENV NODE_NAME=""

RUN /elasticsearch/bin/elasticsearch-plugin install https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/6.2.2.0/elasticsearch-prometheus-exporter-6.2.2.0.zip

All ElasticSearch themselves all they have to say about this is that they do not support Alpine: elastic/elasticsearch#28561

However it worked fine on version 6.1.3 of this container. The base docker-elasticsearch image inherits from quay.io/pires/docker-jre:8u151_cpufix for both versions, so it doesn't seem the version of Alpine has changed. Here's the Dockerfile that does work:

FROM quay.io/pires/docker-elasticsearch-kubernetes:6.1.3

ENV NODE_NAME=""

# Install Prometheus plug-in
RUN /elasticsearch/bin/elasticsearch-plugin install https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/6.1.3.0/elasticsearch-prometheus-exporter-6.1.3.0.zip

Any ideas what causes this and how it can be fixed?

Elasticsearch logs is written to file as well as stdout

Hi

We are having issues with elasticsearch logs using a lot of disks. Would it be an idea to just make ES log to stdout for this image?

An alternative is adding a cron job to the image that cleans up the daily rotated logs.
We would like hear your thought and would also gladly help with a PR.

Installing a plugin in container 5.2.2 fails because of placeholder NODE_NAME

When trying to build the following container from your latest one it fails.

FROM quay.io/pires/docker-elasticsearch-kubernetes:5.2.2

MAINTAINER Travix

ENV PROMETHEUS_EXPORTER_VERSION=5.2.2.0

# Install Prometheus plug-in
RUN /elasticsearch/bin/elasticsearch-plugin install https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/${PROMETHEUS_EXPORTER_VERSION}/elasticsearch-prometheus-exporter-${PROMETHEUS_EXPORTER_VERSION}.zip

The RUN command installing the Prometheus plugin fails with the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: Could not resolve placeholder 'NODE_NAME'
	at org.elasticsearch.common.settings.PropertyPlaceholder.parseStringValue(PropertyPlaceholder.java:116)
	at org.elasticsearch.common.settings.PropertyPlaceholder.replacePlaceholders(PropertyPlaceholder.java:69)
	at org.elasticsearch.common.settings.Settings$Builder.replacePropertyPlaceholders(Settings.java:986)
	at org.elasticsearch.common.settings.Settings$Builder.replacePropertyPlaceholders(Settings.java:946)
	at org.elasticsearch.node.internal.InternalSettingsPreparer.initializeSettings(InternalSettingsPreparer.java:137)
	at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:117)
	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:203)
	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:195)
	at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
	at org.elasticsearch.cli.Command.main(Command.java:88)
	at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47

Does commit c0aea73 need to be built into a new container? Could you perhaps create 5.2.2_1?

How does Elasticsearch get started?

Sorry I'm not getting this, but I don't see how Elasticsearch gets started for this container without invoking in the Dockerfile or having a run.sh script.

X-pack for elasticsearch 6.3.0 not working

$ docker run --rm -it quay.io/pires/docker-elasticsearch-kubernetes:6.3.0 sh
/elasticsearch # elasticsearch-plugin list
mktemp: Invalid argument
/elasticsearch #

It looks like alpine is not supported??

Is this the reason x-pack is not working in 6.3.0?

Missing required field "selector" in io.k8s.api.apps.v1.StatefulSetSpec

Executing:
kubectl apply -f es-master-stateful.yaml

Results in error:
error: error validating "es-master-stateful.yaml": error validating data: [ValidationError(StatefulSet.spec): missing required field "selector" in io.k8s.api.apps.v1.StatefulSetSpec, ValidationError(StatefulSet.spec): missing required field "serviceName" in io.k8s.api.apps.v1.StatefulSetSpec]; if you choose to ignore these errors, turn validation off with --validate=false

container won't work on kubernetes 1.3.5 (docker 1.11.2 build b9f10c9)

Heya all,

I'm trying to run ES master on my k8s cluster (hosted on AWS) and getting an error:

admin@ip-172-20-55-229:~$ kubectl logs es-master-2201531720-neui0
[2016-09-03 05:46:00,466][INFO ][node                     ] [Darkstar] version[2.3.4], pid[11], build[e455fd0/2016-06-30T11:24:31Z]
[2016-09-03 05:46:00,467][INFO ][node                     ] [Darkstar] initializing ...
[2016-09-03 05:46:01,235][INFO ][plugins                  ] [Darkstar] modules [reindex, lang-expression, lang-groovy], plugins [cloud-kubernetes], sites []
[2016-09-03 05:46:01,267][INFO ][env                      ] [Darkstar] using [1] data paths, mounts [[/data (/dev/xvdbe)]], net usable_space [46.5gb], net total_space [49gb], spins? [no], types [ext4]
[2016-09-03 05:46:01,267][INFO ][env                      ] [Darkstar] heap size [247.5mb], compressed ordinary object pointers [true]
[2016-09-03 05:46:03,890][INFO ][node                     ] [Darkstar] initialized
[2016-09-03 05:46:03,898][INFO ][node                     ] [Darkstar] starting ...
Exception in thread "main" java.lang.IllegalArgumentException: No up-and-running site-local (private) addresses found, got [name:lo (lo), name:eth0 (eth0)]
    at org.elasticsearch.common.network.NetworkUtils.getSiteLocalAddresses(NetworkUtils.java:186)
    at org.elasticsearch.common.network.NetworkService.resolveInternal(NetworkService.java:233)
    at org.elasticsearch.common.network.NetworkService.resolveInetAddresses(NetworkService.java:209)
    at org.elasticsearch.common.network.NetworkService.resolveBindHostAddresses(NetworkService.java:122)
    at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:424)
    at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:321)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
    at org.elasticsearch.transport.TransportService.doStart(TransportService.java:182)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
    at org.elasticsearch.node.Node.start(Node.java:278)
    at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:206)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:272)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.

Remove discovery plug-in in favor of hitting Service

Hi,

I successfully try to remove Elasticsearch discovery plugin Kubernetes

The new configuration is simple:

discovery:
  zen.ping.unicast.hosts: ${UNICAST_HOSTS}

and in the ES-RC:

 env:
        - name: UNICAST_HOSTS
          value: 'es-discovery.default.svc.cluster.local'

Is this plugin doing something more than discovering new nodes?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.