librelist archives

« back to archive

Use GeoNodes PostGIS install

Use GeoNodes PostGIS install

From:
Andrew Jeffrey
Date:
2011-09-12 @ 09:43
Hi,

First of all great job on GeoNode 1.1-RC1 that install process is much 
easier and I think the documentation of the install process has improved 
as well - Makes the install easier for linux noobs like myself…..thanks!

I have a question regarding the use of an existing PostGIS DB with 
Geonode. We currently have a PostGIS enable DB at work, and this is the 
point of truth for our spatial datasets. However the clients and web apps 
we use don't provide the collaboration and metadata management that 
GeoNode package does. Can I tap into an existing PostGIS install with 
GeoNode? Is it as easy as changing the details in the local_settiings.py, 
and creating the associated user in my existing database? Or am I being a 
little to simplistic?

Thanks
Ando

Re: [geonode] Use GeoNodes PostGIS install

From:
Jeffrey Johnson
Date:
2011-09-12 @ 20:08
Hi Ando,

On Mon, Sep 12, 2011 at 3:43 AM, Andrew Jeffrey <aljeffrey83@gmail.com> wrote:
> Hi,
>
> First of all great job on GeoNode 1.1-RC1 that install process is much 
easier and I think the documentation of the install process has improved 
as well - Makes the install easier for linux noobs like myself…..thanks!

Great. Three cheers for all the hard work that Ariel and David have
done to get this release out!

> I have a question regarding the use of an existing PostGIS DB with 
Geonode. We currently have a PostGIS enable DB at work, and this is the 
point of truth for our spatial datasets. However the clients and web apps 
we use don't provide the collaboration and metadata management that 
GeoNode package does. Can I tap into an existing PostGIS install with 
GeoNode? Is it as easy as changing the details in the local_settiings.py, 
and creating the associated user in my existing database? Or am I being a 
little to simplistic?

Not simplistic at all. The way to do this is to (as you mention) setup
your local_settings.py with the credentials to your existing database
and run django-admin.py syncdb --settings=geonode.settings with the
virtualenv activated ... this will create a set of new tables in this
database for GeoNode. Then you need to login to the GeoServer admin UI
and register your PostGIS database as a store and configure each of
the layers that you want to use with GeoNode. This can be laborious if
you have alot of layers and I think it would be a good addition to
geonode to have a management command that does this sort of thing
using gsconfig.py. Then you need to run the management command that
'syncs' the layer records from GeoServers config to GeoNode and
GeoNetworks (django-admin.py updatelayers
--settings=geonode.settings). IIRC, all of the layers will be owned by
the admin user and have public permissions. You can change the
permissions in the GeoNode UI. From there you should be good to go.

NOTE: Ive done this on a small scale in the past and ran into issues
doing it with a lot (200+ layers) but recall that the errors I ran
into during updatelayers have been solved since then. Please report
any issues you run into back to the list and we can try to diagnose
and solve them with you.

> Thanks
> Ando

Thank you! and good luck.

Jeffrey Johnson
-------------------
Software Developer
OpenGeo - http://opengeo.org
Enterprise support for the open source geospatial stack.
m: +1760089488 i:jj0hns0n @:jj0hns0n s:j3ffr3yj0hns0n

Re: [geonode] Use GeoNodes PostGIS install

From:
Andrew Jeffrey
Date:
2011-09-12 @ 23:59
Jeffrey, thanks for the quick response. That sounds like promising news, one
other question that has now popped up would going down this path pose any
major troubles for upgrading in the future?

On a side note I kind of tested what you suggested. I was thinking a bit
more about what I need and really I just need the layers in my existing
PostGIS DB to be available to GeoNode for the quick map production, metadata
and sharing that it does so well. So I basically did the last two steps of
what you suggested. For example I created a store connecting to my existing
DB and placed a layer in that store. I then ran the django management
command to "sync" Geoservers config with GeoNode and GeoNetwork -- and
presto the layers I added were available :)

