annotate doc/admin-manual/installation-artefact-server.tex @ 922:237f3a809aee

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

http://dive4elements.wald.intevation.org