view doc/admin-manual/installation-artefact-server.tex @ 923:95b48f7d0acf

Added a specialized Makefile doc/trunk@1060 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Hans Plum <hans.plum@intevation.de>
date Thu, 06 May 2010 05:57:12 +0000
parents 237f3a809aee
children 9d94bf77e442
line wrap: on
line source
\subsection{Artifact-Server}
The Artifact-Server contains the entire business logic of the system.
The server provides a RESTful interface with a XML-based protocol to the
webclient. Technically the server is a standalone java process serving the
REST interface.

\subsubsection*{Installation}
\label{ref:artifact-server-install}

Running the server with its own user\footnote{Remark: A group with the
same name is created automatically.}: 
\begin{lstlisting}
  adduser artifacts
\end{lstlisting}

Setup and configuring logging:
\begin{lstlisting}
  cd /var/log
  mkdir artifacts
  chmod 770 artifacts
  chmod g+s artifacts
\end{lstlisting}

The log level can be adjusted in the file \verb+ conf/log4j.properties+.
Further information can be found there.

Integrate software of artifact-server into filesystem:
\begin{lstlisting}
  cd /opt
  tar xfvj /root/artifact-server-$VERSION.tar.bz2
  ln -s artifact-server-$VERSION artifact-server
  cd artifact-server
\end{lstlisting}

Setting the access rights:
\begin{lstlisting}
   bin/setup.sh
\end{lstlisting}

Configure connection to database:
\begin{lstlisting}
  cd /opt/artefact-server
  vim conf/arcsdeconnectionpool.properties
  
  # in conf/arcsdeconnectionpool.properties do:
  server=xyz.server.com
  username=guest
  credentials=XYZ
  port=5151
  database=esri_sde
\end{lstlisting}

Configure address for finding the WMS-Server:
\begin{lstlisting}
  cd /opt/artefact-server/
  vim conf/conf.xml
  # adapt the address in the element
  # artifact-database/gnv/mapserver/server. This is
  # the string the server uses to provide an address of the mapserver to enduser.
  e.g. http://SERVER/cgi-bin/gnv-wrapper
\end{lstlisting}

The artifact server can export and import projects of the user's
parameterizations. In order to protect the server against invalid files,
configure a secret for signing artifacts.

{\em Hint: If the secret is changed, all files that were created before
are not valid anymore.}

\begin{lstlisting}
  # generate a randomized string, e.g.
  cd /opt/artefact-server/
  pwgen -s 30
  # populate the tag artifact-database/export-secret
\end{lstlisting}

Adapt TCP-port of artefact-server, if the default has to be changed
(default:8181):
\begin{lstlisting}
  cd /opt/artefact-server
  vim conf/conf.xml
  
  # in conf/conf.xml edit the element artifact-database/rest-server/port
\end{lstlisting}

Integrate artifact-server in startup-process of operating system:
\begin{lstlisting}
  cp -i /opt/artefact-server/bin/debian/artifact-server /etc/init.d/
  chmod +x /etc/init.d/artifact-server
  update-rc.d artifact-server defaults
\end{lstlisting}

The server can be started and stopped via
\begin{lstlisting}
  /etc/init.d/artifact-server {start | stop}
\end{lstlisting}

The installation of the artifact-server is finished. It can be tested
now.

\subsubsection*{Test of the Installation}
\label{ref:artifact-server-testing}
  Start the server:
  \begin{lstlisting}
  /etc/init.d/artefact-server start
  \end{lstlisting}
  
  1. Operating System: Check if the process of the server called "App"
  is running:
  \begin{lstlisting}
  jps
  
  # Example with list of java processes:
  19252
  19509 Jps
  19441 App

  cat /var/run/artefact-server
  \end{lstlisting}

  Task: Compare the running process numbers.

  2. Network: Check if the artefact-server opens a TCP-port (default: 8181)
  \begin{lstlisting}
  netstat -nltp
  
  # Check for an entry like:
  tcp        0      0 127.0.0.1:8181          0.0.0.0:*  LISTEN 18648/java
  \end{lstlisting}

  3. Artefact-Server ready for communication with client?
  \begin{lstlisting}
  wget -qO- http://localhost:8181/factories
  \end{lstlisting}
  
  Task: Check for a XML-document describing possible expert information
  systems (FIS)

http://dive4elements.wald.intevation.org