I know this will leave me with two DBs on separate machines so probably not
the best solution - could require more thought and planning.


Thanks
Ando

On Tue, Sep 13, 2011 at 6:08 AM, Jeffrey Johnson <jjohnson@opengeo.org>wrote:

> Hi Ando,
>
> On Mon, Sep 12, 2011 at 3:43 AM, Andrew Jeffrey <aljeffrey83@gmail.com>
> wrote:
> > Hi,
> >
> > First of all great job on GeoNode 1.1-RC1 that install process is much
> easier and I think the documentation of the install process has improved as
> well - Makes the install easier for linux noobs like myself…..thanks!
>
> Great. Three cheers for all the hard work that Ariel and David have
> done to get this release out!
>
> > I have a question regarding the use of an existing PostGIS DB with
> Geonode. We currently have a PostGIS enable DB at work, and this is the
> point of truth for our spatial datasets. However the clients and web apps we
> use don't provide the collaboration and metadata management that GeoNode
> package does. Can I tap into an existing PostGIS install with GeoNode? Is it
> as easy as changing the details in the local_settiings.py, and creating the
> associated user in my existing database? Or am I being a little to
> simplistic?
>
> Not simplistic at all. The way to do this is to (as you mention) setup
> your local_settings.py with the credentials to your existing database
> and run django-admin.py syncdb --settings=geonode.settings with the
> virtualenv activated ... this will create a set of new tables in this
> database for GeoNode. Then you need to login to the GeoServer admin UI
> and register your PostGIS database as a store and configure each of
> the layers that you want to use with GeoNode. This can be laborious if
> you have alot of layers and I think it would be a good addition to
> geonode to have a management command that does this sort of thing
> using gsconfig.py. Then you need to run the management command that
> 'syncs' the layer records from GeoServers config to GeoNode and
> GeoNetworks (django-admin.py updatelayers
> --settings=geonode.settings). IIRC, all of the layers will be owned by
> the admin user and have public permissions. You can change the
> permissions in the GeoNode UI. From there you should be good to go.
>
> NOTE: Ive done this on a small scale in the past and ran into issues
> doing it with a lot (200+ layers) but recall that the errors I ran
> into during updatelayers have been solved since then. Please report
> any issues you run into back to the list and we can try to diagnose
> and solve them with you.
>
> > Thanks
> > Ando
>
> Thank you! and good luck.
>
> Jeffrey Johnson
> -------------------
> Software Developer
> OpenGeo - http://opengeo.org
> Enterprise support for the open source geospatial stack.
> m: +1760089488 i:jj0hns0n @:jj0hns0n s:j3ffr3yj0hns0n
>

Re: [geonode] Use GeoNodes PostGIS install

From:
Jeffrey Johnson
Date:
2011-09-13 @ 04:03
On Mon, Sep 12, 2011 at 5:59 PM, Andrew Jeffrey <aljeffrey83@gmail.com> wrote:
> Jeffrey, thanks for the quick response. That sounds like promising news, one
> other question that has now popped up would going down this path pose any
> major troubles for upgrading in the future?

I dont really forsee any real problems with upgrading, but perhaps
Ariel can pipe up and let us know his thoughts on that kind of thing
since I know he has done some work on making sure the debian/ubuntu
packages dealt with upgrades properly.

> On a side note I kind of tested what you suggested. I was thinking a bit
> more about what I need and really I just need the layers in my existing
> PostGIS DB to be available to GeoNode for the quick map production, metadata
> and sharing that it does so well. So I basically did the last two steps of
> what you suggested. For example I created a store connecting to my existing
> DB and placed a layer in that store. I then ran the django management
> command to "sync" Geoservers config with GeoNode and GeoNetwork -- and
> presto the layers I added were available :)

Great!

> I know this will leave me with two DBs on separate machines so probably not
> the best solution - could require more thought and planning.

I dont necessarily think that having 2 databases is a bad thing if you
want to keep the GeoNode tables separate from the actual data tables.
Sounds like a reasonable solution.

