Re: How can I set configuration options?

2013-04-10 Thread Edd Grant
Thanks Hoss, those are some really useful clarifications. Since what I'm
working on is currently at POC stage I'll go with the system properties and
will refactor them out as I move towards having a standalone ZooKeeper
ensemble.

Thanks again.

Edd


On 10 April 2013 01:41, Chris Hostetter hossman_luc...@fucit.org wrote:

 : Thanks for the replies. The problem I have is that setting them at the
 JVM
 : level would mean that all instances of Solr deployed in the Tomcat
 instance
 : are forced to use the same settings. I actually want to set the
 properties
 : at the application level (e.g. in solr.xml, zoo.conf or maybe an
 : application level Tomcat Context.xml file).

 the thing to keep in mind is that most of the params you refered to are
 things you would not typically want in a deployed setup.  others are
 just ways of specifying defaults that are substituted into configs...

 :   java -Dbootstrap_confdir=./solr/collection1/conf

 you don't wnat this option for a normal setup, it's just for boostratping
 (hence it's only a system property).  in a production setup you would use
 the zookeeper tools to load the configs into your zk quorum.

 https://wiki.apache.org/solr/SolrCloud#Config_Startup_Bootstrap_Params
 ...vs...
 https://wiki.apache.org/solr/SolrCloud#Command_Line_Util

 :   -Dcollection.configName=myconf -DzkRun

 ditto for collection.configName -- it's only for boostraping

 zkRun is something you only use in trivial setups like the examples in the
 SolrCloud tutorial to run zookeeper embedded in Solr.  if you are running
 a production cluster where you want to be able to add/remove solr nodes on
 the fly, then you are going to want to set of specific machines running
 standalone zookeper.

 :   -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2

 zkHost can be specified in solr.xml (allthough i'm not sure why the
 example solr.xml doesn't include it, i'll update SOLR-4622 to address
 this), or it can be overridden by a system property.


 -Hoss




-- 
Web: http://www.eddgrant.com
Email: e...@eddgrant.com
Mobile: +44 (0) 7861 394 543


How can I set configuration options?

2013-04-09 Thread Edd Grant
Hi all,

I have been working through the examples on the SolrCloud page:
http://wiki.apache.org/solr/SolrCloud

I am now at the point where, rather than firing up Solr through start.jar,
I'm deploying the Solr war in to Tomcat instances. Taking the following
command as an example:

java -Dbootstrap_confdir=./solr/collection1/conf
-Dcollection.configName=myconf -DzkRun
-DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2
-jar start.jar

I can't figure out from the documentation how/ where I set the above
properties when deploying Solr as a war file. I initially thought these
might be configurable through solr.xml but can't find anything in the
documentation to support this.

Most grateful for any pointers here.

Cheers,

Edd
-- 
Web: http://www.eddgrant.com
Email: e...@eddgrant.com
Mobile: +44 (0) 7861 394 543


Re: How can I set configuration options?

2013-04-09 Thread Nate Fox
In Ubuntu, I've added it to /etc/default/tomcat7 in the JAVA_OPTS options.

For example, I have:
JAVA_OPTS=-Djava.awt.headless=true -Xmx2048m -XX:+UseConcMarkSweepGC
JAVA_OPTS=${JAVA_OPTS} -DnumShards=2 -Djetty.port=8080
-DzkHost=zookeeper01.dev.:2181 -Dboostrap_conf=true



--
Nate Fox
Sr Systems Engineer

o: 310.658.5775
m: 714.248.5350

Follow us @NEOGOV http://twitter.com/NEOGOV and on
Facebookhttp://www.facebook.com/neogov

NEOGOV http://www.neogov.com/ is among the top fastest growing software
companies in the USA, recognized by Inc 500|5000, Deloitte Fast 500, and
the LA Business Journal. We are hiring!http://www.neogov.com/#/company/careers



On Tue, Apr 9, 2013 at 8:55 AM, Edd Grant e...@eddgrant.com wrote:

 Hi all,

 I have been working through the examples on the SolrCloud page:
 http://wiki.apache.org/solr/SolrCloud

 I am now at the point where, rather than firing up Solr through start.jar,
 I'm deploying the Solr war in to Tomcat instances. Taking the following
 command as an example:

 java -Dbootstrap_confdir=./solr/collection1/conf
 -Dcollection.configName=myconf -DzkRun
 -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2
 -jar start.jar

 I can't figure out from the documentation how/ where I set the above
 properties when deploying Solr as a war file. I initially thought these
 might be configurable through solr.xml but can't find anything in the
 documentation to support this.

 Most grateful for any pointers here.

 Cheers,

 Edd
 --
 Web: http://www.eddgrant.com
 Email: e...@eddgrant.com
 Mobile: +44 (0) 7861 394 543



Re: How can I set configuration options?

2013-04-09 Thread Furkan KAMACI
Hi Edd;

The parameters you mentioned are JVM parameters. There are two ways to
define them.
First one is if you are using an IDE you can indicate them as JVM
parameters. i.e. if you are using Intellij IDEA when you click your
Run/Debug configurations there is a line called VM Options. You can write
your paramters without writing java word in front of them.

Second one is deploying your war file into Tomcat without using an IDE (I
think this is what you want). Here is what to do:

Go to tomcat home folder and under the bin folder create a file called
setenv.sh Then add that lines:

#!/bin/sh
#
#
export JAVA_OPTS=$JAVA_OPTS
-Dbootstrap_confdir=./solr/collection1/conf
-Dcollection.configName=myconf -DzkRun
-DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2



2013/4/9 Edd Grant e...@eddgrant.com

 Hi all,

 I have been working through the examples on the SolrCloud page:
 http://wiki.apache.org/solr/SolrCloud

 I am now at the point where, rather than firing up Solr through start.jar,
 I'm deploying the Solr war in to Tomcat instances. Taking the following
 command as an example:

 java -Dbootstrap_confdir=./solr/collection1/conf
 -Dcollection.configName=myconf -DzkRun
 -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2
 -jar start.jar

 I can't figure out from the documentation how/ where I set the above
 properties when deploying Solr as a war file. I initially thought these
 might be configurable through solr.xml but can't find anything in the
 documentation to support this.

 Most grateful for any pointers here.

 Cheers,

 Edd
 --
 Web: http://www.eddgrant.com
 Email: e...@eddgrant.com
 Mobile: +44 (0) 7861 394 543



Re: How can I set configuration options?

2013-04-09 Thread Edd Grant
Thanks for the replies. The problem I have is that setting them at the JVM
level would mean that all instances of Solr deployed in the Tomcat instance
are forced to use the same settings. I actually want to set the properties
at the application level (e.g. in solr.xml, zoo.conf or maybe an
application level Tomcat Context.xml file).

I'll grab the Solr source and see if there's any way to do this, unless
anyone knows how off the top of their head?

Cheers,

Edd


On 9 April 2013 19:21, Furkan KAMACI furkankam...@gmail.com wrote:

 Hi Edd;

 The parameters you mentioned are JVM parameters. There are two ways to
 define them.
 First one is if you are using an IDE you can indicate them as JVM
 parameters. i.e. if you are using Intellij IDEA when you click your
 Run/Debug configurations there is a line called VM Options. You can write
 your paramters without writing java word in front of them.

 Second one is deploying your war file into Tomcat without using an IDE (I
 think this is what you want). Here is what to do:

 Go to tomcat home folder and under the bin folder create a file called
 setenv.sh Then add that lines:

 #!/bin/sh
 #
 #
 export JAVA_OPTS=$JAVA_OPTS
 -Dbootstrap_confdir=./solr/collection1/conf
 -Dcollection.configName=myconf -DzkRun
 -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2



 2013/4/9 Edd Grant e...@eddgrant.com

  Hi all,
 
  I have been working through the examples on the SolrCloud page:
  http://wiki.apache.org/solr/SolrCloud
 
  I am now at the point where, rather than firing up Solr through
 start.jar,
  I'm deploying the Solr war in to Tomcat instances. Taking the following
  command as an example:
 
  java -Dbootstrap_confdir=./solr/collection1/conf
  -Dcollection.configName=myconf -DzkRun
  -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2
  -jar start.jar
 
  I can't figure out from the documentation how/ where I set the above
  properties when deploying Solr as a war file. I initially thought these
  might be configurable through solr.xml but can't find anything in the
  documentation to support this.
 
  Most grateful for any pointers here.
 
  Cheers,
 
  Edd
  --
  Web: http://www.eddgrant.com
  Email: e...@eddgrant.com
  Mobile: +44 (0) 7861 394 543
 




-- 
Web: http://www.eddgrant.com
Email: e...@eddgrant.com
Mobile: +44 (0) 7861 394 543


Re: How can I set configuration options?

2013-04-09 Thread Chris Hostetter
: Thanks for the replies. The problem I have is that setting them at the JVM
: level would mean that all instances of Solr deployed in the Tomcat instance
: are forced to use the same settings. I actually want to set the properties
: at the application level (e.g. in solr.xml, zoo.conf or maybe an
: application level Tomcat Context.xml file).

the thing to keep in mind is that most of the params you refered to are 
things you would not typically want in a deployed setup.  others are 
just ways of specifying defaults that are substituted into configs...

:   java -Dbootstrap_confdir=./solr/collection1/conf

you don't wnat this option for a normal setup, it's just for boostratping 
(hence it's only a system property).  in a production setup you would use 
the zookeeper tools to load the configs into your zk quorum.

https://wiki.apache.org/solr/SolrCloud#Config_Startup_Bootstrap_Params
...vs...
https://wiki.apache.org/solr/SolrCloud#Command_Line_Util

:   -Dcollection.configName=myconf -DzkRun

ditto for collection.configName -- it's only for boostraping

zkRun is something you only use in trivial setups like the examples in the 
SolrCloud tutorial to run zookeeper embedded in Solr.  if you are running 
a production cluster where you want to be able to add/remove solr nodes on 
the fly, then you are going to want to set of specific machines running 
standalone zookeper.

:   -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2

zkHost can be specified in solr.xml (allthough i'm not sure why the 
example solr.xml doesn't include it, i'll update SOLR-4622 to address 
this), or it can be overridden by a system property.


-Hoss