hans@901: \subsection{Artifact-Server} hans@921: The Artifact-Server contains the entire business logic of the system. hans@921: The server provides a RESTful interface with a XML-based protocol to the hans@921: webclient. Technically the server is a standalone java process serving the hans@921: REST interface. hans@901: hans@901: \subsubsection*{Installation} hans@921: \label{ref:artifact-server-install} hans@901: hans@921: Running the server with its own user\footnote{Remark: A group with the hans@921: same name is created automatically.}: hans@921: \begin{lstlisting} hans@921: adduser artifacts hans@921: \end{lstlisting} hans@921: hans@921: Setup and configuring logging: hans@901: \begin{lstlisting} hans@901: cd /var/log hans@901: mkdir artifacts hans@901: chmod 770 artifacts hans@901: chmod g+s artifacts hans@901: \end{lstlisting} hans@901: hans@921: The log level can be adjusted in the file \verb+ conf/log4j.properties+. hans@921: Further information can be found there. hans@921: hans@921: Integrate software of artifact-server into filesystem: hans@921: \begin{lstlisting} hans@901: cd /opt hans@921: tar xfvj /root/artifact-server-$VERSION.tar.bz2 hans@921: ln -s artifact-server-$VERSION artifact-server hans@901: cd artifact-server hans@921: \end{lstlisting} hans@901: hans@921: Setting the access rights: hans@921: \begin{lstlisting} hans@901: bin/setup.sh hans@921: \end{lstlisting} hans@901: hans@921: Configure connection to database: hans@921: \begin{lstlisting} hans@901: cd /opt/artefact-server hans@901: vim conf/arcsdeconnectionpool.properties hans@901: hans@921: # in conf/arcsdeconnectionpool.properties do: hans@901: server=xyz.server.com hans@901: username=guest hans@901: credentials=XYZ hans@901: port=5151 hans@901: database=esri_sde hans@921: \end{lstlisting} hans@901: hans@921: Configure address for finding the WMS-Server: hans@921: \begin{lstlisting} hans@921: cd /opt/artefact-server/ hans@921: vim conf/conf.xml hans@921: # adapt the address in the element hans@921: # artifact-database/gnv/mapserver/server. This is hans@921: # the string the server uses to provide an address of the mapserver to enduser. hans@921: e.g. http://SERVER/cgi-bin/gnv-wrapper hans@921: \end{lstlisting} hans@902: hans@921: The artifact server can export and import projects of the user's hans@921: parameterizations. In order to protect the server against invalid files, hans@921: configure a secret for signing artifacts. hans@901: hans@921: {\em Hint: If the secret is changed, all files that were created before hans@921: are not valid anymore.} hans@921: hans@921: \begin{lstlisting} hans@921: # generate a randomized string, e.g. hans@921: cd /opt/artefact-server/ hans@921: pwgen -s 30 hans@921: # populate the tag artifact-database/export-secret hans@921: \end{lstlisting} hans@921: hans@921: Adapt TCP-port of artefact-server, if the default has to be changed hans@921: (default:8181): hans@921: \begin{lstlisting} hans@901: cd /opt/artefact-server hans@901: vim conf/conf.xml hans@901: hans@921: # in conf/conf.xml edit the element artifact-database/rest-server/port hans@921: \end{lstlisting} hans@901: hans@921: Integrate artifact-server in startup-process of operating system: hans@921: \begin{lstlisting} hans@921: cp -i /opt/artefact-server/bin/debian/artifact-server /etc/init.d/ hans@921: chmod +x /etc/init.d/artifact-server hans@901: update-rc.d artifact-server defaults hans@921: \end{lstlisting} hans@901: hans@921: The server can be started and stopped via hans@921: \begin{lstlisting} hans@921: /etc/init.d/artifact-server {start | stop} hans@921: \end{lstlisting} hans@901: hans@921: The installation of the artifact-server is finished. It can be tested hans@901: now. hans@901: hans@901: \subsubsection*{Test of the Installation} hans@921: \label{ref:artifact-server-testing} hans@901: Start the server: hans@921: \begin{lstlisting} hans@901: /etc/init.d/artefact-server start hans@921: \end{lstlisting} hans@901: hans@921: 1. Operating System: Check if the process of the server called "App" hans@921: is running: hans@921: \begin{lstlisting} hans@921: jps hans@901: hans@921: # Example with list of java processes: hans@901: 19252 hans@901: 19509 Jps hans@901: 19441 App hans@921: hans@921: cat /var/run/artefact-server hans@901: \end{lstlisting} hans@901: hans@921: Task: Compare the running process numbers. hans@901: hans@901: 2. Network: Check if the artefact-server opens a TCP-port (default: 8181) hans@921: \begin{lstlisting} hans@901: netstat -nltp hans@901: hans@921: # Check for an entry like: hans@921: tcp 0 0 127.0.0.1:8181 0.0.0.0:* LISTEN 18648/java hans@921: \end{lstlisting} hans@901: hans@921: 3. Artefact-Server ready for communication with client? hans@921: \begin{lstlisting} hans@901: wget -qO- http://localhost:8181/factories hans@921: \end{lstlisting} hans@901: hans@921: Task: Check for a XML-document describing possible expert information hans@921: systems (FIS) hans@901: hans@901: hans@901: \subsubsection*{Deinstallation} hans@901: Stop server process: hans@901: /etc/init.d/artefact-server stop hans@901: hans@901: Remove integration in INIT-process: hans@901: rm -fi /etc/init.d/artefact-server hans@901: update-rc.d artefact-server remove hans@901: hans@901: Remove Binaries, Configuration, Caches, Artefact-Database: hans@901: rm -rfi /opt/artefact-server hans@901: rm -rfi /opt/artefact-server-\$VERSION hans@901: hans@901: Remove logging directories hans@901: rm -rfi /var/log/artifacts