> Thanks
> Ando
>
> On Tue, Sep 13, 2011 at 6:08 AM, Jeffrey Johnson <jjohnson@opengeo.org>
> wrote:
>>
>> Hi Ando,
>>
>> On Mon, Sep 12, 2011 at 3:43 AM, Andrew Jeffrey <aljeffrey83@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > First of all great job on GeoNode 1.1-RC1 that install process is much
>> > easier and I think the documentation of the install process has improved as
>> > well - Makes the install easier for linux noobs like myself…..thanks!
>>
>> Great. Three cheers for all the hard work that Ariel and David have
>> done to get this release out!
>>
>> > I have a question regarding the use of an existing PostGIS DB with
>> > Geonode. We currently have a PostGIS enable DB at work, and this is the
>> > point of truth for our spatial datasets. However the clients and web apps we
>> > use don't provide the collaboration and metadata management that GeoNode
>> > package does. Can I tap into an existing PostGIS install with GeoNode? Is it
>> > as easy as changing the details in the local_settiings.py, and creating the
>> > associated user in my existing database? Or am I being a little to
>> > simplistic?
>>
>> Not simplistic at all. The way to do this is to (as you mention) setup
>> your local_settings.py with the credentials to your existing database
>> and run django-admin.py syncdb --settings=geonode.settings with the
>> virtualenv activated ... this will create a set of new tables in this
>> database for GeoNode. Then you need to login to the GeoServer admin UI
>> and register your PostGIS database as a store and configure each of
>> the layers that you want to use with GeoNode. This can be laborious if
>> you have alot of layers and I think it would be a good addition to
>> geonode to have a management command that does this sort of thing
>> using gsconfig.py. Then you need to run the management command that
>> 'syncs' the layer records from GeoServers config to GeoNode and
>> GeoNetworks (django-admin.py updatelayers
>> --settings=geonode.settings). IIRC, all of the layers will be owned by
>> the admin user and have public permissions. You can change the
>> permissions in the GeoNode UI. From there you should be good to go.
>>
>> NOTE: Ive done this on a small scale in the past and ran into issues
>> doing it with a lot (200+ layers) but recall that the errors I ran
>> into during updatelayers have been solved since then. Please report
>> any issues you run into back to the list and we can try to diagnose
>> and solve them with you.
>>
>> > Thanks
>> > Ando
>>
>> Thank you! and good luck.
>>
>> Jeffrey Johnson
>> -------------------
>> Software Developer
>> OpenGeo - http://opengeo.org
>> Enterprise support for the open source geospatial stack.
>> m: +1760089488 i:jj0hns0n @:jj0hns0n s:j3ffr3yj0hns0n

Re: [geonode] Use GeoNodes PostGIS install

From:
David Winslow
Date:
2011-09-13 @ 04:09
It's also quite possible to configure GeoNode to use a nonlocal PostGIS
server for all its database needs (GeoNetwork, GeoServer, and the Django
frontend all need to write other files so you will still have some backup
concerns on the server hosting those.)  The files to edit would be
GeoNetwork's config.xml, the Django app's local_settings.py, and any layer
configurations in GeoServer (if you have been uploading shapefiles after
installing via the packages, they'll be imported to PostGIS and the
datastore config in GeoServer will contain the database host name.)

I think the Ubuntu package currently lists Postgres as a strict requirement,
but really it doesn't need to be on the same machine.

--
David Winslow
OpenGeo - http://opengeo.org/

On Mon, Sep 12, 2011 at 10:03 PM, Jeffrey Johnson <jjohnson@opengeo.org>wrote:

