Ignore:
Timestamp:
Jul 15, 2011, 8:03:05 PM (13 years ago)
Author:
jmckenna
Message:

fix formatting of workshop files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/workshop/2010/using_zoo_from_osgeolivevm.txt

    r256 r262  
    22
    33Using ZOO from an OSGeoLive virtual machine
    4 #############################################
     4###########################################
    55
    66.. contents:: Table of Contents
     
    1111
    1212ZOO Kernel Installation
    13 ************************
     13***********************
    1414
    15 As already said in introduction, an OSGeoLive virtual machine image disk has been installed on your computer, allowing you to use ZOO Kernel in a development environment directly. Using a virtual machine image disk seems to be the simplest way to use ZOO Kernel and to develop ZOO Services locally, as we can ensure that everything requested for compiling C Services and running Python ones is available and ready to use. Every ZOO related material and source code have been placed in ``/home/user/zoows`` directory. We will work inside it during this workshop. As the binary version of ZOO Kernel is already compiled and stored in ``/home/user/zoows/sources/zoo-kernel``, you only have to copy two important files inside the ``/usr/lib/cgi-bin`` directory : ``zoo_loader.cgi`` and the ``main.cfg`` in order to make ZOO Kernel available, using the following commands :
     15As already said in introduction, an OSGeoLive virtual machine image disk has
     16been installed on your computer, allowing you to use ZOO Kernel in a development
     17environment directly. Using a virtual machine image disk seems to be the simplest
     18way to use ZOO Kernel and to develop ZOO Services locally, as we can ensure that
     19everything requested for compiling C Services and running Python ones is available
     20and ready to use. Every ZOO related material and source code have been placed in
     21``/home/user/zoows`` directory. We will work inside it during this workshop. As
     22the binary version of ZOO Kernel is already compiled and stored in ``/home/user/zoows/sources/zoo-kernel``,
     23you only have to copy two important files inside the ``/usr/lib/cgi-bin``
     24directory : ``zoo_loader.cgi`` and the ``main.cfg`` in order to make ZOO Kernel
     25available, using the following commands :
    1626
    1727.. code-block:: guess
     
    2131
    2232
    23 Please note that we will talk about ZOO Kernel or ``zoo_loader.cgi`` script without any distinction during this workshop.
     33Please note that we will talk about ZOO Kernel or ``zoo_loader.cgi`` script without
     34any distinction during this workshop.
    2435
    25 The ``main.cfg`` file contains metadata informations about the identification and provider but also some important settings. The file is composed of various sections, namely main, identification and provider per default. Obviously, you are free to add new sections to the file if you need them for a specific Service. Nevertheless, you have to know that the env and lenv sections name are used in a specific way.
     36The ``main.cfg`` file contains metadata informations about the identification and
     37provider but also some important settings. The file is composed of various sections,
     38namely main, identification and provider per default. Obviously, you are free to add
     39new sections to the file if you need them for a specific Service. Nevertheless, you
     40have to know that the env and lenv sections name are used in a specific way.
    2641
    27 The env section lets you define environment variables that your Service requires during its runtime. For instance, if your Service requires to access to a X server running on framebuffer, then you will have to set the ``DISPLAY`` environnement variably, in this case you would add ``DISPLAY=:1`` line in your env section.
     42The env section lets you define environment variables that your Service requires
     43during its runtime. For instance, if your Service requires to access to a X server
     44running on framebuffer, then you will have to set the ``DISPLAY`` environnement
     45variably, in this case you would add ``DISPLAY=:1`` line in your env section.
    2846
    29 As for the env section, there is the section lenv where specific informations about status informations of a running Service will be written by the ZOO Kernel or the ZOO Services. For instance, when your service failed, you can set the value for message in lenv to see it displayed in the Status node of the ExecuteResponse returned back to the client. If your service will take long time and can get informations about processing status, you can then set a value between 0 and 100 to status in lenv to represent the percentage completed of the running Service task, we will talk deeper about this later in this workshop.
     47As for the env section, there is the section lenv where specific informations about
     48status informations of a running Service will be written by the ZOO Kernel or the
     49ZOO Services. For instance, when your service failed, you can set the value for
     50message in lenv to see it displayed in the Status node of the ExecuteResponse
     51returned back to the client. If your service will take long time and can get
     52informations about processing status, you can then set a value between 0 and 100
     53to status in lenv to represent the percentage completed of the running Service task,
     54we will talk deeper about this later in this workshop.
    3055
    3156Please take a look to your local file ``main.cfg`` file. Three important parameters are commented bellow:
     
    4368    tmpUrl=../temp/
    4469
    45 You could have noticed that the tmpUrl is a relative url from ``serverAddress``, so it must be a directory. Even if ZOO Kernel can be used with the full url of the ``zoo_loader.cgi`` script, for better readability and fully functional ZOO Kernel, you have to modify the default Apache configuration in order to be able to use the  http://localhost/zoo/ url directly.
     70You could have noticed that the tmpUrl is a relative url from ``serverAddress``,
     71so it must be a directory. Even if ZOO Kernel can be used with the full url of
     72the ``zoo_loader.cgi`` script, for better readability and fully functional ZOO Kernel,
     73you have to modify the default Apache configuration in order to be able to use the 
     74http://localhost/zoo/ url directly.
    4675
    47 First, please create a ``zoo`` directory in the existing ``/var/www`` which is used by Apache as the ``DocumentRoot``. Then, please edit the ``/etc/apache2/sites-available/default`` configuration file and add the following lines after the ``Directory`` block related to ``/var/www`` directory :
     76First, please create a ``zoo`` directory in the existing ``/var/www`` which is
     77used by Apache as the ``DocumentRoot``. Then, please edit the ``/etc/apache2/sites-available/default``
     78configuration file and add the following lines after the ``Directory`` block related to ``/var/www`` directory :
    4879
    4980.. code-block:: none
     
    6596    RewriteRule (.*) /cgi-bin/zoo_loader.cgi [L,QSA]
    6697
    67 For this last file to be taken into account by Apache, you must activate the rewrite Apache module by copying a load file as bellow :
     98For this last file to be taken into account by Apache, you must activate the
     99rewrite Apache module by copying a load file as bellow :
    68100
    69101.. code-block:: guess
     
    84116
    85117
    86 Two other softwares form the OSGeoLive environment will be used during this workshop. MapServer will first be used to provide WFS input data for the ZOO Services we are going to develop. The MapServer dataset providen by Orkney (japanese regions polygons) will be passed to our service during `section 4 <http://zoo-project.org/trac/wiki/ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices#CallingthesinglegeometryservicesfromJavaScript>`__.
     118Two other softwares form the OSGeoLive environment will be used during this workshop.
     119MapServer will first be used to provide WFS input data for the ZOO Services we are
     120going to develop. The MapServer dataset providen by Orkney (japanese regions polygons)
     121will be passed to our service during `section 4 <http://zoo-project.org/trac/wiki/ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices#CallingthesinglegeometryservicesfromJavaScript>`__.
    87122
    88 OpenLayers library is also available on the OSGeoLive virtual machine image disk, and it will be used during `section 4 <http://zoo-project.org/trac/wiki/ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices#CallingthesinglegeometryservicesfromJavaScript>`__, for building a simple WPS client application able to query the newly developed ZOO Services.
     123OpenLayers library is also available on the OSGeoLive virtual machine image disk,
     124and it will be used during `section 4 <http://zoo-project.org/trac/wiki/ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices#CallingthesinglegeometryservicesfromJavaScript>`__, for building a simple WPS client application able to query the newly developed ZOO Services.
    89125
    90 As we planned to use OGR C-API and Python module of the GDAL library, we will need the corresponding header files, libraries and associated files. Hopefully everything was already available per default and so ready to use on the OSGeoLive packaging.
     126As we planned to use OGR C-API and Python module of the GDAL library, we will need
     127the corresponding header files, libraries and associated files. Hopefully everything
     128was already available per default and so ready to use on the OSGeoLive packaging.
    91129
    92130Testing the ZOO installation with GetCapabilities
    93 ***************************************************
     131*************************************************
    94132
    95133
     
    105143   :align: center
    106144
    107 Please note that no Process node is returned in the ProcessOfferings section, as no ZOO Service is available yet. You can also proceed to a GetCapabilities request from the command line, using the following command:
     145Please note that no Process node is returned in the ProcessOfferings section, as no
     146ZOO Service is available yet. You can also proceed to a GetCapabilities request from
     147the command line, using the following command:
    108148
    109149.. code-block:: none
     
    122162
    123163Preparing your ZOO Services Provider directory
    124 *************************************************
     164**********************************************
    125165
    126 In order to simplify the task, we will first comment the directory structure which should be used when creating a new Services Provider :
     166In order to simplify the task, we will first comment the directory structure which
     167should be used when creating a new Services Provider :
    127168
    128169  - The main Services Provider directory including :
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png