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

Last change on this file since 31233 was 31233, checked in by davidb, 4 years ago

Changes to operate on nema as well as gsliscluster1 and gc0-9

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