comparison doc/admin-manual/installation-artefact-server.tex @ 921:fb1e051713cc

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

http://dive4elements.wald.intevation.org