source: other-projects/hathitrust/wcsa/extracted-features-solr/trunk/gslis-cluster/SETUP.bash@ 31098

Last change on this file since 31098 was 31098, checked in by davidb, 6 years ago

Changes resulting from test runs to get Zookeeper and Solr running on gsliscluster1

File size: 2.0 KB
Line 
1
2
3#export SPARK_MASTER_HOST=gchead
4export SPARK_MASTER_HOST=192.168.64.1
5
6export SPARK_MASTER_URL=spark://$SPARK_MASTER_HOST:7077
7export SPARK_SLAVE_HOSTS="gc0 gc1 gc2 gc3 gc4 gc5 gc6 gc7 gc8 gc9"
8
9export ZOOKEEPER_SERVER=gchead:8181
10export SOLR_NODES="gc0:8983 gc1:8983 gc2:8983 gc3:8983 gc4:8983 gc5:8983 gc6:8983 gc7:8983 gc8:8983 gc9:8983"
11
12export HTRC_EF_PACKAGE_HOME=`pwd`
13
14echo ""
15echo "****"
16
17export JAVA_HOME="$HTRC_EF_PACKAGE_HOME/jdk1.8.0"
18export PATH="$JAVA_HOME/bin:$PATH"
19#export _JAVA_OPTIONS="-Xmx512m"
20#export _JAVA_OPTIONS="-Xmx1024m"
21#export _JAVA_OPTIONS="-Xmx2048m"
22export _JAVA_OPTIONS=
23#export _JAVA_OPTIONS="-XX:+HeapDumpOnOutOfMemoryError"
24
25echo "* Added in JDK 1.8 into PATH"
26
27source SETUP/setup-spark.bash
28
29source SETUP/setup-zookeeper.bash
30source SETUP/setup-solr.bash
31
32
33export PATH="$HTRC_EF_PACKAGE_HOME/SCRIPTS:$PATH"
34echo "* Added in HTRC EF PACKAGE remote scripting into PATH"
35
36spark_conf_slaves="$SPARK_HOME/conf/slaves"
37if [ ! -f "$spark_conf_slaves" ] ; then
38 echo "****"
39 echo "* Populatig $spark_conf_slaves"
40 echo "* With: $SPARK_SLAVE_HOSTS"
41 echo "****"
42 for s in $SPARK_SLAVE_HOSTS ; do
43 echo $s >> "$spark_conf_slaves"
44 done
45else
46 slaves=`cat "$spark_conf_slaves" | tr '\n' ' '`
47 echo "****"
48 echo "* Solr slaves: $slaves"
49 echo "****"
50fi
51
52
53zookeeper_config_file="$ZOOKEEPER_HOME/conf/zoo.cfg"
54zookeeper_data_dir="$ZOOKEEPER_HOME/data"
55
56if [ ! -f "$zookeeper_config_file" ] ; then
57 echo "****"
58 echo "* Generating $zookeeper_config_file"
59 cat CONF/zoo.cfg.in | sed "s%@zookeeper-data-dir@%$zookeeper_data_dir%g" > "$zookeeper_config_file"
60
61 if [ ! -d "$zookeeper_data_dir" ] ; then
62 echo "* Creating Zookeeper dataDir:"
63 echo "* $zookeeper_data_dir"
64 mkdir "$zookeeper_data_dir"
65 fi
66 echo "****"
67fi
68
69solr_configsets="$SOLR_TOP_LEVEL_HOME/server/solr/configsets"
70if [ ! -d "$solr_configsets/htrc_configs" ] ; then
71 echo "Untarring htrc_configs.tar.gz in Solr configtests directory"
72 tar xvzf CONF/htrc_configs.tar.gz -C "$solr_configsets"
73fi
Note: See TracBrowser for help on using the repository browser.