I have Coroz cluster with three servers (on the digital ocean), currently MongoDB is running, now I am on this cluster I want to start elastic search with 1 replica (not using the Mongo River).
I outlined the description.
Results in two services, elastic search @. Service
& amp; elasticsearch-discovery @ Service
.
elasticsearch @. Service
[Unit] Description = Elastic Search Service = After Etcd.service = before docker.service = elasticsearch-discovery@%i.service Requires = elasticsearch- Discovery@%i.service [Service] KillMode = Any TimeoutState SEC = 0 TimeoutStops = 360 Environment File = / etc / Environment ExecStartPre = - / Usr / bin / docker kill% p-% i ExecStartPre = - / usr / bin / docker Rm% p-% i ExecStartPre = - / usr / bin / bash -c "echo prepill and rm;" ExecStartPre = / usr / bin / mkdir -p / data / elasticsearch ExecStartPre = / usr / bin / docker bridge dockerfile / elasticsearch ExecStartPre = / usr / bin / bash -c "echo mkdir and docker bridge;" ExecStart = / bin / bash -c "\ echo startup; \ curl -f $ {COREOS_PUBLIC_IPV4}: 4001 / v2 / keys / services / elastic search; \ [$? = 0]; then \ UNICAST_HOSTS = $ (etcdctl ls - -Secure / Services / LolationalWest | SAD / \ / Services / ElasticShark \ ///G '| SAD S / $ /: 9300 /' Paste-S-D ','); \ echo key found; \ Else \ UNICAST_HOSTS = ''; \ Echo No key found; \ "ExecStartPost = / bin / bash -c \" \ echo initial dock; \ / usr / bin / docker run \ --name% p-% i \ - Publishing 9200: 9200 \ - Publish 9300: 9300 \ --volume / data / elastic search: / data \ dokterfile / lolacockwest \ / Elastic search / bin / logical search \ --node.name =% p-% i \ --cluster.name = nvssearch \ --network.publish_host = $ {COREOS_PUBLIC_IPV4} \ - -discovery.zen.ping.multikast .enabled = false \ --discovery.zen.ping.unicast.hosts = $ UNICAST_HOSTS; "ExecStop = / bin / bash / -c" / usr / bin / docker kill% p-% i "restart = failure [ X-Fleet] X -Conflicts=%p@*.service
elasticsearch-discovery @. Service
[Unit] Description = Elastic Search Search service after BindsTo=elasticsearch@%i.service = elasticsearch @% i Service [service] environment file = / etc / environment ExecStart = / bin / bash -c '\ true while; Do \ curl -f $ {COREOS_PUBLIC_IPV4}: 9200; \ If ["$?" = "0"]; Then \ etcdctl set / services / elasticsearch / $ {COREOS_PUBLIC_IPV4} \ '{"http_port": 9200, "transport_port": 9300} \' --ttl 60; \ Else \ etcdctl rm / services / elasticsearch / $ {COREOS_PUBLIC_IPV4}; \ Fi; \ Sleep 45; \ 'ExecStop = / usr / bin.etcdctl rm / services / elasticsearch / $ {COREOS_PUBLIC_IPV4} [X-Fleet] X-ConditionMachineOf = elasticsearch@%i.service
But if I service Try running ( fleetctl submit / load / start elasticsearch@1.service
), it dies immediately:
elasticsearch@1.service 475f6273 .. ./ IP Passive Dead
Running Fleettalk Journal Elastic Seat @ 1
results in the following message:
Mar 17 09:17:04 NVS-1 System Diary [1]: Elastic Search Service Stopped
It's all, whatever I've added (for service), or anything. Any idea about how to get someone else?
It is a bit easier to get my blog post shows how to run on Vogue, though the cloud But the same setup should be very straight forward.
No comments:
Post a Comment