Professional Documents
Culture Documents
GeoNode with an
Integrated Application
Part I
Date: April 2, 2012
Af ter another Openquake.org site outage, I thought I better copy over this post
1 of 6 01/04/2017 12:04
I recently installed GeoNode and integrated an application into it and thought I w ould share some notes on the process.
By the end of the guide you should have a f ully f unctioning GeoNode installed including multiple client and Django application locally or on a
server.
Bef ore installing GeoNode, there w as one dependency that w as not included in the GeoNode package that added some python packages, to
meet this requirement I f irst I ran:
Ins talling Ge oNode : OpenGeo has made great progress in recent months w ith the process of installing GeoNode, and now you can simply
f ollow the three commands here to install GeoNode to your local machine or to a server.
Once GoeNode is installed please f ollow the required and recommended settings as needed on the Conf iguring GeoNode f or Production.
Check that your GeoNode is w orking by opening your brow ser to http://YOURIPADDRESS, you should see the GeoNode w elcome page.
Now that you have a w orking GeoNode it is likely that you are going to w ant to integrate an application into it. If you do not already have an
application, a good place to start is w ith the readygxp w hich has been set up specif ically to provide a simple reusable template f or
GeoExt/GXP applications bound f or a servlet container.
2 of 6 01/04/2017 12:04
I w ould recommend to place a copy of the client application onto the server or local machine. Then you w ill need to prepare your client
application by setting up the application build.xml to ref lect the new GeoNode IP address and project name. This is done by navigating to the
root directory of the client application and editing the build.xml, your setting should look like:
You w ill need to create a .w ar f ile of your application, lets pretend its called application.w ar. From your client root directory run (dont f orget
to f irst run git submodule init and git submodule update if needed and ant init (just the f irst time af ter cloning the application f rom github)):
ant static-war
Now copy the application.w ar to your GeoNode /var/lib /tomcat6/web apps path.
SITEURL = YOURIPADDRESS
If you have a SCHEMATA_DOMAINS def ined in your local_settings.py, then you w ill also have to change its IP address
You w ill also need to add the project IP to /var/lib /tomcat6/web apps/geoserver/W EB-INF/web .xml:
GEONODE_BASE_URL
3 of 6 01/04/2017 12:04
Add proxies f or application in /etc/apache2/sites-availab le/geonode it should look something like this:
ProxyPass
/YourApplication
http://localhost:8080/YourApplication
ProxyPassReverse
/YourApplication
http://localhost:8080/YourApplication
**NOTE you also need to add a path to your additional applications to the f irst line of /etc/apache2/sites-availab le/geonode so that the
customized applications can be f ound, in my case the path looks like this:
:/var/lib/geonode/src/GeoNodePy/geonode/
Add the ip address to /var/lib /geoserver/geonode-data/gs-data/printing/config.yaml under # the lis t of allow e d hos ts :
If you use PGAdmin to view or manage your database and your GeoNode installation is on a remote server, optionally you can allow
postgress to be accessed via ssh by adding trust to /etc/postgresql/8.4/main/pg_hb a.conf and restart postgres, my settings looked like
this:
local all all trust # IPv4 local connections: host all all 127.0.0.1/32
4 of 6 01/04/2017 12:04
trust # IPv6 local connections: host all all ::1/128 trust
once this is done you can view the database via PGAdmin w ith this ssh string:
One more thing to note w hen adding or removing layers in GeoServer, GeoNode is not aw are of these changes. To make GeoNode aw are
of layer changes navigate to /var/lib /geonode/ directory you need to run:
source bin/activate
then:
If this command f ails then if could be that you need to increase the time-out time in:
/var/lib /tomcat6/web apps/geoserver-geonode-dev/W EB-INF/classes/applicationSecurityContext.xml
This completes part I of this topic, please check out part II w hich covers:
5 of 6 01/04/2017 12:04
Adding a Django a Application
6 of 6 01/04/2017 12:04