[30903] | 1 |
|
---|
[30914] | 2 | ----
|
---|
| 3 | Introduction
|
---|
| 4 | ----
|
---|
| 5 |
|
---|
[30913] | 6 | Vargrant provisioning files to spin up a modest Spark cluster (master
|
---|
[30914] | 7 | + 3 slaves + backup) for experiments in processing HTRC Extracted
|
---|
| 8 | Feature JSON files in parallel, suitable for ingesting into Solr.
|
---|
[30903] | 9 |
|
---|
[30905] | 10 |
|
---|
[30914] | 11 | *Assumptions*
|
---|
[30903] | 12 |
|
---|
[30914] | 13 | * You have VirtualBox and Vagrant installed
|
---|
| 14 | (at time of writing VirtualBox v5.0.28, Vagrant 1.8.6)
|
---|
| 15 |
|
---|
[30903] | 16 |
|
---|
[30914] | 17 | *Useful*
|
---|
[30913] | 18 |
|
---|
[30914] | 19 | * Installing the Vagrant VirutalBox Guest Additions plugin to stop warnings
|
---|
| 20 | about potentially incompatible versions:
|
---|
[30903] | 21 |
|
---|
[30914] | 22 | vagrant plugin install vagrant-vbguest
|
---|
[30904] | 23 |
|
---|
| 24 |
|
---|
[30914] | 25 | ----
|
---|
| 26 | Setup Procedure
|
---|
| 27 | ----
|
---|
[30913] | 28 |
|
---|
[30914] | 29 | This is a 2 step process:
|
---|
[30913] | 30 |
|
---|
[30914] | 31 | Step 1: Setting up the cluster
|
---|
| 32 | Step 2: Checking out the Java code to processing the JSON files
|
---|
[30913] | 33 |
|
---|
[30914] | 34 |
|
---|
| 35 | Step 1 is covered by this README file, ending with an svn checkout of
|
---|
| 36 | the Java code on the 'master' node that processes the JSON files. The
|
---|
| 37 | files checked out includes the README file covering Step 2.
|
---|
| 38 |
|
---|
| 39 | ----
|
---|
| 40 | Step 1
|
---|
| 41 | ----
|
---|
| 42 |
|
---|
| 43 | From within the directory this README.txt is located enter:
|
---|
| 44 |
|
---|
| 45 | vagrant up
|
---|
| 46 |
|
---|
| 47 | The first time this is run, there is a lot of downloading and setup to
|
---|
| 48 | do. Subsequent use of this command spins the cluster up much faster.
|
---|
| 49 |
|
---|
| 50 | Once the cluster is set up, you need to get the Spark framework up and
|
---|
| 51 | running, which in turn uses Hadoop's HDFS. You do this as the user
|
---|
| 52 | 'htrc' on the 'master' node:
|
---|
| 53 |
|
---|
| 54 | vagrant ssh master
|
---|
| 55 | sudo su - htrc
|
---|
| 56 |
|
---|
[30913] | 57 | If the first time, you need to format an HDFS area to use:
|
---|
[30914] | 58 |
|
---|
[30913] | 59 | hdfs namenode -format
|
---|
| 60 |
|
---|
| 61 | Otherwise start up HDFS and Spark deamon processes:
|
---|
| 62 |
|
---|
| 63 | start-dfs.sh
|
---|
| 64 | spark-start-all.sh
|
---|
| 65 |
|
---|
| 66 | You can visit the Spark cluster monitoring page at:
|
---|
| 67 |
|
---|
| 68 | http://10.10.0.52:8080/
|
---|
| 69 |
|
---|
[30905] | 70 | ----
|
---|
[30914] | 71 | Getting ready for Step 2
|
---|
[30905] | 72 | ----
|
---|
| 73 |
|
---|
[30914] | 74 | With the Spark cluster with HDFS up and running, you are now ready to
|
---|
| 75 | proceed to Step 2, running the JSON processing code.
|
---|
[30904] | 76 |
|
---|
| 77 |
|
---|
[30914] | 78 | There are a couple of packages the 'master' node needs for this ('svn'
|
---|
| 79 | and 'mvn'), which we install as the 'vagrant' user. Then we are in a
|
---|
| 80 | position to check out the Java code, which in turn includes the README
|
---|
| 81 | file for Step 2.
|
---|
[30904] | 82 |
|
---|
[30914] | 83 | Install subversion and maven as using the 'vagrant' user's sudo ability:
|
---|
[30904] | 84 |
|
---|
[30914] | 85 | vagrant ssh master
|
---|
| 86 | sudo apt-get install subversion
|
---|
| 87 | sudo apt-get install maven
|
---|
[30904] | 88 |
|
---|
[30914] | 89 | Now switch from the 'vagrant' user to 'htrc' and check out the Java code:
|
---|
[30904] | 90 |
|
---|
[30914] | 91 | sudo su - htrc
|
---|
[30905] | 92 |
|
---|
[30914] | 93 | svn co http://svn.greenstone.org/other-projects/hathitrust/solr-extracted-features/trunk solr-extracted-features
|
---|
| 94 |
|
---|
| 95 | Now follow the README file for Step 2:
|
---|
[30905] | 96 |
|
---|
[30914] | 97 | cd solr-extracted-features
|
---|
| 98 | less README.txt
|
---|
[30905] | 99 |
|
---|
| 100 | ----
|
---|
| 101 |
|
---|
| 102 |
|
---|
| 103 |
|
---|
| 104 |
|
---|
| 105 |
|
---|