annotate doc/admin-manual/installation-artifact-server.tex @ 1136:17c3770e6c63

Added corrections and wishes of the training on the installation which was given to the BSH. doc/trunk@1257 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 13 Aug 2010 09:15:20 +0000
parents 3b67f53ff57b
children
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
1136
17c3770e6c63 Added corrections and wishes of the training on the installation which was given to the BSH.
Tim Englich <tim.englich@intevation.de>
parents: 928
diff changeset
20 chown -r root:artifacts artifacts
926
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
21 chmod 770 artifacts
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
22 chmod g+s artifacts
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
23 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
24
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
25 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
26 Further information can be found there.
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
27
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
28 Integrate software of artifact-server into filesystem:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
29 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
30 cd /opt
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
31 tar xfvj /root/artifact-server-$VERSION.tar.bz2
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
32 ln -s artifact-server-$VERSION artifact-server
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
33 cd artifact-server
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
34 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
35
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
36 Setting the access rights:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
37 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
38 bin/setup.sh
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
39 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
40
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
41 Configure connection to database:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
42 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
43 cd /opt/artifact-server
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
44 vim conf/arcsdeconnectionpool.properties
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
45
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
46 # in conf/arcsdeconnectionpool.properties do:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
47 server=xyz.server.com
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
48 username=guest
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
49 credentials=XYZ
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
50 port=5151
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
51 database=esri_sde
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
52 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
53
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
54 Configure address for finding the WMS-Server:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
55 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
56 cd /opt/artifact-server/
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
57 vim conf/conf.xml
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
58 # adapt the address in the element
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
59 # artifact-database/gnv/mapserver/server. This is
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
60 # 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
61 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
62 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
63
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
64 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
65 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
66 configure a secret for signing artifacts.
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
67
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
68 {\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
69 are not valid anymore.}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
70
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
71 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
72 # generate a randomized string, e.g.
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
73 cd /opt/artifact-server/
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
74 pwgen -s 30
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
75 # populate the tag artifact-database/export-secret
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
76 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
77
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
78 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
79 (default:8181):
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
80 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
81 cd /opt/artifact-server
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
82 vim conf/conf.xml
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
83
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
84 # 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
85 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
86
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
87 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
88 \begin{lstlisting}
1136
17c3770e6c63 Added corrections and wishes of the training on the installation which was given to the BSH.
Tim Englich <tim.englich@intevation.de>
parents: 928
diff changeset
89 cp -i /opt/artifact-server/install/debian/artifact-server/artifact-server-init-scipt
17c3770e6c63 Added corrections and wishes of the training on the installation which was given to the BSH.
Tim Englich <tim.englich@intevation.de>
parents: 928
diff changeset
90 /etc/init.d/artifact-server
926
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
91 chmod +x /etc/init.d/artifact-server
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
92 update-rc.d artifact-server defaults
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
93 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
94
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
95 The server can be started and stopped via
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
96 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
97 /etc/init.d/artifact-server {start | stop}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
98 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
99
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
100 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
101 now.
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
102
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
103 \subsubsection*{Test of the Installation}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
104 \label{ref:artifact-server-testing}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
105 Start the server:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
106 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
107 /etc/init.d/artifact-server start
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
108 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
109
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
110 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
111 is running:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
112 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
113 jps
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
114
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
115 # Example with list of java processes:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
116 19252
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
117 19509 Jps
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
118 19441 App
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
119
1136
17c3770e6c63 Added corrections and wishes of the training on the installation which was given to the BSH.
Tim Englich <tim.englich@intevation.de>
parents: 928
diff changeset
120 cat /var/run/artifact-server.pid
926
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
121 \end{lstlisting}
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 Task: Compare the running process numbers.
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
124
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
125 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
126 \begin{lstlisting}
1136
17c3770e6c63 Added corrections and wishes of the training on the installation which was given to the BSH.
Tim Englich <tim.englich@intevation.de>
parents: 928
diff changeset
127 netstat -nltp | grep 8181
926
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
128
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
129 # Check for an entry like:
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
130 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
131 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
132
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
133 3. Artifact-Server ready for communication with client?
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
134 \begin{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
135 curl "http://localhost:8181/factories" | xmllint --format -
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
136 \end{lstlisting}
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
137
61db5d4fc754 Unified naming of artefact to artifact
Hans Plum <hans.plum@intevation.de>
parents:
diff changeset
138 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
139 systems (FIS)

http://dive4elements.wald.intevation.org