source: vlo/trunk/DEPLOY-README.txt @ 6101

Last change on this file since 6101 was 6101, checked in by Twan Goosen, 9 years ago

renamed documentation files (added .txt extension)

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