[eoxserver-dev] Getting more Urgent: paths in fixtures (was: How to install and run eoxserver?)

Novacek, Milan milan.novacek at siemens.com
Sat Oct 22 09:48:44 CEST 2011


Hi Dev,
  I'm at a point where a solution would be good.
I suppose I could edit the fixtures by hand, but then I'm afraid that the autotests from within the django framework might not run - is there any danger of this?


Milan Novacek 


-----Original Message-----
From: dev-bounces at eoxserver.org on behalf of Stephan Krause
Sent: Thu 10/13/2011 9:07 AM
To: dev at eoxserver.org
Subject: Re: [eoxserver-dev] How to install and run eoxserver?
 
Hi Milan,

oh dear, that's a pain. I think we have to think again about the admin 
logic. There are two ways around this:

1. edit the paths in the fixtures

2. delete the datasets and the dataset series and re-add them

But I hope we'll come up with a better solution later in the day.

cheers,
Stephan K


On 2011-10-12 18:55, Novacek, Milan wrote:
> Hi dev,
>    with the most recent eoxserver, I can't find where on the admin pages to change the paths on the coverages administration - I seem to remember it was quite intuitive in the previous version.
> I'm looking at
>     Home > Coverages > Rectified Datasets, but then they can't be changed - If I select one it compains:
>   "This rectified dataset cannot be changed because is marked as 'automatic'."
>
> Any hints?
>
> Thanks,
>
> Milan Novacek
>
> -----Original Message-----
> From: dev-bounces at eoxserver.org on behalf of Stephan Krause
> Sent: Fri 9/23/2011 6:07 PM
> To: dev at eoxserver.org
> Subject: Re: [eoxserver-dev] How to install and run eoxserver?
>
> Hi Milan,
>
> On 2011-09-23 17:44, Novacek, Milan wrote:
>> Stephan,
>>     making some good progress... got not errors during syncdb, loaded the fixtures you mention, but then the getCapabilites request didn't go too well:
>>
>> Request:
>>
>> http://127.0.0.1/eswcs/ows?service=WCS&VERSION=2.0.0&REQUEST=GetCapabilities
>>
>> Exception:
>>
>> <ows:Exception exceptionCode="mapserv" locator="Internal"><ows:ExceptionText>msWCSGetCoverageMetadata20(): Unable to access file. `/autotest/data/meris/MER_FRS_1P_reduced/ENVISAT-MER_FRS_1PNPDE20060816_090929_000001972050_00222_23322_0058_uint16_reduced_compressed.tif' does not exist in the file system,
>> and is not recognised as a supported dataset name.
>> </ows:ExceptionText></ows:Exception>
>>
>> It seems a path prefix is missing somewhere along the line.
>> B. t. w., when I loaded the fixtures I used absolute paths, e.g.:
>>
>> python manage.py loaddata /home/novacek/o3s/work/autotest/data/fixtures/testing_coverages.json
>>
>>
> Yes you are right, a path prefix is missing indeed. That's a problem
> with the test fixtures: they work well with the test scripts, but as
> they use relative paths and Apache usually sets the working directory to
> /, you have to edit them in order to use them in a production setting. I
> hope the admin is working (it's always lagging behind a bit), there you
> should be able to add the path prefixes. Unfortunately there is no
> easier way to do it.
>
> Cheers,
> Stephan K
>
>> Milan Novacek
>>
>>
>> -----Original Message-----
>> From: dev-bounces at eoxserver.org on behalf of Stephan Krause
>> Sent: Fri 9/23/2011 4:26 PM
>> To: dev at eoxserver.org
>> Subject: Re: [eoxserver-dev] How to install and run eoxserver?
>>
>> Hi Milan,
>>
>> hmmmm ... I think we have to take a closer look at create_instance.py :-(
>>
>> Finally brute force should do the trick: before running python manage.py
>> syncdb, copy TEMPLATE_config.sqlite to data/config.sqlite:
>>
>> $ cp eoxserver/conf/TEMPLATE_config.sqlite data/config.sqlite
>> $ python manage.py syncdb
>>
>> TEMPLATE_config.sqlite is a sqlite file already initialized with the
>> tables required by spatialite. Normally, that works without problems -
>> probably we should rewrite create_instance.py to do that as well.
>>
>> Sorry that this idea did not occur to me earlier, could have saved you
>> some time.
>>
>> best regards,
>> Stephan K
>>
>> On 2011-09-23 16:06, Novacek, Milan wrote:
>>> Hi Stephan,
>>>      installing pyspatialite via easy_install went fine, then from
>>>      'python eoxserver/create_instance.py --init_spatialite ...' I got the output:
>>>
>>> Initializing django project folder.
>>> Setting up initial database.
>>>
>>> So far so good -
>>> but then from python manage.py syncdb I still get:
>>> ---
>>>       ...
>>>      Creating table auth_permission
>>>       ...
>>>      Superuser created successfully.
>>>        ...
>>>      Installing index for coverages.EOMetadataRecord model
>>>      AddGeometryColumn() error: "no such table: geometry_columns"
>>>      CreateSpatialIndex() error: "no such table: geometry_columns"
>>>        ...
>>> ---
>>>
>>> Any further hints?
>>>
>>>
>>> Milan Novacek
>>>
>>>
>>> -----Original Message-----
>>> From: dev-bounces at eoxserver.org on behalf of Stephan Krause
>>> Sent: Fri 9/23/2011 2:39 PM
>>> To: dev at eoxserver.org
>>> Subject: Re: [eoxserver-dev] How to install and run eoxserver?
>>>
>>> Hi Milan,
>>>
>>> reading the create_instance.py script I found out that there two
>>> alternatives implemented. One uses the spatialite binary from
>>> spatialite-bin and one uses the pyspatialite package; the second method
>>> is the preferred one. So perhaps you can get around this issue by
>>> downloading pyspatialite; the official download link is here:
>>>
>>> http://pyspatialite.googlecode.com/files/pyspatialite-2.6.1.tar.gz
>>>
>>> There are packages for Debian and for Ubuntu as well, I do not know
>>> about OpenSuSE.
>>>
>>> You could also use easy_install which will download the package from the
>>> Python Package Index (PyPI) and install it on your machine.
>>>
>>> Hope this helps,
>>>
>>> cheers,
>>> Stephan
>>>
>>> On 2011-09-23 14:09, Novacek, Milan wrote:
>>>> Stephan,
>>>>       you had correctly included --init_spatialite in your original description, I removed it from my attempt in order to get around point 1.
>>>> Therefore, point _IS_ fatal, and I guess I am stuck until I find some equivalent of spatialite-bin for OpenSuse.  (I can get libspatialite no problem but the CLI seems to be a bit hidden - I guess I'll try find source and build it).
>>>> The problem is 'spatialite-bin' seems to be an Ubuntu package only as far as I can tell from a quick search.
>>>> Any ideas, anyone, by the way?
>>>>
>>>> cheers,
>>>>
>>>> Milan Novacek
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: dev-bounces at eoxserver.org on behalf of Stephan Krause
>>>> Sent: Fri 9/23/2011 1:48 PM
>>>> To: dev at eoxserver.org
>>>> Subject: Re: [eoxserver-dev] How to install and run eoxserver?
>>>>
>>>> Hi Milan,
>>>>
>>>> On 2011-09-23 11:52, Novacek, Milan wrote:
>>>>> Stephan,
>>>>>        Thanks for this, indeed this is a big help.
>>>>>
>>>>> The only question now is how to enable wcs access:
>>>>> <ows:ExceptionText>msWCSDispatch20(): WCS server error. WCS request not enabled. Check wcs/ows_enable_request settings.</ows:ExceptionText>
>>>> This is a known bug that occurs when no coverages are configured for the
>>>> service. See ticket #41. It is not related to the component settings in
>>>> the EOxServer Core data model.
>>>>> I can run the browser admin client, but don't immediately see a setting for enabling wcs. In the core settings. everything seems to be enabled.
>>>>>
>>>>>
>>>>> By the way here are corrections and minor problems I have collected with this so far:
>>>>>
>>>>> -----------
>>>>> 1. So far haven't located an equivalent of spatialite-bin for OpenSuse - I think this is non-fatal though.
>>>>>
>>>>> 2. For the command line "python eoxserver/eoxserver/create_instance.py ...":
>>>>> 2a. instead of "--mapserver_dir=" use "--mapscript-dir="  with the appropriate path
>>>>> 2b. for "--initial_data=" use the intial data jason file, rather than the dir that contains it,
>>>>> so we have the corrected command line:
>>>>>       python eoxserver/create_instance.py \
>>>>>          --dir=eoxserver_instance \
>>>>>          --initial_data=eoxserver/core/fixtures/template_initial_data.json \
>>>>>          --mapscript-dir=/home/path/to/mapserver/mapscript \
>>>>>          instance_1
>>>>>
>>>>> 3. After running python manage.py syncdb, besides some positive diagnostic messages,
>>>>>         I also get 2 errors reported (after the superuser is created):
>>>>>             AddGeometryColumn() error: "no such table: geometry_columns"
>>>>>             CreateSpatialIndex() error: "no such table: geometry_columns"
>>>>>
>>>>>         This also appears non-fatal.
>>>>>
>>>> I am sorry, apparently I have written this text from memory and made
>>>> quite some errors. Point 3. is important as it will prevent the database
>>>> from working correctly. I forgot to write down the '--init_spatialite'
>>>> option for create_instance.py. This will initialize the database file
>>>> with the base structure for spatialite and add the 'geometry_columns' table.
>>>>
>>>> Last issue: because of a refactoring of our testing code, the fixtures
>>>> have been split up into some files which you can find under
>>>> autotest/data/fixtures. At the moment you have to load them by hand using
>>>>
>>>> python manage.py loaddata<path/to/fixture>     ...
>>>>
>>>> * initial_data.json is a link to
>>>> eoxserver/core/fixtures/template_initial_data.json; you do not need to
>>>> load it another time
>>>> * auth_data.json contains the fixtures for the default user account; you
>>>> do not need this in case you have defined your own superuser account
>>>> * initial_rangetypes.json contains range type definitions; you need to
>>>> load this in order to use the test coverages
>>>> * testing_base.json contains the range type definition for MERIS 15-band
>>>> imagery; you need to load this in order to use the test coverages
>>>> * testing_coverages.json contains the actual test coverage records
>>>>
>>>> I hope it works after applying these patches. I will update the
>>>> documentation soon.
>>>>
>>>> Best regards,
>>>>
>>>> Stephan K
>>>>
>>>>> -----------
>>>>>
>>>>> Milan Novacek
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: dev-bounces at eoxserver.org on behalf of Stephan Krause
>>>>> Sent: Wed 9/21/2011 5:01 PM
>>>>> To: dev at eoxserver.org
>>>>> Subject: Re: [eoxserver-dev] How to install and run eoxserver?
>>>>>
>>>>> Hi Milan,
>>>>>
>>>>> here is an installation howto we wrote for a virtual machine. You have
>>>>> to change paths, of course. Please have a look at the help text of
>>>>> create_instance.py, too. Hope this helps a bit.
>>>>>
>>>>> cheers,
>>>>> Stephan K
>>>>>
>>>>> == Setup EOxServer ==
>>>>>
>>>>>          1. Install required packages
>>>>>
>>>>>             sudo apt-get install libspatialite2 spatialite-bin
>>>>> python-argparse python-lxml python-numpy python-django
>>>>>
>>>>>          2. Get EOxServer
>>>>>
>>>>>             svn co http://eoxserver.org/svn/trunk eoxserver
>>>>>
>>>>>          3. Set Environment variables
>>>>>
>>>>>             export PYTHONPATH=/home/rasdaman/eoxserver
>>>>>
>>>>>          4. Create an EOxServer instance
>>>>>
>>>>>             mkdir eoxserver_instance
>>>>>             python eoxserver/eoxserver/create_instance.py
>>>>> --dir=eoxserver_instance --initial_data=eoxserver/autotest/data/fixtures
>>>>> --init_spatialite --mapserver_dir=/home/rasdaman/mapserver/mapserver
>>>>> eoxs_rasdaman_instance_01
>>>>>             cd eoxserver_instance/eoxs_rasdaman_instance_01
>>>>>             python manage.py syncdb
>>>>>
>>>>> On 2011-09-21 14:57, Novacek, Milan wrote:
>>>>>>>> If you encounter more problems, please write again to the mailing list.
>>>>>> Hi dev,
>>>>>>          it has been a while since I used eoxserver (I had been using a dummy since I reported the POST problems).
>>>>>> Now that I wanted to switch back to using the real thing -- my old set-up is evidently hopelessly out of date,
>>>>>> and so I'm looking (unsuccessfully so far) for documentation on how to install/configure a new instance of exoserver.
>>>>>> The old INSTALL or HOWTO files that mention 'manage.py' are also evidently hopelessly out of date.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Milan Novacek
>>>>>>
>>>>>>
>>>>>>
>>>
>>
>>
>
>
>




More information about the dev mailing list