One click away from GeoNode with Rancher and Docker

GeoNode branding

Anyone who has had the chance to install GeoNode knows that setting it up means having to deal with a whole stack of software components. PostgreSQL/PostGIS, Geoserver, Celery, RabbitMQ, ElasticSearch are the key elements for a complete GeoNode setup that allows to exploit the complete set of functionalities offered by the platform.

GeoNode provides a setup procedure (based on Paver) that simplifies the process for testing and development purposes, but a production-ready deployment requires more steps to configure and integrate the individual components to offer a reliable and robust setup.

Docker, Rancher and GeoNode

The past years have seen the rise of DevOps technologies that help a lot in managing deployment operations, comprising CI/CD pipelines, and in configuring services to provide scalability, security and availability. Linux containers, and Docker in particular, has won the trust of developers, DevOps and sysadmins, providing widely adopted approaches for these tasks. A fast growing ecosystem of tools and platforms has been built on top of it, from Docker Compose to Rancher to offer streamlined operations and services for the building of cloud infrastructures and distributed services.
GeoNode did not miss the DevOps  train, a set of Docker images has been defined along a Compose configuration to make it possible to deploy the whole GeoNode stack as a group of interlinked containers. The design of the GeoNode “dockerization” is still undergoing thanks to a joint effort from various subjects within the community, where GeoSolutions is actively participating to offer its contribution and experience.

To meet the needs of our current scenarios we have created a custom Docker and Rancher setup, specifically targeted at setting up multiple deployments of GeoNode as easy and quick as possible. The goal was having a one or two click away vanilla GeoNode setup, leveraging single or multiple hosts infrastructures while providing at the same time the ability to customize its look and feel without touching any line of code.

GeoNode hosts with Rancher and Docker

GeoNode instance with Rancher and Docker

The result was the “GeoNode Generic” project template for Docker Compose template v.2 and Rancher 1.6 It can be loaded directly from Rancher UI defining a custom catalog pointing to the GitHub project’s repository.

GeoNode Generic Rancher template

GeoNode Generic Rancher template

 

GeoNode Generic deployment with Rancher

This is a Django project partly based on the GeoNode project template, with a dedicated Docker and Rancher template files  from which new instances can be deployed and run with a minimal effort. Define the host environment, answer a few (mostly optional) questions et voilà, here you have a fresh new GeoNode instance, with backup services and monitoring already enabled and running.

Geonode Geneirc stack configuration

Geonode Geneirc stack configuration

The stack comprises five containers running the PostgreSQL/PostGIS DB, Geoserver, the GeoNode Django app, the Nginx HTTP Server exposing the public endpoints of GeoNode, and one container dedicated to persistent data storage (uploaded data, GeoNode‘s static files, etc.).

Cron schedules for backup and monitoring tasks (metrics collection) are run from the GeoNode Django app container, where uWSGI cron facilities are used for this purpose.

Running containers

Running containers

In this example only one container instance for each image is running. The number of GeoNode and Nginx instances can be increased and put behind Rancher’s Load Balancing services to provide a basic HA. In the future Kubernetes orchestration, instead of Cattle, will be considered to take advantage of its powerful tools for rolling releases management and advanced HA and FailOver services.

UI Customization

Until a few days ago applying some branding to GeoNode could only be obtained with customizing its CSS and Django templates files. This still remains true if deep customization is needed but now you have the opportunity to define basic frontend styling thanks to the brand new (no pun intended) “themes” feature, developed by GeoSolutions and already available for the development version of GeoNode.

The “themes” configuration allows to define multiple themes offering:

  • custom logo
  • custom header background image
  • custom header title and message
  • custom color for header and background
  • contacts block in footer
  • copyright message in footer

A list of “partners” can also be defined with their own logos. If partners are defined a custom block in included before the footer, listing the logos which can link to the partner websites.

Theme admin excerpt

Theme admin excerpt

 

Combining GeoNode‘s deployment through Rancher templates and themes customization we obtained a fast workflow for our customers, permitting to create new instances for their infrastructures at the speed of a click.

GeoNode branding

GeoNode branding

Last but not least, we would want to thank the GFDRR group at the World Bank as well as the GIS Department of the City of  Genova (Italy) which provided the funding for this work.

If you are interested in learning about how we can help you achieving your goals with open source products like GeoServerMapStoreGeoNode and GeoNetwork through our Enterprise Support Services and GeoServer Deployment Warranty offerings, feel free to contact us!

The GeoSolutions team,