[Osaas-commits] r81 - in trunk: . doc doc/source doc/source/img

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 2 12:36:52 CET 2010


Author: iweinzierl
Date: 2010-11-02 12:36:51 +0100 (Tue, 02 Nov 2010)
New Revision: 81

Added:
   trunk/doc/
   trunk/doc/Makefile
   trunk/doc/make.bat
   trunk/doc/source/
   trunk/doc/source/_static/
   trunk/doc/source/_templates/
   trunk/doc/source/about.rst
   trunk/doc/source/conf.py
   trunk/doc/source/contrib.rst
   trunk/doc/source/img/
   trunk/doc/source/img/osaas_diagram.png
   trunk/doc/source/index.rst
   trunk/doc/source/installation.rst
   trunk/doc/source/running.rst
   trunk/doc/source/utilization.rst
Modified:
   trunk/ChangeLog
Log:
Initial OSAAS documentation checkin.

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/ChangeLog	2010-11-02 11:36:51 UTC (rev 81)
@@ -1,3 +1,21 @@
+2010-11-02  Ingo Weinzierl <ingo at intevation.de>
+
+	* doc/make.bat,
+	  doc/Makefile: Makefiles for creating the documentation of OSAAS in
+	  different output formats.
+
+	* doc/source/about.rst,
+	  doc/source/utilization.rst,
+	  doc/source/_static,
+	  doc/source/running.rst,
+	  doc/source/contrib.rst,
+	  doc/source/installation.rst,
+	  doc/source/conf.py,
+	  doc/source/img,
+	  doc/source/img/osaas_diagram.png,
+	  doc/source/_templates,
+	  doc/source/index.rst: The initial documentation of OSAAS.
+
 2010-10-27  Bjoern Schilberg <bjoern.schilberg at intevation.de>
 
 	* contrib/billing/doc/osaas-contrib_short_manual.de.rst: Added a german

Added: trunk/doc/Makefile
===================================================================
--- trunk/doc/Makefile	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/Makefile	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/OSAAS.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/OSAAS.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/OSAAS"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/OSAAS"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	make -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."

Added: trunk/doc/make.bat
===================================================================
--- trunk/doc/make.bat	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/make.bat	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,155 @@
+ at ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html       to make standalone HTML files
+	echo.  dirhtml    to make HTML files named index.html in directories
+	echo.  singlehtml to make a single large HTML file
+	echo.  pickle     to make pickle files
+	echo.  json       to make JSON files
+	echo.  htmlhelp   to make HTML files and a HTML help project
+	echo.  qthelp     to make HTML files and a qthelp project
+	echo.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\OSAAS.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\OSAAS.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+:end

Added: trunk/doc/source/about.rst
===================================================================
--- trunk/doc/source/about.rst	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/about.rst	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,47 @@
+=============
+About *OSAAS*
+=============
+
+*OSAAS* stands for *OWS Statistics And Accounting System*.
+It contains of 2 components, the server and clients. One client for deegree
+OWS-Proxy is part of this package. Arbitrary others could be implemented.
+
+OWS stands for OGC Web Services where OGC is the Open Geospatial Consortium.
+
+OSAAS is Free Software, most of it licensed under GNU GPL (the server). Other
+parts depend on the respective clients (e.g. GNU LGPL for deegree).
+
+Please refer to the README.txt in the respective sub-directories for more
+information.
+
+For further questions or discussion please get in contact via the delelopers
+mailing list:
+
+    http://lists.wald.intevation.org/mailman/listinfo/osaas-devel
+
+
+
+==================
+Goals and Concepts
+==================
+
+The main goal of *OSAAS* is to track access to your OGC web services for the
+purpose of statistics. In addition to that, its integrated user authentication
+enables you to take account for accessing OGC services.
+For this reason, an *OSAAS* client (e.g. deegree OWS-Proxy with *OSAAS* hook)
+communicates with an *OSAAS* server. The client works as Proxy in front of the
+actual OWS and recieves OGC requests and forwards them to the actual OWS. In
+addition to that, it sends information about each request to *OSAAS* server.
+Currently, the only way of communication between client and server takes place
+via HTTP-POST based on HTTP-BasicAuth. Finally, *OSAAS* server logs the OGC requests to a database, that
+makes these information available for other tools - *OWS Web-Statistics* is one
+of this tools.
+
+.. image:: img/osaas_diagram.png
+
+Some tools of *OSAAS* server have been created with the aim to make the
+installation and configuration as easy as possible. For example, there is a tool
+that creates new users, another one creates the whole data model based on the
+configuration file. So it is not necessary for the user to know about the
+database schema in detail. For more information see the chapter `Installing OSAAS Server`.
+

