Can I specify a repository in the configuration file?

The standard procedure to register a repository is to issue a PUT command
to the cluster.

I'd like to automatize the process, in a way such as a script can build a
search engine server and register a repository into it.

However, I can not trust the server be "ready and listening" immediately
after it's been started, so I'm afraid that if I issue the PUT command
right after starting the elasticsearch server, the server won't be ready
yet, and to repository is registered.

That's why I thought of specifying the repository in the elasticsearch
config file, but I haven't found any documentation regarding this.

Is this possible? or , at least, is there any signal or event I can listen
to to know when a elasticsearch server is "ready"?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3733f7f1-1272-4ed0-9484-f4d85a8b6e90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

On Friday, July 4, 2014 at 10:09:39 AM UTC-6, JoeZ99 wrote:

The standard procedure to register a repository is to issue a PUT command
to the cluster.

I'd like to automatize the process, in a way such as a script can build a
search engine server and register a repository into it.

However, I can not trust the server be "ready and listening" immediately
after it's been started, so I'm afraid that if I issue the PUT command
right after starting the elasticsearch server, the server won't be ready
yet, and to repository is registered.

That's why I thought of specifying the repository in the elasticsearch
config file, but I haven't found any documentation regarding this.

Is this possible? or , at least, is there any signal or event I can listen
to to know when a elasticsearch server is "ready"?

To determine when the cluster is ready, you can use the cluster health API
(http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html)
along with the wait_for_status and wait_for_nodes parameters, that way
you can wait for the cluster to be green with N nodes (however many are in
your cluster). After that returns successfully, you should be able to issue
the PUT command to register the repository.

;; Lee

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8daf638a-b500-4c9e-831f-024896281f08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.