Workshop Advanced GeoNetwork Jose Garcia Heikki Doeleman OSGIS Nottingham 2012
Table of contents Introduction A horizontally scaled, load-balanced cluster External security system Setup PC Configuration for a production environment Data directory Database Tomcat deployment Advanced editing features Directories management Logos management System information Metadata schema profiles support Multi-lingual indexing
Introduction This is the workshop advanced GeoNetwork extending the workshop GeoNetwork for dummies. In this workshop you ll explore some of the advanced configuration options of GeoNetwork. Advanced editing features and how to set up GeoNetwork in a production environment. A horizontally scaled, load-balanced cluster In upcoming builds of GeoNetwork a functionality will be introduced to facilitate clustering of GeoNetwork nodes. Currently GeoNetwork can not be scaled: each instance uses own Lucene index database IDs created using in-memory counter data directory site UUID is generated at startup harvesters should run in only 1 instance in-memory pessimistic locking in the editor thesaurus management versioning admin commands (system configuration, reload / optimize index, reload settings) The functionality is based on Java messaging (JMS): decoupled messaging using JMS guaranteed delivery publish/subscribe point-to-point random UUID for database IDs single Site UUID shared data directory Each time a record is updated in one of the nodes a message is sent to all nodes in the cluster to update the index.
Metadata publishing workflow External security system Geonetwork comes with a built-in user database. However in most cases you d want to authenticate against an external security system and share that with
your map server and spatial applications. GeoNetwork has several options to authenticate against external security systems like Ldap and Shiboleth. To activate Ldap authentication follow these steps: 1. Go to Administration > System configuration 2. In Authentication section, select LDAP instead of GeoNetwork authentication and fill the required information. 3. Save configuration Note that assigning users to roles should be managed in the GeoNetwork Administration interface. Setup PC In this workshop we re using the latest release of GeoNetwork, version 2.8. Unfortunately this version is not yet available in the OSGeo Live DVD 6. You have two options to get started with geonetwork 2.8. Download the jar-installer from http://nightlybuilds.geonetworkopensource.org Download the war from http://nightlybuilds.geonetwork-opensource.org and deploy in Tomcat If you are on a pc booted from OSGeo Live DVD, download the jar-installer and install to a usb-pendrive. Run GeoNetwork using the startup links in the installation folder Additionally you will need to have the Java JDK installed on your machine.
Configuration for a production environment Data directory The GeoNetwork data directory is the location on the file system where GeoNetwork stores all of its custom configuration. To facilitate upgrades to new versions it is a good idea to define an external data directory outside of the application folder. The data directory variable could be set using: Java environment variable Servlet context parameter in geonetwork/web-inf/web.xml <servlet> <servlet-name>gn-servlet</servlet-name> <servlet-class>jeeves.server.sources.http.jeevesservlet</ servlet-class> <!-- Specified what overrides to use if the (servlet.getservletcontext().getservletcontextname() ).jeeves.configuration.overrides.file system parameter is not specified. --> <init-param> <param-name>jeeves.configuration.overrides.file</ param-name> <param-value>,/web-inf/config-overrides-prod.xml</ param-value> </init-param> <!-- Specified what geonetwork data directory to use. --> <init-param> <param-name>geonetwork.dir</param-name> <param-value>/app/geonetwork_data_dir</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> System environment variable Depending on the servlet container used it is also possible to specify the data directory location with a Java System Property. For Tomcat, configuration is: CATALINA_OPTS="-Dgeonetwork.dir=/app/geonetwork_data_dir" Database
By default, GeoNetwork uses H2 database. For a production environment it is highly recommended to change this to use Postgres, MySql or Oracle. Exercise: 1. Start pgadmin application. 2. Create a Postgres database named geonetwork. 3. Configure GeoNetwork to use the new database. Database configuration is done in geonetwork/web-inf/config.xml <resource enabled="false"> <name>main-db</name> <provider>jeeves.resources.dbms.apachedbcpool</provider> <config> <user>postgres</user> <password>postgres</password> <!-- we use org.postgis.driverwrapper in place of org.postgresql.driver to support both postgresql and postgis --> <driver>org.postgresql.driver</driver> <!-- jdbc:postgresql:database jdbc:postgresql://host/database jdbc:postgresql://host:port/database spatial index loaded or if you are using postgis and want the into postgis jdbc:postgresql_postgis://host:port/database <url>jdbc:postgresql://localhost:5432/geonetwork</ url> <poolsize>10</poolsize> <validationquery>select 1</validationQuery> </config> </resource> 4. Restart GeoNetwork and check with pgadmin the geonetwork database is filed. Tomcat deployment GeoNetwork is distributed in 2 flavours: 1. A platform independent installer, that runs in an embedded Jetty servlet container.
2. A war file that can be deployed in a Java application server or Servlet container like Tomcat or JBoss. Additional information on advanced configuration of GeoNetwork is available: http://geonetwork-opensource.org/_static/foss4g2010/ FOSS4G_Mastering_Advanced_GeoNetwork.pdf http://geonetwork-opensource.org/manuals/trunk/eng/users/admin/ advanced-configuration/index.html Advanced editing features Directories management This feature allows to create libraries of metadata elements, like for example: Points of contact Geographical bounding boxes to re-use later in the metadata records. Any change done for example in a contact stored in the library is propagated to all metadata that references it. Exercise: 1. Go to Administration > Manage Directories 2. Select Responsible party in first selection list and click Magnifying glass button to show available templates. Click on PointOfContact result to edit it.
3. Fill out the contact information and click Save and close button. 4. Go to Administration > System configuration and make sure XLink resolver is enabled. 5. Create a new metadata record (Administration > New metadata) using Template for Vector data in ISO19139. 6. In Point Of Contact section, click on Binoculars button and search for the contact added previously. Logos management
This feature allows from the Administration UI to manage the logos used in GeoNetwork for: harvested metadata, the catalogue metadata and the favicon to display in the browser Exercise: 1. Go to Administration > Logo Management 2. Upload a new logo image by selecting it in with Browse button. Once selected, click on Upload button. 3. Select the new uploaded logo and click Use for the catalogue button
4. Go to home page, the new logo is displayed for the catalogue. System information Provides system information about the GeoNetwork environment: Catalogue configuration JVM information Lucene (index) configuration
Database configuration Metadata schema profiles support Advanced metadata editing features will be introduced. Participants will learn how to implement a new, interoperable metadata profile. The metadata profile can be validated for structure and content. A profile is.. (consists of an xsd, schematron, basic edit form, codelists. best to take an exisiting profile ad adept to your needs)? This feature allows an Administrator user to plugin new metadata schemas (including profiles) into GeoNetwork, supporting also different versions of a metadata schema.
Exercise: 1. Go to Administration > Add a metadata schema/profile 2. Fill the form with these values: a. name: iso19139.fra b. URL of Schema Zip archive: http://osgis.genuchten.net/ iso19139.fra.zip 3. Click Add button to load the profile in GeoNetwork. 4. Once the new profile has been added, go to Administration panel and add the templates for the new profile: 5. Create a new metadata and select the template related to the new profile: You can find documentation about developing a metadata profile package in
http://geonetwork-opensource.org/manuals/trunk/eng/developer/ schemaplugins/index.html Multi-lingual indexing GeoNetwork supports multilingual search. Depending on the configuration, this influences which search results are returned and how they are presented: only in the requested language: only search results in the requested language are returned requested language on top: search results in all languages are returned, with results in the requested language sorted to the top ignore requested language: results in all languages are returned, with no specific sorting for the requested language In the search GUI, the user may select the language for the search, otherwise the UI language is used: Note that the language selector is only available if the multilingual setting is not "Ignore requested language in search". Exercise: 1. Delete existing metadata in the catalog. 2. Create an iso19139 metadata record with title "English metadata", set metadata language to English and save it. 3. Create an iso19139 metadata record with title "Francais metadonnes", set metadata language to French and save it. 4. Go to the search form, execute an search and check results. 5. Change Multilingual configuration in Administration > System configuration to "Search only in requested language", save changes.
6. Go to the search form: a. Set Language to English and execute the search, checking the results are different from previous search. b. Set Language to French and execute the search, checking the results are different from previous search. 7. Change Multilingual configuration in Administration > System configuration to "Search results in requested language sorted on top", save changes. 8. Go to the search form: a. Set Language to English and execute the search, checking the results are different from previous search. b. Set Language to French and execute the search, checking the results are different from previous search.