> On Mon, Sep 12, 2011 at 5:59 PM, Andrew Jeffrey <aljeffrey83@gmail.com>
> wrote:
> > Jeffrey, thanks for the quick response. That sounds like promising news,
> one
> > other question that has now popped up would going down this path pose any
> > major troubles for upgrading in the future?
>
> I dont really forsee any real problems with upgrading, but perhaps
> Ariel can pipe up and let us know his thoughts on that kind of thing
> since I know he has done some work on making sure the debian/ubuntu
> packages dealt with upgrades properly.
>
> > On a side note I kind of tested what you suggested. I was thinking a bit
> > more about what I need and really I just need the layers in my existing
> > PostGIS DB to be available to GeoNode for the quick map production,
> metadata
> > and sharing that it does so well. So I basically did the last two steps
> of
> > what you suggested. For example I created a store connecting to my
> existing
> > DB and placed a layer in that store. I then ran the django management
> > command to "sync" Geoservers config with GeoNode and GeoNetwork -- and
> > presto the layers I added were available :)
>
> Great!
>
> > I know this will leave me with two DBs on separate machines so probably
> not
> > the best solution - could require more thought and planning.
>
> I dont necessarily think that having 2 databases is a bad thing if you
> want to keep the GeoNode tables separate from the actual data tables.
> Sounds like a reasonable solution.
>
> > Thanks
> > Ando
> >
> > On Tue, Sep 13, 2011 at 6:08 AM, Jeffrey Johnson <jjohnson@opengeo.org>
> > wrote:
> >>
> >> Hi Ando,
> >>
> >> On Mon, Sep 12, 2011 at 3:43 AM, Andrew Jeffrey <aljeffrey83@gmail.com>
> >> wrote:
> >> > Hi,
> >> >
> >> > First of all great job on GeoNode 1.1-RC1 that install process is much
> >> > easier and I think the documentation of the install process has
> improved as
> >> > well - Makes the install easier for linux noobs like myself…..thanks!
> >>
> >> Great. Three cheers for all the hard work that Ariel and David have
> >> done to get this release out!
> >>
> >> > I have a question regarding the use of an existing PostGIS DB with
> >> > Geonode. We currently have a PostGIS enable DB at work, and this is
> the
> >> > point of truth for our spatial datasets. However the clients and web
> apps we
> >> > use don't provide the collaboration and metadata management that
> GeoNode
> >> > package does. Can I tap into an existing PostGIS install with GeoNode?
> Is it
> >> > as easy as changing the details in the local_settiings.py, and
> creating the
> >> > associated user in my existing database? Or am I being a little to
> >> > simplistic?
> >>
> >> Not simplistic at all. The way to do this is to (as you mention) setup
> >> your local_settings.py with the credentials to your existing database
> >> and run django-admin.py syncdb --settings=geonode.settings with the
> >> virtualenv activated ... this will create a set of new tables in this
> >> database for GeoNode. Then you need to login to the GeoServer admin UI
> >> and register your PostGIS database as a store and configure each of
> >> the layers that you want to use with GeoNode. This can be laborious if
> >> you have alot of layers and I think it would be a good addition to
> >> geonode to have a management command that does this sort of thing
> >> using gsconfig.py. Then you need to run the management command that
> >> 'syncs' the layer records from GeoServers config to GeoNode and
> >> GeoNetworks (django-admin.py updatelayers
> >> --settings=geonode.settings). IIRC, all of the layers will be owned by
> >> the admin user and have public permissions. You can change the
> >> permissions in the GeoNode UI. From there you should be good to go.
> >>
> >> NOTE: Ive done this on a small scale in the past and ran into issues
> >> doing it with a lot (200+ layers) but recall that the errors I ran
> >> into during updatelayers have been solved since then. Please report
> >> any issues you run into back to the list and we can try to diagnose
> >> and solve them with you.
> >>
> >> > Thanks
> >> > Ando
> >>
> >> Thank you! and good luck.
> >>
> >> Jeffrey Johnson
> >> -------------------
> >> Software Developer
> >> OpenGeo - http://opengeo.org
> >> Enterprise support for the open source geospatial stack.
> >> m: +1760089488 i:jj0hns0n @:jj0hns0n s:j3ffr3yj0hns0n
>