Added: trunk/doc/source/conf.py
===================================================================
--- trunk/doc/source/conf.py	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/conf.py	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+#
+# OSAAS documentation build configuration file, created by
+# sphinx-quickstart on Thu Oct 28 12:23:05 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'OSAAS'
+copyright = u'2010, Intevation GmbH'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.0.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'OSAASdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'OSAAS.tex', u'OSAAS Documentation',
+   u'Ingo Weinzierl', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'osaas', u'OSAAS Documentation',
+     [u'Ingo Weinzierl'], 1)
+]

Added: trunk/doc/source/contrib.rst
===================================================================
--- trunk/doc/source/contrib.rst	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/contrib.rst	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,121 @@
+=======
+Contrib
+=======
+
+Currently, the contrib directory contains a two scripts - a python script named
+*billing.py* and an init script named *osaas*.
+
+Init script
+###########
+
+*osaas* is a SuSE-specific init-script which adds the possibility to start and
+stop OSAAS-server as a service. You can manually copy it to ``/etc/init.d/``
+and set the propper links to the runlevels you want to start the OSAAS-server.
+By default this script requires an osaas-user to run under. Make sure that the
+script has the executable-permissions set. The startup-script requires a
+configuration-file ``/etc/osaas/osaas-config.xml`` to work properly. When using
+OSAAS-server from within a RPM-package this is automatically setup correct.
+
+
+billing.py
+##########
+
+*billing.py* searches for GetFeature requests in the database where OSAAS is
+logging to. Each GetFeature request that could be found is sent to the WFS
+service again - with a little difference: the script doesn't query for the
+features itself, but for the number of features that would have been retrieved
+by this GetFeature request. Finally, the retrieved number is written into the
+database.
+
+The following sections describe the configuration and usage of *billing.py*.
+
+
+PostgreSQL Configuration
+------------------------
+
+*billing.py* needs access to the database where OSAAS is logging to. So, make
+sure that PostgreSQL is listening to localhost on port 5432. Therefore, you
+should find the following lines in ``/var/lib/pgsql/data/postgresql.conf``::
+
+  listen_adress='localhost'
+  port = 5432
+
+If OSAAS is logging to a database which is not running on localhost or port
+5432, you need to adjust these settings.
+
+Furthermore, you should find a line to allow the user *osaas* to access to
+*osaas_logging* database running on localhost in ``/var/lib/pgsql/data/pg_hba.conf``::
+
+  host osaas_logging osaas  127.0.0.1/32 md5
+
+Now, you need to create the user and the database::
+
+  su postgres -c "createuser -SDRleP osaas"
+  su postgres -c "createdb -O osaas osaas_logging"
+
+Finally, you need to execute two SQL scripts that create all necessary database
+tables. The first one creates the target database table for WFS requests. The
+second one adds some additional columns to this table required by the billing
+script::
+
+  su postgres -c "psql -U osaas -h localhost -d osaas_logging -f contrib/billing/wfs_requests.sql"
+  su postgres -c "psql -U osaas -h localhost -d osaas_logging -f contrib/billing/billing.sql"
+
+
+Configuration File
+------------------
+
+This section describes the options, the user has to configure the *billing.py*
+script. In general, the config is devided into two parts - database and logging.
+You can find an example configuration *billing.cfg* in ``contrib/billing/``.
+
+[database]
+''''''''''
+
+The settings in this section define the database connection. It is absolutely
+necessary to have such a section in your configuration - otherwise *billing.py*
+is not possible to create a connection to the database *OSAAS* is logging to.
+
+The options of this section are:
+
+database (required):
+    This option defines the name of the database where *OSAAS* is logging to. It
+    is absolutely necessary to define this option - otherwise the script
+    wouldn't be able to connect to a database.
+
+host (optional):
+    This option defines the host where the database is running on. If this
+    option is missing, its default value is *localhost*.
+
+user (required):
+    This option defines the user that is used to connect to *database*. It is
+    absolutely necessary to define a user - otherwise the script wouldn't be
+    able to connect to database.
+
+password (optional):
+    This option defines the password for *user* that is used to create the
+    database connection. If there is no password in the configuration, the
+    database connection is created without password.
+
+[logging]
+'''''''''
+
+The settings in this section define the logging of *billing.py*. All options in
+this section are optional.
+
+The options in this section are:
+
+logfile (optional):
+    A path to a file that is used for logging. It is recommended to define this
+    option to get to know about important information of the execution of the
+    script.
+
+loglevel (optional):
+    This option defines the level of details. Currently, you are able to choose
+    between three levels - *1*, *2* and *3*. The default loglevel is *2*.
+    *1*: The script just logs failures that occured while processing.
+    *2*: The script logs failures and some additional information.
+    *3*: The script is very verbose - logs failures, additional information and
+    a lot of further information about the process itself. This loglevel is
+    recommended for developers.
+

