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