GeoNode components Preparation of environment: virtualization
GeoNode installation process: from packages and from tarball
Additional tools installation Basic GeoNode configuration URL
configuration and change User administration and registration
Printing configuration Management commands Web customization
Debugging GeoNode References and support
Slide 3
Application layer Service layer Data layer GeoNetwork Web
interface GeoServer Web interface
Slide 4
PostgreSQL & PostGIS: Spatial Database The database
component manages data and configuration information for
Geonode/Django, GeoNetwork and GeoServer. All of these tables and
data are stored within the geonode database on PostgreSQL. In the
workshop, we will use the pgAdmin application to manage the PostGIS
database directly. This application is not in the GeoNode default
installation.
Slide 5
The GeoSpatial Data Manager: GeoServer GeoServer is a
Java-based server with an OGC-compatible data store that can
provide WMS, WFS, WCS and other services in common formats like
GML, GeoJSON, KML and GeoTiff. It can be connected to different
spatial databases including PostGIS, Oracle Spatial, ArcSDE and
others. ArcSDE and Oracle data can be can be added to GeoNode using
console commands. GeoServer has a Web front-end to handle data
storage, styling and Web service configuration directly, but this
should be avoided in the context of GeoNode.
Slide 6
MetaData Manager: pyCSW or GeoNetwork pyCSW is the default
metadata manager and CSW server for Geonode 2.0. It is a
lightweight Python command application with no graphical interface.
GeoNetwork is a Java-based server managing metadata storage, search
and access. It was used as default CSW server in Geonode 1.X and
can be now deployed as alternate CSW backend
(http://docs.geonode.org/en/latest/deploy/csw.html).http://docs.geonode.org/en/latest/deploy/csw.html
GeoNetwork has a Web front-end to search, edit and import/export
metadata in ISO 19139 and other formats, and CSW service
configuration.
Slide 7
The GeoNode front-end Manager: Django Django is a high-level
Python Web framework that encourages rapid development and clean,
pragmatic design. It allows the user to easily tweak the content
and look and feel and to extend GeoNode to build customized
GeoPortals. It includes tools to handle user registration and
accounts, avatars, and helper libraries to interact with GeoServer
and GeoNetwork. There is a wide range of third party apps that can
be plugged into a GeoNode-based site including tools to connect to
different social networks, to build content management systems and
more.
Slide 8
The Mapping Components The main map interface for GeoNode is
the Map Composer / Editor, called GeoExplorer. It is built on top
of GeoExt and uses OpenLayers, GXP. It talks to the other
components via HTTP and JSON as well as standard OGC services.
Slide 9
GeoNode is typically installed on Ubuntu Linux To run GeoNode
in a Windows environment, the best solution is to create a Virtual
Machine Virtual Machines are also a good idea to distribute
samples, learn SDI administration with minimal risk and use them in
training, because they provide a reproducible environment Virtual
Machines can also be used to scale up your GeoNode-based SDI to
more powerful hardware, even run it on a cloud-based
infrastructure
Slide 10
How does it work?
Slide 11
Download the guest Operating System as an.iso file
(installation CD-DVD) For the workshop, we use Ubuntu 12.04 amd64
(or i386) release from: http://releases.ubuntu.com/precise/
Download and install the virtualization environment for the host OS
For the workshop, we use Oracles Virtual Box (free):
https://www.virtualbox.org/wiki/Downloads
Slide 12
Create a Virtual Machine with VirtualBox, using the Ubuntu.iso
file See details in http://www.psychocats.net/
http://www.psychocats.net/ ubuntu/virtualbox
Slide 13
Assign memory and disk space
Slide 14
Assign disk space
Slide 15
Assign as boot device the Ubuntu.iso file
Slide 16
Make sure you enable the network adapter
Slide 17
Start the VM. The autorun of the Ubuntu.iso disk starts up
Select the Install Ubuntu option
Slide 18
Check the option to download updates
Slide 19
Create the super-user account and give a network name to the
virtual machine
Slide 20
Once installation is done, click on Restart Now and then click
Enter to restart
Slide 21
It is convenient to use the update manager to install latest
changes in the software
Slide 22
Required for flexible window sizing, shared clipboard and
folders, and other features Press Enter to close the terminal after
installation, and Eject the CD in the task bar
Slide 23
After restarting the virtual machine, you can use the display
settings to change the virtual window size
Slide 24
You can also set automatic display resizing (you may select it
twice) And clipboard sharing
Slide 25
Make sure you have superuser privileges and password (if you
installed the virtual machine, just use your user and password)
Open a command terminal Click on the home button and type terminal
if you dont see the command line icon
Slide 26
Make sure previous GeoNode installations are removed, by
executing the following commands: sudo apt-get remove --purge
geonode sudo apt-get autoremove --purge sudo rm r /etc/geonode Run
the following commands to download and install the GeoNode packages
from the official repository, then restart: sudo apt-get install
python-software-properties sudo add-apt-repository
ppa:geonode/testing sudo rm /var/lib/apt/lists/* -vf sudo apt-get
update sudo apt-get install geonode sudo geonode-updateip 127.0.0.1
geonode createsuperuser * G eonode 2.0 is available for now as
testing package (release package is still 1.2), but it will
eventually be available as release, too
Slide 27
NOTES: Update and install command may need to be repeated
because of missing dependencies (check errors) These commands take
a long time to process because of package downloading. Be patient
and use the best network connection available
Slide 28
To test that the installation is correct, open the Firefox Web
browser and open the URL http://localhost http://localhost You
should see the GeoNode page after a few seconds
Slide 29
In http://localhost/geoserver/ you should see the GeoServer
welcome pagehttp://localhost/geoserver/
Slide 30
qGIS is an open-source GIS which can connect to SDI services
and PostGIS database from GeoNode To install, add these lines in
your /etc/apt/sources.list file for you Ubuntu distribution
(precise in our case) Then run the install: deb
http://qgis.org/debian precise main deb-src http://qgis.org/debian
precise main sudo apt-get update sudo apt-get install qgis
Slide 31
pgAdmin is an open-source tool to manage, query and perform
operations on PostgreSQL-PostGIS databases To install, just run:
sudo apt-get install pgadmin3
Slide 32
GeoNetwork is an open-source tool to manage, search and display
metadata To install, download the platform independent installer
(.jar file) from: http://geonetwork-
opensource.org/manuals/trunk/eng/users/
quickstartguide/installing/index.html
Slide 33
After downloading, give permission to execute the.jar file
Slide 34
After downloading the.jar file, run it from the user interface
(See image), or from the console (java jar
geonetwork_installXXX.jar) Do not install GeoServer (it already is
installed by Geonode)
Slide 35
To make Geonetwork run under Tomcat, follow instructions on:
http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderTomcat Then,
make sure your Tomcat user's home directory is writable: sudo chgrp
tomcat7 /usr/share/tomcat7 sudo chmod g+w /usr/share/tomcat7 Then
edit WEB-INF/config.xml in Geonetwork, and change the H2 url around
line 153 from this: jdbc:h2:geonetwork;LOCK_TIMEOUT=20000;MVCC=TRUE
to this:
jdbc:h2:~/.geonetwork/geonetwork;LOCK_TIMEOUT=20000;MVCC=TRUE When
you restart Tomcat Geonetwork should start without issue, and you
can see the H2 db files under /usr/share/tomcat7/.geonetwork.
Slide 36
Log in as administrator (admin, admin) and in the
Administration menu, add all default templates, to be able to
create and import metadata
Slide 37
Lets review some basic configuration written to the
/etc/geonode/local_settings.py file Notice the connection
information to access the Posgres-PostGIS DB, and the
administration password (we dont need to change it) sudo gedit
/etc/geonode/local_settings.py
Slide 38
The default map layers that appear in the GeoNode map viewer
are defined in the MAP_LAYERS section We can remove these entries,
or add new ones To add a default WMS layer in the GeoNode map
viewer, add: "source": {"url": "http://my-server/wms?"},
Slide 39
We can uncomment some lines in the configuration file to
receive error notifications. This is very useful!
Slide 40
To make the GeoNode accessible across the network, it must have
a URL or IP number instead of localhost If we use a virtual
machine, first we need to change the network configuration to use a
bridge adapter:
Slide 41
In Geonode 1.X it was very complicated to change the site URL
In Geonode 2.0 is very simple, just ran this script. It will modify
the local settings and update all the metadata and links in the
site Then it will restart the server sudo geonode-updateip
XX.XX.XX.XX (use new IP or URL)
Slide 42
GeoNode uses a standard Django administration page,
automatically generated There is no specific GeoNode Django
administration documentation, but you can check:
http://www.djangobook.com/en/2.0/index.ht ml
Slide 43
Go to the Admin command in the user menu of the GeoNode web
page
Slide 44
Administrators have access to all properties and medatada of
all resources (layers, maps, styles, documents) In this way you can
fix some problems
Slide 45
Users can be created in two ways in GeoNode Administrators can
directly create and configure users in GeoNode Web Administrators
can enable user to register automatically There is no specific
GeoNode Django administration documentation, but you can check:
http://www.djangobook.com/en/2.0/index.ht ml
Slide 46
Create groups to define common types of permissions for users
(e.g. data uploader, map editor, content reviewer, etc.)
Slide 47
Slide 48
The administrator, or the users with staff status and
permission to manage users, can add and modify users:
Slide 49
You give the new user a name and initial password The name
cannot have spaces or characters that are not alphabetical or
numbers This is wrong!
Slide 50
Users inherit permissions from groups, but can be overwritten
We can deactivate users without deleting them Staff users can log
into the Administration site Superusers have all privileges, even
if not explicitly set
Slide 51
Staff users can control elements contributed through the social
features of GeoNode, like comment, tags, etc. With the right
permissions, comments and tags can be modified or deleted
Slide 52
An important information field in the metadata specifies the
author and contact person for each layer This information can also
be changed in the administration tools for each layer
Slide 53
To allow user automated registration from the GeoNode
front-end, the following steps must be followed Set up the email
backend for Django if not set already
(https://docs.djangoproject.com/en/dev/topics/email/#e-mail-
backends)https://docs.djangoproject.com/en/dev/topics/email/#e-mail-
backends Set appropriate email backend local settings and enable
registration Add these lines
Slide 54
After registration is enabled, users will see a Register link
in the GeoNode Web site
Slide 55
The administrators will be able to see registered users in the
User list, with their registration status, and change their
privileges as with other users
Slide 56
The key performance factor for GeoNode mapping is the GeoServer
image management Some tricks: Install the native Jave image
libraries instead of the default ones:
http://docs.geoserver.org/stable/en/user/pro
duction/java.html#install-native-jai-and-jai- image-i-o-extensions
http://docs.geoserver.org/stable/en/user/pro
duction/java.html#install-native-jai-and-jai- image-i-o-extensions
Set the JAI settings in GeoServer as shown, to have acceleration
enabled Do not set resource consumption limits for WMS in GeoServer
(they are already 0 by default)
Slide 57
The overall printing configuration is handled by the Mapfish
print service managed by GeoServer The configuration can be found
here: /usr/geoserver/data/printing/config.yaml It contains allowed
DPIs, scales, and a description of the layout options When printing
maps that contain images (WMS, tiles) generated outside our
GeoNode, we will need to add these map servers to the config:
Slide 58
In the YAML file we also find the description of the layout
options for printing the maps The default layout is very simple. To
customize the layout options, you can use the documentation at
http://www.mapfish.org/doc/print/configurati on.html
Slide 59
To create the GeoNode superuser we used a geonode command line
instruction There are other management commands implemented on the
Django framework. We can get the full list by doing For instance,
we can use the importlayers command to upload shapefiles and
GeoTIFF files into GeoNode, instead of using the Web front-end The
command you may have to use is updatelayers, which will synch
GeoNode when external data sources are added via GeoServer (see the
GeoNode_DM2 presentation) We will also use the collectstatic
command later to update the Web pages when we change their content
or style For more information:
http://docs.geonode.org/en/latest/deploy/commands.html geonode
help
Slide 60
GeoNode uses Django templates to create the Web site appearance
and content Two important folders that specify content (Web text,
links) are: The default distribution templates. In this GeoNode
distribution are located in:
/usr/local/lib/python2.7/dist-packages/geonode/templates/ DO NOT
EDIT HERE The overriding templates for customization. Empty by
default /etc/geonode/templates/Copy here the default files and edit
them to customize the content
Slide 61
For instance, to customize the content of the GeoNode home
page, we can copy the index.html file from the default template to
the customization folder, and edit it: sudo cp
/usr/local/lib/python2.7/dist-packages/geonode/
templates/index.html /etc/geonode/templates sudo gedit
/etc/geonode/templates/index.html
Slide 62
If we refresh the GeoNode home page, the changes will be seen
We can follow the same process to customize the data, maps, data
search, etc. which can find in the same distribution templates
folder For more information on the syntax, see The Template Layer
in https://docs.djangoproject.com/en/dev/topics/templates/
Slide 63
A similar process can be followed to modify the style of the
Web site (images, colors) Take a look at this tutorial:
http://docs.geonode.org/en/latest/tutorials/devel/projects/theme.html
Slide 64
If you have problems making GeoNode work correctly, you should
check the logs to see if there are any error messages
Slide 65
Typically, we will get errors in the Web front-end like 500:
Internal Error If you need to get more meaningful error messages,
sacrificing temporarily some performance, enable the DEBUG mode in
the local settings file You need to restart the Apache server after
this change
Slide 66
The general GeoNode documentation site is in:
http://docs.geonode.org/en/latest/
http://docs.geonode.org/en/latest/ The quick installation guide
from package repository:
http://docs.geonode.org/en/latest/intro/install.html Detailed
installation from tarball distribution:
http://docs.geonode.org/en/latest/deploy/install.html Detailed
configuration for production environment:
http://docs.geonode.org/en/latest/deploy/production.html
Slide 67
The general GeoNode documentation site is in:
http://docs.geonode.org/en/latest/
http://docs.geonode.org/en/latest/ Go to
http://geonode.org/communication/ to subscribe to user and
developer mailing lists (we recommend that you join both). You will
need a Google account to do
thishttp://geonode.org/communication/