1 | |
---|
2 | 0. What the VLO is about |
---|
3 | |
---|
4 | The VLO application allows faceted browsing of meta data. Before |
---|
5 | browsing the data by using the VLO web application, the application |
---|
6 | needs to be deployed and the VLO importer needs to add meta data to |
---|
7 | the database. |
---|
8 | |
---|
9 | 1. The archive |
---|
10 | |
---|
11 | The VLO importer and web application are contained in an |
---|
12 | archive named like |
---|
13 | |
---|
14 | vlo_parent-2.13-Distribution.tar.gz |
---|
15 | |
---|
16 | Deploying the VLO application means: |
---|
17 | - unpacking the archive in a suitable location |
---|
18 | - unpacking the war files contained in the archive |
---|
19 | - adapt the application's context files |
---|
20 | and |
---|
21 | - adapt the main configuration file. |
---|
22 | |
---|
23 | 2. Archive unpacking |
---|
24 | |
---|
25 | Unpack the archive in directory x, |
---|
26 | for example: /var/lib/tomcat6/webapps/vlodist/ |
---|
27 | cd x |
---|
28 | With tar -xvf vlo_parent-2.13-Distribution.tar.gz |
---|
29 | vlo_parent-2.13 will be created. |
---|
30 | Take y to be vlo_parent-2.13 |
---|
31 | |
---|
32 | Make the server's Tomcat user own the files unpacked. |
---|
33 | |
---|
34 | 3. Solr server installation |
---|
35 | |
---|
36 | The VLO importer and web application use Solr as their database |
---|
37 | server. |
---|
38 | |
---|
39 | Unpack x/y/war/solr/solr.war in a directory in which you want the Solr |
---|
40 | server to reside, say z, |
---|
41 | /var/lib/tomcat6/webapps/vlodist/vlo_parent-2.13/war/solr |
---|
42 | cd z |
---|
43 | unzip x/y/war/solr/vlo_solr.war |
---|
44 | |
---|
45 | Make the Tomcat user owner of the files in the tree that starts in |
---|
46 | the z directory. |
---|
47 | |
---|
48 | In the z directory, modify META-INF/context.xml |
---|
49 | Assign the desired context path value, for example: vlo_solr/ |
---|
50 | This means that if url is the url of the web server, the Solr |
---|
51 | server will be reachable at url/vlo_solr/ |
---|
52 | |
---|
53 | Assign x/y/config/solr to the solr/home parameter. |
---|
54 | |
---|
55 | Copy the META-INF/context.xml file to |
---|
56 | /var/lib/tomcat6/conf/Catalina/localhost/vlo_solr.xml |
---|
57 | or to a directory equivalent to it. |
---|
58 | If necessary, make the Tomcat user owner of the vlo_solr.xml file. |
---|
59 | |
---|
60 | Create a link for the Tomcat server so that it knows where to look |
---|
61 | for the solr server installation: |
---|
62 | ln -sf x/y/war/solr/ /var/lib/tomcat6/webapps/vlo_solr |
---|
63 | or equivalent. |
---|
64 | The link created should identify the path defined the context file, |
---|
65 | vlo_solr in this case. |
---|
66 | |
---|
67 | If necessary, change the ownership of the link to the Tomcat user. |
---|
68 | |
---|
69 | Please modify WEB-INF/classes/log4j.properties |
---|
70 | |
---|
71 | if you would like logging configured different from the type of |
---|
72 | logging packaged. |
---|
73 | |
---|
74 | Restart tomcat: |
---|
75 | /etc/init.d/tomcat6 restart |
---|
76 | |
---|
77 | Inspect the Tomcat log file directory, inspect the solr.log file. |
---|
78 | |
---|
79 | 4. Web application installation |
---|
80 | |
---|
81 | Similar to the solr archive, unpack x/y/war/vlo.war in a directory |
---|
82 | in which you want the vlo web application to reside, say z, x/y/vlo |
---|
83 | itself. |
---|
84 | |
---|
85 | cd z |
---|
86 | unzip x/y/war/solr/vlo.war |
---|
87 | |
---|
88 | Make the Tomcat own the files in and below the z directory. |
---|
89 | |
---|
90 | Modify META-INF/context.xml |
---|
91 | Assign the desired context path value, for example: vlo/ |
---|
92 | If url is the url of the web server, the vlo web application will be |
---|
93 | reachable at url/vlo/ |
---|
94 | |
---|
95 | Because the packaged configuration is suitable to very specific |
---|
96 | (development) circumstances only, in most cases it does fit the |
---|
97 | production environment. You can specify an alternative, external |
---|
98 | configuration file, preferably the same file as the one used by |
---|
99 | the importer. |
---|
100 | |
---|
101 | Most likely, you will need to assign another value to the solrUrl |
---|
102 | parameter. This parameter is used to let the VLO web application |
---|
103 | know where it can reach the Solr server. You can set the value of |
---|
104 | this parameter in an external configuration file, or directly in |
---|
105 | the context file. |
---|
106 | |
---|
107 | Copy the META-INF/context.xml context file to |
---|
108 | /var/lib/tomcat6/conf/Catalina/localhost/vlo.xml |
---|
109 | |
---|
110 | Create a link for the Tomcat server so that it knows where to look |
---|
111 | for the vlo web application installation: |
---|
112 | ln -sf x/y/war/vlo/ /var/lib/tomcat6/webapps/vlo |
---|
113 | Like in the case of the Solr server, the link created should |
---|
114 | identify the path defined the context file. |
---|
115 | |
---|
116 | Again, if necessary, change the ownership of the context file and |
---|
117 | the link to the Tomcat user. |
---|
118 | |
---|
119 | Like in the case of the Solr server, you can change the web |
---|
120 | application's way of logging. This time, modifications should be |
---|
121 | applied to WEB-INF/classes/log4j.properties |
---|
122 | |
---|
123 | Restart the Tomcat server: |
---|
124 | |
---|
125 | /etc/init.d/tomcat6 restart |
---|
126 | |
---|
127 | or equivalent. This will cause the new Solr server and vlo web |
---|
128 | application to become active. |
---|
129 | |
---|
130 | Finally, inspect the Tomcat log file directory, and inspect the |
---|
131 | vlo.log file. |
---|
132 | |
---|
133 | 5. Importer configuration |
---|
134 | |
---|
135 | Both the web application and the importer should use one and the same |
---|
136 | configuration file. So if, for example, the web application's configuration |
---|
137 | is in |
---|
138 | |
---|
139 | path/VloConfig.xml, add |
---|
140 | |
---|
141 | -c path/VloConfig.xml |
---|
142 | |
---|
143 | to the command in the importer script. |
---|
144 | |
---|
145 | Most likely, the dataRoot values need to be changed. This is what a |
---|
146 | dataRoot definition could look like: |
---|
147 | |
---|
148 | <DataRoot> |
---|
149 | <originName>IPROSLA</originName> |
---|
150 | <rootFile>/lat/apache/htdocs/static-data-for-vlo-importer/</rootFile> |
---|
151 | <prefix>http://catalog.clarin.eu/</prefix> |
---|
152 | <tostrip>/lat/apache/htdocs/</tostrip> |
---|
153 | <deleteFirst>false</deleteFirst> |
---|
154 | </DataRoot> |
---|
155 | |
---|
156 | A dataRoot describes the meta data files. The toStrip part of the |
---|
157 | description is left out of the rootFile part to create a link to the |
---|
158 | meta data; the links starts with the prefix. |
---|
159 | |
---|
160 | Apart from the dataRoot values, the solrUrl parameter might need to be |
---|
161 | changed. Please note that the context path value defined in |
---|
162 | |
---|
163 | /var/lib/tomcat6/conf/Catalina/localhost/vlo_solr.xml |
---|
164 | |
---|
165 | or in a file equivalent to this one, should be reflected in the value |
---|
166 | of this parameter. |
---|
167 | |
---|
168 | Whenever the definition of the database changes, it is recommended |
---|
169 | to clear the database before starting an importer run. To do this, |
---|
170 | make sure that the 'deletaAllFirst' parameter equals true before |
---|
171 | the run. After that, the original value of the parameter could be |
---|
172 | restored. |
---|
173 | |
---|
174 | 6. Importing data |
---|
175 | |
---|
176 | You can run the importer by starting the |
---|
177 | |
---|
178 | ./vlo_solr_importer.sh |
---|
179 | |
---|
180 | script in the x/y/bin directory. Messages are logged to the |
---|
181 | console. Because meta data is not static, it is recommended to run |
---|
182 | the importer a couple of times a week. Please note that, given the |
---|
183 | current (04.2013) set of data, a run could take more than four |
---|
184 | hours. |
---|
185 | |
---|
186 | |
---|
187 | |
---|
188 | |
---|