Easiest way to switch ES between multiple example directories?

Hello,

I am building a bunch of self-contained ES examples in different
directories. I am trying to figure out the easiest way to point ES to
various locations with minimum absolute paths hardcoded.

Is there a way to point one variable to some sort of home for
everything (elasticsearch.yml, logging.yml, data, logs, etc) to be
relative to that? Or using relative directories in the
elasticsearch.yml in a way that I could just clone that directory
structure to a new example.

I have tried elasticsearch -Des.config and it picks up my config file
but the default paths do not change and are still within ES's install
directory. Relative paths also seem to be relative to the install.

I guess I can do an environmental variable as a common root, but I
would still need to repeat that to point at my config file directly
anyway, right? I am hoping to reduce the call to one simple command
line to switch between examples.

Regards,
Alex.

--
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/CAEFAe-HTfQoubr5v%3DzineXjmkJN7TmY0k_qaVyYgeFTKRN-hoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

It's all absolute paths.

You could just run multiple, contained instances rather than multiple data
dirs.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 13 October 2014 03:03, Alexandre Rafalovitch arafalov@gmail.com wrote:

Hello,

I am building a bunch of self-contained ES examples in different
directories. I am trying to figure out the easiest way to point ES to
various locations with minimum absolute paths hardcoded.

Is there a way to point one variable to some sort of home for
everything (elasticsearch.yml, logging.yml, data, logs, etc) to be
relative to that? Or using relative directories in the
elasticsearch.yml in a way that I could just clone that directory
structure to a new example.

I have tried elasticsearch -Des.config and it picks up my config file
but the default paths do not change and are still within ES's install
directory. Relative paths also seem to be relative to the install.

I guess I can do an environmental variable as a common root, but I
would still need to repeat that to point at my config file directly
anyway, right? I am hoping to reduce the call to one simple command
line to switch between examples.

Regards,
Alex.

--
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/CAEFAe-HTfQoubr5v%3DzineXjmkJN7TmY0k_qaVyYgeFTKRN-hoQ%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAEM624Z8cBqo6fm62TV%2B6QGM0c6x6pEvUpDY%2BfY9zsBR-B4O7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thanks Mark,

I am afraid I am not entirely sure what you mean by "multiple,
contained instances". Do you mean replicating the whole binary
directory?

Regards,
Alex.

Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: Sign Up | LinkedIn

On 12 October 2014 17:57, Mark Walkom markw@campaignmonitor.com wrote:

It's all absolute paths.

You could just run multiple, contained instances rather than multiple data
dirs.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 13 October 2014 03:03, Alexandre Rafalovitch arafalov@gmail.com wrote:

Hello,

I am building a bunch of self-contained ES examples in different
directories. I am trying to figure out the easiest way to point ES to
various locations with minimum absolute paths hardcoded.

Is there a way to point one variable to some sort of home for
everything (elasticsearch.yml, logging.yml, data, logs, etc) to be
relative to that? Or using relative directories in the
elasticsearch.yml in a way that I could just clone that directory
structure to a new example.

I have tried elasticsearch -Des.config and it picks up my config file
but the default paths do not change and are still within ES's install
directory. Relative paths also seem to be relative to the install.

I guess I can do an environmental variable as a common root, but I
would still need to repeat that to point at my config file directly
anyway, right? I am hoping to reduce the call to one simple command
line to switch between examples.

Regards,
Alex.

--
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/CAEFAe-HTfQoubr5v%3DzineXjmkJN7TmY0k_qaVyYgeFTKRN-hoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAEM624Z8cBqo6fm62TV%2B6QGM0c6x6pEvUpDY%2BfY9zsBR-B4O7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAEFAe-HcFeCMgvDL8OF1haERybQi%3Df5_iHoy60KsJ1r6TP5ssA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

You can use the same binaries, but if you setup multiple configs pointing
to different data directories then you can leverage -Des.config pointing to
each config and then run multiple instances.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 13 October 2014 09:32, Alexandre Rafalovitch arafalov@gmail.com wrote:

Thanks Mark,

I am afraid I am not entirely sure what you mean by "multiple,
contained instances". Do you mean replicating the whole binary
directory?

Regards,
Alex.

Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: Sign Up | LinkedIn

On 12 October 2014 17:57, Mark Walkom markw@campaignmonitor.com wrote:

It's all absolute paths.

You could just run multiple, contained instances rather than multiple
data
dirs.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 13 October 2014 03:03, Alexandre Rafalovitch arafalov@gmail.com
wrote:

Hello,

I am building a bunch of self-contained ES examples in different
directories. I am trying to figure out the easiest way to point ES to
various locations with minimum absolute paths hardcoded.

Is there a way to point one variable to some sort of home for
everything (elasticsearch.yml, logging.yml, data, logs, etc) to be
relative to that? Or using relative directories in the
elasticsearch.yml in a way that I could just clone that directory
structure to a new example.

I have tried elasticsearch -Des.config and it picks up my config file
but the default paths do not change and are still within ES's install
directory. Relative paths also seem to be relative to the install.

I guess I can do an environmental variable as a common root, but I
would still need to repeat that to point at my config file directly
anyway, right? I am hoping to reduce the call to one simple command
line to switch between examples.

Regards,
Alex.

--
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/CAEFAe-HTfQoubr5v%3DzineXjmkJN7TmY0k_qaVyYgeFTKRN-hoQ%40mail.gmail.com
.

For more options, visit https://groups.google.com/d/optout.

--
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/CAEM624Z8cBqo6fm62TV%2B6QGM0c6x6pEvUpDY%2BfY9zsBR-B4O7Q%40mail.gmail.com
.

For more options, visit https://groups.google.com/d/optout.

--
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/CAEFAe-HcFeCMgvDL8OF1haERybQi%3Df5_iHoy60KsJ1r6TP5ssA%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAEM624ZZLmTfZy7Ztf5jEAycWmaHvV1DwMPcheiifKYhvN0Ovg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

But I think, that's what I am not seeing the exact clarity.
-Des.config does not seem to affect the location of data and log
directories. So, they have to be set individually in the
elasticsearch.yml that the es.config points to. If I leave them as
default, they are relative to the ES binary, that is to say -
centralized.

I can set them as relative directories (just checked), but then they
are relative to the directory I am running the start command from,
which is not terribly stable unless I lock down the exact run
sequence.

Or am I missing something?

Regards,
Alex.

On 12 October 2014 18:36, Mark Walkom markw@campaignmonitor.com wrote:

You can use the same binaries, but if you setup multiple configs pointing to
different data directories then you can leverage -Des.config pointing to
each config and then run multiple instances.

--
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/CAEFAe-H3pCV_cH7fKJbdzR5F0PypoVK0MT8-Ek2qFNnb0aEk5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.