Mercurial > dive4elements > gnv-client
annotate doc/admin-manual/installation-artifact-server.tex @ 1132:03c404871d50
ISSUE23: Documentation how to add a language
doc/trunk@1242 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 29 Jun 2010 10:28:51 +0000 |
parents | 3b67f53ff57b |
children | 17c3770e6c63 |
rev | line source |
---|---|
926
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
1 \subsection{Artifact-Server} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
2 The Artifact-Server contains the entire business logic of the system. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
3 The server provides a RESTful interface with a XML-based protocol to the |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
4 webclient. Technically the server is a standalone java process serving the |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
5 REST interface. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
6 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
7 \subsubsection*{Installation} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
8 \label{ref:artifact-server-install} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
9 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
10 Running the server with its own user\footnote{Remark: A group with the |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
11 same name is created automatically.}: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
12 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
13 adduser artifacts |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
14 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
15 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
16 Setup and configuring logging: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
17 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
18 cd /var/log |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
19 mkdir artifacts |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
20 chmod 770 artifacts |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
21 chmod g+s artifacts |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
22 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
23 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
24 The log level can be adjusted in the file \verb+ conf/log4j.properties+. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
25 Further information can be found there. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
26 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
27 Integrate software of artifact-server into filesystem: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
28 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
29 cd /opt |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
30 tar xfvj /root/artifact-server-$VERSION.tar.bz2 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
31 ln -s artifact-server-$VERSION artifact-server |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
32 cd artifact-server |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
33 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
34 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
35 Setting the access rights: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
36 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
37 bin/setup.sh |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
38 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
39 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
40 Configure connection to database: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
41 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
42 cd /opt/artifact-server |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
43 vim conf/arcsdeconnectionpool.properties |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
44 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
45 # in conf/arcsdeconnectionpool.properties do: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
46 server=xyz.server.com |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
47 username=guest |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
48 credentials=XYZ |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
49 port=5151 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
50 database=esri_sde |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
51 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
52 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
53 Configure address for finding the WMS-Server: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
54 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
55 cd /opt/artifact-server/ |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
56 vim conf/conf.xml |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
57 # adapt the address in the element |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
58 # artifact-database/gnv/mapserver/server. This is |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
59 # the string the server uses to provide an address of the mapserver to enduser. |
928
3b67f53ff57b
Adapted name of gnv-wrapper to clearify function
Hans Plum <hans.plum@intevation.de>
parents:
926
diff
changeset
|
60 e.g. http://SERVER/cgi-bin/gnv-wms |
926
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
61 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
62 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
63 The artifact server can export and import projects of the user's |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
64 parameterizations. In order to protect the server against invalid files, |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
65 configure a secret for signing artifacts. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
66 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
67 {\em Hint: If the secret is changed, all files that were created before |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
68 are not valid anymore.} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
69 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
70 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
71 # generate a randomized string, e.g. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
72 cd /opt/artifact-server/ |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
73 pwgen -s 30 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
74 # populate the tag artifact-database/export-secret |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
75 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
76 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
77 Adapt TCP-port of artifact-server, if the default has to be changed |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
78 (default:8181): |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
79 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
80 cd /opt/artifact-server |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
81 vim conf/conf.xml |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
82 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
83 # in conf/conf.xml edit the element artifact-database/rest-server/port |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
84 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
85 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
86 Integrate artifact-server in startup-process of operating system: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
87 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
88 cp -i /opt/artifact-server/bin/debian/artifact-server /etc/init.d/ |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
89 chmod +x /etc/init.d/artifact-server |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
90 update-rc.d artifact-server defaults |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
91 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
92 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
93 The server can be started and stopped via |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
94 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
95 /etc/init.d/artifact-server {start | stop} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
96 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
97 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
98 The installation of the artifact-server is finished. It can be tested |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
99 now. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
100 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
101 \subsubsection*{Test of the Installation} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
102 \label{ref:artifact-server-testing} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
103 Start the server: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
104 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
105 /etc/init.d/artifact-server start |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
106 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
107 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
108 1. Operating System: Check if the process of the server called "App" |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
109 is running: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
110 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
111 jps |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
112 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
113 # Example with list of java processes: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
114 19252 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
115 19509 Jps |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
116 19441 App |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
117 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
118 cat /var/run/artifact-server |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
119 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
120 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
121 Task: Compare the running process numbers. |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
122 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
123 2. Network: Check if the artifact-server opens a TCP-port (default: 8181) |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
124 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
125 netstat -nltp |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
126 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
127 # Check for an entry like: |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
128 tcp 0 0 127.0.0.1:8181 0.0.0.0:* LISTEN 18648/java |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
129 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
130 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
131 3. Artifact-Server ready for communication with client? |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
132 \begin{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
133 curl "http://localhost:8181/factories" | xmllint --format - |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
134 \end{lstlisting} |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
135 |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
136 Task: Check for a XML-document describing possible expert information |
61db5d4fc754
Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff
changeset
|
137 systems (FIS) |