1 | The instructions below describe the installation of the applications necessary |
---|
2 | for browsing: the VLO web application, the Solr server, and the meta data |
---|
3 | importer. |
---|
4 | |
---|
5 | 1. The archive |
---|
6 | |
---|
7 | The VLO importer and web application are contained in an |
---|
8 | archive. In the case of version 3.0, the archive is named |
---|
9 | |
---|
10 | vlo-3.0-Distribution.tar.gz |
---|
11 | |
---|
12 | Deploying the VLO application means: |
---|
13 | - unpacking the archive in a suitable location |
---|
14 | - unpacking the war files contained in the archive |
---|
15 | - adapt the application's context files |
---|
16 | and |
---|
17 | - adapt the VloConfig.xml main configuration file. |
---|
18 | - optionally executing upgrade steps described in the UPGRADE file |
---|
19 | |
---|
20 | 2. Archive unpacking |
---|
21 | |
---|
22 | Unpack the archive, for example |
---|
23 | |
---|
24 | vlo-3.0-Distribution.tar.gz |
---|
25 | |
---|
26 | in a temporary directory: 'temp'. Next, stop the Tomcat server: |
---|
27 | |
---|
28 | /etc/init.d/tomcat6 stop |
---|
29 | |
---|
30 | After the server has stopped, copy the contents of the vlo_parent-2.13 |
---|
31 | directory just created to a permanent directory, 'vlo', for example. In the |
---|
32 | tree starting in vlo, the configuration of the application is stored. Also, |
---|
33 | from the |
---|
34 | |
---|
35 | vlo/bin |
---|
36 | |
---|
37 | directory, you can run the importer application. Since this application |
---|
38 | relies on the Solr server, we first need to install the Solr web application. |
---|
39 | |
---|
40 | Recursively assign ownership of the entire unpacked distribution to the appropriate |
---|
41 | user (i.e. 'vlouser' on catalog.clarin.eu). |
---|
42 | |
---|
43 | 3. Solr server installation |
---|
44 | |
---|
45 | The VLO importer and web application use Solr as their database |
---|
46 | server. To install this server, assuming that the Tomcat server |
---|
47 | has not started yet, copy the Solr server web application archive |
---|
48 | to the Tomcat server web application directory. This could for |
---|
49 | example be |
---|
50 | |
---|
51 | /var/lib/tomcat6/webapps |
---|
52 | |
---|
53 | Step into this directory, lets call it 'apps', |
---|
54 | |
---|
55 | cd apps |
---|
56 | cp temp/vlo-3.0/war/vlo-solr-3.0.war . |
---|
57 | |
---|
58 | If it does not exist, create the vlo_solr directory, and unpack the web |
---|
59 | application archive in it: |
---|
60 | |
---|
61 | cd vlo_solr |
---|
62 | unzip ../vlo-solr-3.0.war |
---|
63 | |
---|
64 | After unzipping, remove the vlo-solr-3.0.war file. Next, if necessary, |
---|
65 | modify the solr/home parameter in the |
---|
66 | |
---|
67 | apps/META-INF/context.xml |
---|
68 | |
---|
69 | file to the path where the solr server finds its configuration and stores |
---|
70 | its data: |
---|
71 | |
---|
72 | vlo/config/solr |
---|
73 | |
---|
74 | Solr needs a location to store its index data. This needs to be configured |
---|
75 | through a Java system property 'solr.data.dir'. Configure this in your |
---|
76 | Tomcat instance, for example by adding the following to |
---|
77 | ${catalina.home}/bin/setenv.sh: |
---|
78 | |
---|
79 | export JAVA_OPTS="$JAVA_OPTS -Dsolr.data.dir=/var/vlo/solr/data" |
---|
80 | |
---|
81 | The directory does not have to exist, but its parent does and the Tomcat |
---|
82 | user needs write access in that location. |
---|
83 | |
---|
84 | Copy the new context.xml file to the Tomcat configuration: |
---|
85 | |
---|
86 | cp apps/META-INF/context.xml \ |
---|
87 | $CATALINA_HOME/conf/Catalina/localhost/vlo_solr.xml |
---|
88 | |
---|
89 | If you would like logging to be configured different from the type of |
---|
90 | logging packaged, please modify |
---|
91 | |
---|
92 | apps/WEB-INF/classes/log4j.properties |
---|
93 | |
---|
94 | If necessary, change the ownership of the files in the tree starting in |
---|
95 | |
---|
96 | vlo/config/solr |
---|
97 | |
---|
98 | to that of the Tomcat user. This will enable the Solr server can store data |
---|
99 | in it. Now the Solr server has been installed, the importer and web |
---|
100 | application could use it. Next we will install the VLO web application. |
---|
101 | |
---|
102 | 4. Web application installation |
---|
103 | |
---|
104 | Similar to the Solr archive, unpack |
---|
105 | |
---|
106 | temp/vlo-3.0/war/vlo-web-app-3.0.war in |
---|
107 | |
---|
108 | the |
---|
109 | |
---|
110 | apps/vlo |
---|
111 | |
---|
112 | directory. |
---|
113 | |
---|
114 | Because the packaged configuration is suitable to very specific (development) |
---|
115 | circumstances only, in most cases it does fit the production environment. You |
---|
116 | can specify an alternative, external configuration file, preferably the same |
---|
117 | file as the one used by the importer (see 5). Please modify |
---|
118 | |
---|
119 | apps/META-INF/context.xml |
---|
120 | |
---|
121 | by adding a reference to an external configuration file. By modifying this |
---|
122 | file, you can adapt the VLO configuration to your needs. You might, for |
---|
123 | example, need to assign another value to the solrUrl parameter also. This |
---|
124 | parameter is used to let the VLO web application know where it can reach the |
---|
125 | Solr server. |
---|
126 | |
---|
127 | Instead of changing the value of the solrUrl parameter in the external |
---|
128 | configuration file, you could also supply an alternative value by adding |
---|
129 | the parameter to |
---|
130 | |
---|
131 | apps/META-INF/context.xml |
---|
132 | |
---|
133 | directly. The comments in this file will tell you how to add the parameter. |
---|
134 | |
---|
135 | Like in the case of the Solr server, copy the apps/META-INF/context.xml |
---|
136 | context file to: |
---|
137 | |
---|
138 | /var/lib/tomcat6/conf/Catalina/localhost/vlo.xml |
---|
139 | |
---|
140 | or to another, comparable path. |
---|
141 | |
---|
142 | If you like, you can change the web application's way of logging. This time, |
---|
143 | modifications should be applied to: |
---|
144 | |
---|
145 | apps/WEB-INF/classes/log4j.properties |
---|
146 | |
---|
147 | Now the web application has been installed and configured, we only need to |
---|
148 | have a look at the VLO importer's configuration. |
---|
149 | |
---|
150 | 5. Importer configuration |
---|
151 | |
---|
152 | As mentioned in the description of the web application installation, a |
---|
153 | typical setup needs an external configuration file. For consistency reasons |
---|
154 | both the web application and application that imports data into the Solr |
---|
155 | data base should use one and the same configuration file. So if, for example, |
---|
156 | the web application's configuration is in |
---|
157 | |
---|
158 | $VLO_CONFIG/VloConfig.xml, use |
---|
159 | |
---|
160 | ./vlo_solr_importer.sh $VLO_CONFIG/VloConfig.xml |
---|
161 | |
---|
162 | to run the importer in 'bin'. A default configuration file is supplied as |
---|
163 | 'config/VloConfig.xml'. The importer script will default to this location |
---|
164 | if no location is specified on the command line. |
---|
165 | |
---|
166 | Most likely, in the configuration file, the dataRoot values need to be |
---|
167 | changed. This is what a dataRoot definition could look like: |
---|
168 | |
---|
169 | <originName>MPI self harvest</originName> |
---|
170 | <rootFile>/var/www/vlomd/self/</rootFile> |
---|
171 | <prefix>http://m12404423/vlomd/</prefix> |
---|
172 | <tostrip>/var/www/vlomd/</tostrip> |
---|
173 | <deleteFirst>false</deleteFirst> |
---|
174 | </DataRoot> |
---|
175 | |
---|
176 | A dataRoot element describes the meta data files. The toStrip part of the |
---|
177 | description is left out of the rootFile part to create a http link to the |
---|
178 | meta data; the links starts with the prefix. |
---|
179 | |
---|
180 | Apart from the dataRoot values, the solrUrl parameter might need to be |
---|
181 | changed. Please note that the context path value defined in |
---|
182 | |
---|
183 | $CATALINA_HOME/conf/Catalina/localhost/vlo_solr.xml |
---|
184 | |
---|
185 | or in a file equivalent to this one, should be reflected in the value of |
---|
186 | this parameter. |
---|
187 | |
---|
188 | Whenever the definition of the database changes, it is recommended to clear |
---|
189 | the database before starting an importer run. To do this, make sure that the |
---|
190 | 'deletaAllFirst' parameter equals true before the run. After that, the |
---|
191 | original value of the parameter could be restored. |
---|
192 | |
---|
193 | 6. Importing data |
---|
194 | |
---|
195 | Before starting data import, first start the Tomcat server: |
---|
196 | |
---|
197 | /etc/init.d/tomcat6 start |
---|
198 | |
---|
199 | To be sure the Solr server is working as it should, inspect the Tomcat log |
---|
200 | file directory, and in that directory, check the solr.log and vlo.log files. |
---|
201 | |
---|
202 | Next, you can run the importer by starting the |
---|
203 | |
---|
204 | ./vlo_solr_importer.sh |
---|
205 | |
---|
206 | script in the vlo/bin directory. Messages are logged to the console. Because |
---|
207 | meta data is not static, it is recommended to run the importer a couple of |
---|
208 | times a week. Please note that, given the current (04.2014) set of data, a |
---|
209 | run typically takes between two and four hours. |
---|