Added: trunk/doc/source/img/osaas_diagram.png
===================================================================
(Binary files differ)


Property changes on: trunk/doc/source/img/osaas_diagram.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/doc/source/index.rst
===================================================================
--- trunk/doc/source/index.rst	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/index.rst	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,26 @@
+.. OSAAS documentation master file, created by
+   sphinx-quickstart on Thu Oct 28 12:23:05 2010.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to OSAAS's documentation!
+=================================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   about.rst
+   installation.rst
+   running.rst
+   contrib.rst
+   utilization.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

Added: trunk/doc/source/installation.rst
===================================================================
--- trunk/doc/source/installation.rst	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/installation.rst	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,261 @@
+=======================
+Installing OSAAS Server
+=======================
+
+The OSAAS server is the core component of OSAAS.  It accepts HTTP requests from
+OSAAS clients containing information about WMS requests, processes the
+information and stores it into a database. This chapter will lead you through
+OSAAS installation process.
+
+
+Requirements
+------------
+
+Before you are able to install *OSAAS*, you need to install some software:
+
+- Python >= 2.3 (see http://python.org/)
+
+Depending on which database you use, you need one of the following database API
+modules:
+
+- cx_Oracle >= 4.3.1 (see http://www.python.net/crew/atuining/cx_Oracle/)
+- psycopg2 >= 2.0.5.1 (see http://www.initd.org/pub/software/psycopg/)
+
+After downloading and installing the requirements, you should download *OSAAS*.
+You can do this using *Subversion* (see http://svnbook.red-bean.com/) with the
+following command::
+
+  svn checkout https://svn.wald.intevation.org/svn/osaas/trunk osaas-trunk
+
+or download the tarball from `wald.intevation.org <http://wald.intevation.org/frs/?group_id=33&release_id=158/>`_.
+
+
+PostgreSQL Configuration
+------------------------
+
+The next step it to configure your PostgreSQL database. If you have installed
+PostgreSQL from packages, the path definitions of the next steps should fit to
+your environment. Otherwise, the pathes may differ.
+
+At first, you should create a user *osaas* and the database *osaas_logging* with
+the following commands::
+
+  su postgres -c "createuser -SDRleP osaas"
+  su postgres -c "createdb -O osaas osaas_logging"
+
+In order that the created user is allowed to access the database, it is
+necessary to modify ``/var/lib/pgsql/data/pg_hba.conf`` and ``/var/lib/pgsql/data/postgresql.conf``.
+
+In ``/var/lib/pgsql/data/postgresql.conf`` you will find the config options
+*listen_adress* and *port*. Modify these as follows::
+
+  listen_addresses='localhost'
+  port = 5432
+
+and append the following line to ``/var/lib/pgsql/data/pg_hba.conf``::
+
+  host osaas_logging osaas  127.0.0.1/32 md5
+
+The PostgreSQL configuration is finished. Restart PostgreSQL with the command::
+
+  /etc/init.d/postgresql restart
+
+
+OSAAS Server Installation
+-------------------------
+
+*OSAAS* server is written in python and needs no explicit installation.
+Downloading the sources from SVN or tarball is all you need to do. But there
+are some things you need to initialize before you are able to run *OSAAS*.
+
+First of all: *OSAAS* server requires authentication. Use the ``adduser.py`` script
+to create new users. The following command will create a new user *osaas*.
+Executing this command, you will be asked for a password for the user *osaas*.
+Afterwards, the user and its hashed password are stored in the user database
+file given with the -f option. In this case, users and passwords are stored in
+*my-osaas-users*::
+
+  ./server/adduser.py -f my-osaas-users osaas
+
+*OSAAS* itself reads a configuration file. ``server/demo-config.xml`` is a demo
+configuration. See `Configuration`_ for more details on possible configuration
+options.
+
+After creating a new user and a configuration file, you are ready to initialize
+the database using ``initosaasdb.py``. ``initosaasdb.py`` reads your
+configuration and creates all necessary database tables - independent of which
+database (Oracle or PostgreSQL) you use. Initialize the database with the
+following command::
+
+  ./server/initosaasdb.py --config-file=my-osaas-config.xml
+
+If everything was fine, you can start *OSAAS* server with the following line::
+
+  ./server/startosaas.py --config-file=my-osaas-config.xml
+
+
+
+=============
+Configuration
+=============
+
+As already mentioned above, you can find a demo configuration in
+``server/demo-config.xml``. To understand the config options, please read the
+comments inline the demo configuration::
+
+    <?xml version="1.0"?>
+    <OSAASConfig>
+      <!-- The port the server will listen on -->
+      <Port>8989</Port>
+
+      <!-- The files the server will log to.  The access log holds the usual
+           HTTP server access log information.  The error log is used to log
+           errors and debug information.  If no file is specified, the
+           logging output is written to stderr.
+
+           Supported log levels in order of increasing Verbosity: 
+               CRITICAL, ERROR, WARNING, INFO, DEBUG
+           Default log level is INFO.
+        -->
+      <AccessLog>/var/log/osaas/osaas-access.log</AccessLog>
+      <ErrorLog>/var/log/osaas/osaas-error.log</ErrorLog>
+      <LogLevel>INFO</LogLevel>
+
+      <!-- The users database file. -->
+      <UserDB>/etc/osaas/osaas-users</UserDB>
+
+      <!-- File in which to write the PID.  Useful for /etc/init.d scripts -->
+      <PidFile>/var/run/osaas.pid</PidFile>
+
+      <!-- The database connection parameters -->
+      <DBConnection>
+        <!-- Type of the database.  Possible values: oracle, postgresql -->
+        <Type>postgresql</Type>
+
+        <!-- Connection parameters as a single string.  Use this for postgresql. -->
+        <Parameters>user=mydbuser password=mydbpassword host=localhost port=myport dbname=mydb</Parameters>
+
+        <!-- Connection parameters for Oracle.  Make sure Parameters is
+         empty or not present at all when using oracle.  The Parameters
+         entry takes precedence over the following parameters. -->
+        <User>mydbuser</User>
+        <Password>mydbpassword</Password>
+        <DSN>myDSN</DSN>
+      </DBConnection>
+
+      <!-- The database rules.  The rules describe one table and a mapping
+           from the values sent to the OSAAS server to the columns in the
+           table.  Some of the values are generated by the OSAAS client (the
+           WMS server or OWS proxy) and some are taken from the original
+           request sent by the WMS client.  All information taken from the
+           original WMS request has names in UPPERCASE.  The values
+           generated by the OSAAS client have lowercase names.
+        -->
+      <DBRules>
+
+        <!-- Definition of the MyOWSAccounting table.  The server expects
+         this table to have all the columns defined here and an
+         additional column called ID with a unique ID generated by a
+         sequence called MyOWSAccounting_seq (the name is derived from
+         the table name by append "_seq"). -->
+        <insert table="MyOWSAccounting">
+
+          <!-- Defines the column wmsidintern of type character varying(100)
+           which will hold the wmsidintern value -->
+          <value param="wmsidintern" column="wmsidintern"
+             type="character varying(100)"/>
+
+          <!-- external wmsid, defined like wmsidintern -->
+          <value param="wmsidextern" column="wmsidextern"
+             type="character varying(100)"/>
+
+          <!-- the name of the user is stored in the username column -->
+          <value param="user" column="username" type="character varying(20)"/>
+
+          <!-- The start and end timestamps -->
+          <value param="starttime" column="starttime"
+             type="timestamp with time zone"/>
+          <value param="endtime" column="endtime" 
+             type="timestamp with time zone"/>
+
+          <!-- The values taken from the original WMS request-->
+          <value param="SERVICE" column="service" type="character varying(10)"/>
+          <value param="REQUEST" column="req" type="character varying(10)"/>
+          <value param="BBOX" column="bbox" type="character varying(100)"/>
+          <value param="WIDTH" column="width" type="int"/>
+          <value param="HEIGHT" column="height" type="int"/>
+        </insert>
+      </DBRules>
+    </OSAASConfig>
+
+
+=====================
+Building OSAAS Client
+=====================
+
+OSAAS Java Client is a small library for java programs that want to send data to
+the OSAAS server. The build process uses ant. So, you need to make clear that
+you have ant installed (http://ant.apache.org/).
+
+Now, if you have ant installed on your machine, you can change to the the
+``client/java/`` directory and enter the following command::
+
+  ant
+
+The default target builds a jar file in the ``dist/`` subdirectory. Use this
+file in your client.
+
+
+Integration in *deegree OWSProxy*
+---------------------------------
+
+First of all, you need to download the deegree2 sources in a specific version,
+apply the patch ``client/java/owsproxy/owsproxy.diff`` and make *OSAAS* client
+available to deegree. Finally you are ready to build *deegree OWSProxy*. Follow
+the instructions below to do so:
+
+1. Download the sources using deegree::
+
+    svn co -r 15164 https://svn.wald.intevation.org/svn/deegree/base/trunk deegree-osaas
+
+2. Apply the patch ``client/java/owsproxy/owsproxy.diff``::
+
+    cd deegree-osaas
+    patch -p 0 < owsproxy.diff
+
+3. Make the osaas client code available to deegree::
+
+    cd deegree-osaas/lib
+    ln -s $DIST_HOME_OSAAS_CLIENT/ osaas
+
+4. Build deegree::
+
+    ant build-lib
+
+Now, you have built *deegree OWSProxy* with *OSAAS* integration. Finally, you
+need to configure logging. *OSAAS* logging configuration is read from the same
+WEB-INF/web.xml file as the *OWSProxy* configuration. Add the following lines to
+this file and replace the url, username, password and faillog::
+
+    <!-- The URL to which the OSAAS logging information is to be posted --> 
+    <init-param>
+       <param-name>OSAAS_URL</param-name>
+       <param-value>http://localhost:8989/owsaccounting/</param-value>
+    </init-param>
+
+    <!-- The user name and password to use for authentication with the 
+         OSASS server --> 
+    <init-param>
+       <param-name>OSAAS_USERNAME</param-name>
+       <param-value>aUser</param-value>
+    </init-param>
+    <init-param>
+       <param-name>OSAAS_PASSWORD</param-name>
+       <param-value>secret</param-value>
+    </init-param>
+
+    <!-- The file into which failed logging attempts are written --> 
+    <init-param>
+       <param-name>OSAAS_FAILLOG</param-name>
+       <param-value>/usr/share/tomcat/logs/osaas-faillog</param-value>
+    </init-param>

Added: trunk/doc/source/running.rst
===================================================================
--- trunk/doc/source/running.rst	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/running.rst	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,47 @@
+=======================
+Start/Stop OSAAS Server
+=======================
+
+Starting and stopping of *OSAAS* server depends on your installation. This
+chapter describes the two most frequent ways.
+
+Init script
+-----------
+
+If you want to start *OSAAS* server using the init script, you need to pay
+attention of two things:
+
+- the script requires your configuration at ``/etc/osaas/osaas-config.xml``
+- the script needs to have executable permissions
+
+If both points are clear, you are able to start *OSAAS* server with the
+following command::
+
+    /etc/init.d/osaas start
+
+To stop *OSAAS* server, just type::
+
+    /etc/init.d/osaas stop
+
+**NOTE**: By default, the init script requires an osaas-user to run under.
+
+
+Start/Stop *OSAAS* from sources
+-------------------------------
+
+To start *OSAAS* server from sources, you just need to use the ``startosaas.py``
+script. Change to the directory where the script is located and type::
+
+    ./startosaas.py --config-file=your-config.xml
+
+Run::
+
+    ./startosaas.py --help
+
+to see all command line options of the start script. All of the settings from
+config file, except of the DBRules, can be specified on the command line as
+well.
+
+To stop *OSAAS* server, just kill the process (Ctrl+C). *OSAAS* will stop listening in
+the socket, wait until any pending requests have been processed and then
+terminates.

Added: trunk/doc/source/utilization.rst
===================================================================
--- trunk/doc/source/utilization.rst	2010-10-27 15:28:04 UTC (rev 80)
+++ trunk/doc/source/utilization.rst	2010-11-02 11:36:51 UTC (rev 81)
@@ -0,0 +1,5 @@
+===========
+Utilization
+===========
+
+TODO: SQL-QUERIES



More information about the Osaas-commits mailing list