Professional Documents
Culture Documents
Ares(2019)3532206 - 30/05/2019
Document Identification
Status Final Due Date 30/11/2018
Version 1.3 Submission Date 30/05/2019
Keywords:
Cloud, Platform as a Service, System Integration, Validation
This document is issued within the frame and for the purpose of the CANDELA project. This project has received funding from the European
Union’s Horizon 2020 research and innovation programme under Grant Agreement No. 776193. The opinions expressed and arguments
employed herein do not necessarily reflect the official views of the European Commission.
The dissemination of this document reflects only the author’s view and the European Commission is not responsible for any use that may be
made of the information it contains. This document and its content are the property of the CANDELA Consortium. The content of all or parts
of this document can be used and distributed provided that the CANDELA project and the document are properly referenced.
Each CANDELA Partner may use this document in conformity with the CANDELA Consortium Grant Agreement provisions.
(*) Dissemination level: PU: Public, fully open, e.g. web; CO: Confidential, restricted under conditions set out in Model Grant Agreement; CI:
Classified, Int = Internal Working Document, information as referred to in Commission Decision 2001/844/EC.
Document Information
List of Contributors
Name Partner
Fabien CASTEL Atos France
Anne-Sophie TONNEAU Atos France
JF Rolland Atos France
Document History
Version Date Change editors Changes
0.1 31/08/2018 Anne-Sophie TONNEAU Initial Table of Content
(ATOS FR)
0.2 29/09/2018 Fabien CASTEL Reworked table of content
(ATOS FR) Recap of the topic to be addressed in each
chapter.
0.3 28/11/2018 Anne-Sophie TONNEAU Version for partner review
(ATOS FR)
0.4 30/11/2018 Fabien CASTEL (ATOS FR) Version for quality review
0.5 30/11/2018 Juan Alonso (ATOS ES) Quality Assessment
1.0 30/11/2018 Jose Lorenzo (ATOS ES) Coordinator approval for submission
1.1 29/04/2019 Jean-Frannçois Rolland Update of the document to handle remarks
(ATOS FR) issued at the first-year review
1.2 30/05/2019 Juan Alonso (ATOS ES) Quality Assessment
1.3 30/05/2019 Jose Lorenzo (ATOS ES) Final revision before re-submission
Quality Control
Role Who (Partner short name) Approval Date
Deliverable leader Jean-Frannçois Rolland (ATOS FR) 29/05/2019
Quality manager Juan Alonso (ATOS ES) 30/05/2019
Project Coordinator Jose Lorenzo (ATOS ES) 30/05/2019
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 2 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Table of Contents
Document Information ............................................................................................................................ 2
Table of Contents .................................................................................................................................... 3
List of Tables ............................................................................................................................................ 5
List of Figures........................................................................................................................................... 6
List of Acronyms ...................................................................................................................................... 7
Executive Summary ................................................................................................................................. 8
1 System overview .............................................................................................................................. 9
1.1 System components ................................................................................................................ 9
1.2 Standard components ........................................................................................................... 10
1.2.1 GeoServer ............................................................................................................................. 10
1.2.2 Keycloak ................................................................................................................................ 10
1.2.3 JupyterHub ........................................................................................................................... 11
1.2.4 CreoDIAS data connector ..................................................................................................... 12
1.2.5 MonetDB .............................................................................................................................. 12
1.2.6 PostGIS.................................................................................................................................. 13
1.3 Integration of applications and algorithms ........................................................................... 13
1.3.1 Semantic search application ................................................................................................. 13
1.3.2 Integration of data analytics algorithms .............................................................................. 13
1.3.3 The semantic classification tool ........................................................................................... 14
1.4 User access component – Notebook environment ............................................................... 15
1.4.1 Wpslib ................................................................................................................................... 17
1.4.2 Creodiaslib ............................................................................................................................ 17
1.5 Component interactions........................................................................................................ 17
2 Integration and validation strategy................................................................................................ 19
2.1 Integration process................................................................................................................ 19
2.1.1 Roles and responsibilities ..................................................................................................... 19
2.1.2 Integration and validation workflow .................................................................................... 20
2.2 Integration strategy ............................................................................................................... 22
2.3 Integration and validation test infrastructure....................................................................... 23
2.3.1 CANDELA infrastructure ....................................................................................................... 23
2.3.2 Infrastructure instances ....................................................................................................... 23
3 Integration tests ............................................................................................................................. 25
3.1 Components deployment ...................................................................................................... 25
3.1.1 GeoServer ............................................................................................................................. 25
3.1.2 Keycloak ................................................................................................................................ 26
3.1.3 JupyterHub ........................................................................................................................... 27
3.1.4 Semsearch ............................................................................................................................ 28
3.1.5 PostGIS.................................................................................................................................. 28
3.1.6 MonetDB .............................................................................................................................. 30
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 3 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
3.2 Notebook server .................................................................................................................... 32
3.2.1 Notebook server availability................................................................................................. 32
3.2.2 Python kernel running .......................................................................................................... 33
3.3 Data access ............................................................................................................................ 34
3.3.1 CreoDIAS data availability .................................................................................................... 34
4 Processing services......................................................................................................................... 35
4.1 Optical change detection processing chain ........................................................................... 35
4.1.1 Change detection processes run correctly ........................................................................... 35
4.1.2 Change detection processing pipeline runs correctly .......................................................... 36
4.2 Data split, merge, transformation ......................................................................................... 37
4.2.1 Processes Split Images and Merge Images run correctly ..................................................... 37
4.2.2 Jpeg2Tiff process run correctly ............................................................................................ 38
4.3 SAR change detection............................................................................................................ 39
4.3.1 SAR change detection process runs correctly ...................................................................... 39
4.4 DMG process ......................................................................................................................... 40
4.4.1 DMG process run correctly ................................................................................................... 40
5 Integration deployment environment ........................................................................................... 42
6 Conclusion ...................................................................................................................................... 43
References ............................................................................................................................................. 44
Annexes ................................................................................................................................................. 45
Annex I: Notebook server test script ................................................................................................. 45
Annex II: Change detection processing chain test script ................................................................... 45
Annex III: Data split, merge, transformation test script .................................................................... 48
Annex IV: Sar detection change test script ........................................................................................ 49
Annex V: EOminer DMG test script.................................................................................................... 50
Annex VI: CANDELA Service Providers Guide for service integration ................................................ 51
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 4 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
List of Tables
Table 1: Jupyter main kernels ................................................................................................................... 16
Table 2: Component interfaces overview ................................................................................................. 18
Table 3: Kubernetes configuration ........................................................................................................... 42
Table 4: Integration environment configuration ...................................................................................... 42
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 5 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
List of Figures
Figure 1: CANDELA system components overview __________________________________________ 9
Figure 2: JupyterHub global architecture ________________________________________________ 11
Figure 3: Collections available through s3fs mount point ___________________________________ 12
Figure 4: CANDELA platform processing pipeline __________________________________________ 14
Figure 5: Architecture of DLR application ________________________________________________ 15
Figure 6: Notebook environment architecture ____________________________________________ 16
Figure 7: Components interactions overview _____________________________________________ 17
Figure 8: Overview of the integration and validation workflow _______________________________ 20
Figure 9: Integration steps ___________________________________________________________ 22
Figure 10: Architecture of the CANDELA infrastructure _____________________________________ 23
Figure 11: Overview of the integration and validation environments __________________________ 24
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 6 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
List of Acronyms
Abbreviation / Description
acronym
API Application Programming Interface
COTS Commercial Off-The-Shelf
CSW Catalogue Service for the Web, OGC standard for data catalogue requesting
DBMS Data Base Management System
EO Earth Observation
GIS Geographic Information System
HTML HyperText Markup Langage
HTTP HyperText Transfer Protocol
JSON JavaScript Object Notation
LDAP Lightweight Directory Access Protocol
OGC Open Geospatial Consortium
PaaS Platform as a service
REST Representational State Transfer
SAR Synthetic Aperture Radar
SMTP Simple Mail Transfer Protocol
SQL Structured Query Language
SSH Secure Shell
URL Uniform Resource Locator
VM Virtual Machine
WEBDAV Web-based Distributed Authoring and Versioning
WP Work Package
WPS Web Processing Service, OGC standard for geospatial processing services
WS Web Service
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 7 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Executive Summary
The objective of this system integration and validation test plan is to describe the system components
and interactions, the integration strategy, the associated testing environments and the integration tests.
This document has been updated tacking into account the requirements from the first project review
meeting (first release of D3.5 took place in November 2018). Overall, the document keeps the same
structure including the following sections:
• The system is described in section 1, with a description of the component structure and
interactions between the different components.
• The integration strategy is presented in section 2, with the description of the integration process
in section 2.1 with the roles and responsibilities, the integration and validation workflow. The
steps of the integration procedure are described in section 2.2 and a description of integration,
validation and production environments is provided in section 2.3.
• The integration tests are detailed in section 3 of the document.
• The data analytics algorithms deployed in the platform are described in the section 4.
• An example describing the algorithm integration steps from an executable to a WPS processing
service is provided as Annex at the end of the deliverable.
D3.5 has been submitted together with a new version of D3.3 [8], where it is described the most
significant changes in the platform, some of them also included below. After the previous version of the
platform several tools have been integrated.
• The semantic search tool from IRIT has been deployed on the platform. Technically it consists of
two components, a website hosted on a Tomcat server and a geospatial PostGIS database. These
two components are deployed as two different docker containers.
• The DLR algorithm performing semantic classification on earth observation products has been
integrated on the platform. This needs to access to a monet database. An instance of this
database has been deployed in a separate container.
• The JupyterLab notebook has been modified to include new client libraries for both monetDB
and PostGIS. A command line client for monetDB has also been included to this JupyterLab
environment.
• In addition to the existing change detection algorithm on optical images provided by TAS France
a new change detection algorithm for SAR images from TAS Italy has been integrated.
This updated version of D3.5 includes the description of the new standard components integrated on
the platform in section 1.2. Section 1.3 provides details on how the algorithms and application from the
partners are integrated in the platform. The component interaction (section 1.5) has been updated and
includes the new components. In chapter 3 new test cases used to validate the correct deployment of
new functionalities of the platform have been described. Finally, Annex section contain two more
example of python test scripts for the DMG process provided by DLR and the SAR change detection
algorithm provided by TAS Italy.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 8 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
1 System overview
This section presents the CANDELA system components and their interactions.
The following schema presents the overview of the CANDELA system components.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 9 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
o Tomcat webserver
• Application and data analytics algorithms provided by partners:
- Change detection algorithms (on radar and optical products) that are made available as
WPS processing services
- Semantic classification algorithm and application
- Semantic search application
• Integration tools developed on the platform:
- Wpslib: library implement the communication protocols with GeoServer
- Creodiaslib: implements methods to facilitate research of images in the CreoDIAS
catalog
- Rest services: provides access to monetdb from outside the platform.
- Integration scripts for each data analytic algorithms.
1.2.1 GeoServer
GeoServer [1] is an open-source server written in Java that allows users sharing, processing and
editing geospatial data. Designed for interoperability, it publishes data from any major spatial data
source using open standards. GeoServer functions are the reference implementation of the Open
Geospatial Consortium Web Feature Service standard, and also implements the Web Map Service, Web
Coverage Service and Web Processing Service specifications.
GeoServer can be considered both as a processing tool and a service catalogue. Its main use is to
distribute georeferenced data by implementing the OGC standards (WFS, WMS, WCS…). It also
implements the OGC WPS standard, as such can be used as a processing service catalogue.
In the context of CANDELA application, the following functionalities of GeoServer are used:
• Definition of new processing services
• Execution of processing services through WPS standard through a WPS extension of GeoServer
• REST API
Version 2.14-RC is deployed on the platform.
1.2.2 Keycloak
User management in the CANDELA platform is ensured by reusing an off-the-shelf component deployed
on the cluster, called Keycloak [2]. Keycloak is an open source identity and access management system
providing a simple Single-Sign-On solution. Users authenticate with Keycloak rather than doing so on
each individual CANDELA component. This means that the components don't have to deal with login
forms, authenticating users, and storing users. Once logged-in to Keycloak, users don't have to login
again to access a different application.
Keycloak can connect to various sources of authorized users (LDAP, Active Directory, RDBMS "Social
login"...). In the CANDELA configuration, it is configured to store users in a dedicated PostgreSQL
database pod saving its content on the cluster filesystem. New users are added by a Keycloak
administrator through the management console or through a dedicated API. User accounts are
initialized with a random password that the user will change at its first connection. The admin has no
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 10 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
access to user passwords by design. The Keycloak server can be connected to an SMTP server to
automatize the registration and password reset processes.
CANDELA components are connected to Keycloak through the standard OAuth 2 protocol. OAuth 2
clients such as the Jupyter Hub component are registered by an administrator over the Keycloak
management interface or API, and are given a client ID and secret, corresponding to an origin URL and
a call-back URL.
When trying to authenticate a user, the client authenticates itself to Keycloak with its Id and Secret, the
origin URL and the call-back address given by the client is verified against Keycloak registered
information. When client identity is ensured, the user is redirected to a login page. When user identity
is ensured Keycloak calls back the client with an authorization and refresh token. Authorization token
can be used by the client to get additional information about the user. Refresh token is used to generate
a new token for the user without it having to go through the login process.
1.2.3 JupyterHub
The JupyterHub [4] project is a Jupyter [3] sub-project adding a multi-user layer to the Jupyter core
server with an authentication system that allows using it efficiently in a business environment.
JupyterHub is composed of:
• A Hub component, managing the multi-users connections, with their specific access rights and
password.
• A frontend proxy, routing request to the Hub and creating Jupyter server instances specific for
each user. The proxy is then in charge of transferring the incoming requests to the corresponding
Jupyter server.
• Several standard Jupyter servers.
The action of creating a Jupyter server specific for a user is called spawning. In the Hub, a specific
module, the Spawner, handles this action. Several implementations exist for this module according to
the strategy chosen to spawn the Notebook servers: local or remote spawning based on cluster
management software (Torque, PBS...), on Docker, on Kubernetes… The spawner implementation
installed on the CANDELA platform is based on Kubernetes.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 11 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
A specific module handles the user management on the hub. As for the spawning, several
implementations of this module exist: based on the UNIX users, on the OAuth protocol or on LDAP. LDAP
is the adopted solution for the platform, as it is the technology used for the Identity and Authorization
Manager.
A specific Jupyter instance is created every time a user launches the Notebook feature in the platform.
Thus, by default the workspace of this instance is empty. Different solutions exist to enable a persistent
workspace. On the platform, instance spawning is based on Kubernetes, and thus by extension on
Docker containerization. Each newly created instance is a new Docker container running on the
Kubernetes platform. Kubernetes/Docker allows configuring volumes, i.e. folders shared between
containers, or between a container and the host system. The strategy to make the user workspace
persistent on JupyterHub is to create a volume mapping the JupyterHub workspace folder with the user
workspace folder currently used on the platform.
For discovering data, CreoDIAS provides access to metadata through a Data Finder API [5]. This is an
HTTP WS API that is accessible for free and anonymously.
The collections available are:
• Sentinel1
• Sentinel2
• Landsat8
• Landsat7
• Landsat5
• Envisat
For accessing data, a s3fs volume is mounted on the platform, making directly accessible the EO data
provided by CreoDIAS.
The mount point is /s3fs, and from this folder the following collections are available:
1.2.5 MonetDB
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 12 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
1.2.6 PostGIS
PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for
geographic objects allowing location queries to be run in SQL (Structured Query Language). In addition
to basic location awareness, PostGIS offers many features. PostGIS adds extra types (geometry,
geography, raster and others) to the PostgreSQL database. It also adds functions, operators, and index
enhancements that apply to these spatial types. These additional functions, operators, index bindings
and types augment the power of the core PostgreSQL DBMS (Data Base Management System), making
it a fast, feature-plenty, and robust spatial database management system.
PostGIS is used by the semantic search engine web application provided by IRIT.
The different partners in Candela provide different type of components to the platform:
• IRIT provides a semantic search application
• TAS France and TAS Italy provide change detection algorithms
• DLR provides a tool for semantic classification of satellite images
These different types of components imply a different type of integration on the platform.
The semantic search web application provided by IRIT is deployed on a Tomcat webserver. The
application has access to the Postgis database. Both the Postgis database and the webserver are
deployed as docker containers on Kubernetes.
The administrator user can access to the filesystem of the container using WEBDAV protocol.
For administrations purpose the Postgis database is accessible from outside the candela platform using
any client compatible with this database.
In this part it is described how it is integrated the change detection algorithms from TAS France and TAS
Italy.
Data analytics algorithms are delivered by service providers as Docker containers, in addition with a
JSON description of inputs/outputs of the service. Once integrated on the CANDELA platform, we talk
about processing services. A GeoServer and Kubernetes API are used to parameterize, launch and
monitor executed services. Each service Docker is manually built, and the Docker image is created and
ready to be launched through the Kubernetes API.
GeoServer provides the ability to discover, execute and manage processing services through an OGC
Web Processing Standard (WPS) interface. Users can then interact with processing services with WPS
requests to the GeoServer instance. The WPS standard also allows to chain processing services, creating
a processing pipeline of services. GeoServer handles the chaining of the outputs of one service as inputs
of other services and runs each service of the pipeline step by step.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 13 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Figure 4: CANDELA platform processing pipeline
For each processing service, based on the JSON description, a corresponding processing script describing
the inputs and outputs of the processing service is manually deployed in GeoServer. The GeoServer
exposes the service, thanks to its WPS plugin. The service is then retrieved when performing a
“GetCapabilities” request to GeoServer. This kind of request is part of the WPS standard and enables
users to list all the WPS services provided by a WPS endpoint and to get the metadata required to invoke
them.
When GeoServer receives an "ExecuteProcess" WPS request, the script is parameterized with the WPS
request inputs and GeoServer launches the Execution script corresponding to the processing service.
The script sets the environment of the processing service, sends a scheduling order to the Kubernetes
API with the corresponding Docker image, and monitors the execution of the resulting container.
During the execution of the service, a repository is created with the id of the execution and contains
resulting files processed by the service and log files. User can interact with the file system and gather its
results.
The semantic classification tool provided by DLR is an application composed of different parts:
• The Data model generation algorithm
• MonetDB
• User interface
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 14 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
The data model generation is an algorithm that perform automatic semantic classification on sentinel 1
and 2 images. It produces a SQL file used to enrich the database and a set of jpg files used in the user
interface. This algorithm is integrated on the platform in the same way as algorithms for TAS France and
TAS Italy. The main difference is that the algorithm needs an access to monetDB.
MonetDB is deployed in a container and is accessible from the user interface using REST services.
Examples of utilization of these services are presented in section 3.1.6. The database can also be
accessed directly from a notebook environment. Two possibilities exist to interact with the database
from Jupyter-Lab. The first one is to use the pymonetdb library that allow to access to the database from
a python script. This is shown in section 3.1.6. The command line client for monetDB, mclient, is also
available from a terminal within Jupyter-lab.
The result of the DMG process can be downloaded from the user interface as an archive containing all
the files produced.
At the end of the execution of a DMG process two log files are produced:
• Dlr.log gives information about the process execution
• Eominer.log contains the console output of the application.
The output of the application is a sql file and a set of jpg files. These files are grouped in a tar.gz archive.
This archive can be downloaded using the Jupyter-Lab environment and used locally in the user interface
part of the EOminer application.
One feature of CANDELA is to enable users to execute processing tools on a remote platform. In general,
processing tools are black boxes: pieces of code packaged and integrated on the platform that cannot
be explored. The CANDELA development environment goal is to give the users the capacity to work at a
lower level. It enables users to develop their own code and execute it on the platform with full access
to the platform computation resources and data repository.
Jupyter Notebook [2] is the technology used to allow user to interact with CANDELA’s server
components.
Jupyter enables users to manipulate notebook documents. A document is an HTML file containing code,
textual information and additional metadata (execution language, version…). From the user point of
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 15 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
view, a document is a sequence of cells. A cell can contain code or rich text information encoded with
markdown syntax. Each cell can be executed independently. An execution context is managed by the
server to keep in memory all variables defined in a previously executed cell.
Jupyter is a remote development environment available for the users from their browser that allows
writing code and executing it on a server machine.
The notebook documents are stored on the server machine. They can be downloaded by the user to be
kept locally or shared with other users.
There are several obvious benefits of such an approach. First, users do not need to install anything in
their local machine. They can run Python scripts without any local Python installation for instance.
Moreover, programmes executed in the Notebook environment can access data located on the
Notebook server. There is no need to download locally all the data. When dealing with big amounts of
data, it is possible to execute code that filters, selects or reduces them, and transfers only small amounts
to the user machine for displaying.
The core Notebook server is responsible for routing the client request and managing the Notebook
documents. The actual execution of the code is performed by components installed in addition to the
core server. The basic Jupyter installation provides a Python 2.7 kernel. To execute code from any other
language, additional kernels should be installed and configured. When installing a language specific
kernel, it is possible to install additional libraries so that users can use them natively in their Notebook.
Targeted languages and additional libraries are listed in the following table:
Table 1: Jupyter main kernels
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 16 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
1.4.1 Wpslib
A Python library is made available from user’s Notebook environment, for interacting with the WPS
processing services. It offers facilities for launching processes and interact with them. It is built on top
of the OWSLib [6] that is a Python library for programming with OGC web services.
1.4.2 Creodiaslib
This library provides the user of notebook environment facilities for searching and retrieving products
in the CreoDIAS catalog.
The following schema presents the interactions between the system components.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 17 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
service, that can be handled by GeoServer and eventually access to CreoDIAS EO data through a S3fs
volume (5) that have been mounted on the system.
The DMG process from DLR, used to perform semantic classification on images produces a set of images
and structured information that is stored in the monetDB database (6).
The semantic Search tool provided by IRIT is composed of web application hosted on a tomcat server
which used a PostGIS database as a backend (7). The user can access to the application using a web
browser (8). The administrator has a private access to write files on the tomcat server using WEBDAV
protocol and a direct access to the PostGIS database (9).
The jupyter notebook user can also access to monetDB and PostGIS from its notebook using pymonetdb
and psycopg2 libraries (10, 11).
Two REST services have been developed to access to monetDB: one performing select request the other
update requests.
The interfaces presented in Figure 6 are described in the following table:
Table 2: Component interfaces overview
Protocol /
# Components involved Description
Standard
Access to WPS operations
1 Front-end GeoServer HTTP/WPS - GetCapabilites
- DescribeProcess
2 Front-end Keycloak HTTP Administration
3 Front-end JupyterHub HTTP Administration
JupyterLab – interaction with WPS
4 Front-end Notebook HTTP
processing services
GeoServer web services, based on OGC
5 Webservices GeoServer HTTP/WPS
WPS standard.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 18 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
2 Integration and validation strategy
The integration and validation process, strategy and infrastructure are described in the following
sections.
The following roles have been identified in the integration and validation process:
• Development teams
Several development teams are working in parallel, with different purposes. Two kinds of
development teams have been identified:
o Algorithm providers, who are in charge of providing the processing algorithms
described in section 1.2.5
o Platform provider, who is in charge of providing the CANDELA dedicated platform
• Integration team, who is in charge of the following tasks:
o Defining integration infrastructure as described in section 2.3
o Defining integration test cases as described in section 3
o Integrating all components into a platform as described in section 2.1.2.2
o Running integration tests into integration infrastructure and reporting test results
and associated issues.
• Validation team, who is in charge of the following tasks:
o Defining validation tests
o Running validation tests and reporting test results and associated.
• User, who is a final user of the deployed application.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 19 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
2.1.2 Integration and validation workflow
The following schema summarizes the integration and validation workflow.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 20 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
2.1.2.2 Integration phase
The integration phase aims at testing the technical integration and deployment of components into a
testing infrastructure similar to the production environment. Integration tests are performed by the
integration team in order to ensure a correct deployment of the components and valid interactions
between the components.
The inputs of the integration phase are the following:
• Common data identified from processing services expected inputs
• Sources or the processing services applications
• Library for interacting with the processing services
As soon as these inputs are available, the integration phase is launched: it consists in applying the
integration strategy described section 2.2 and for the integration team to run the tests described in
section 3.
The integration environment is described in section 2.3.1.
The functional validation phase is performed once the integration phase is successful, which means that
all integration tests have been run without any remaining blocking or major issue.
The objective of the functional validation phase is for the validation team from WP1 and WP2 to test the
functional behaviour of the platform, through Jupyter Notebooks.
The functional validation environment is described in section 2.3.2.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 21 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
2.2 Integration strategy
The figure below describes the steps for the integration of the CANDELA platform.
The first step is the deployment of Kubernetes environment on the CloudFerro infrastructure platform.
On top of this environment,
• Data analytics algorithms can be integrated into GeoServer components as WPS processing
services, performing the following steps:
o First the script provided as source code by service providers is encapsulated into a
Docker container, with inputs, outputs and launching commands clearly identified,
o Then this Docker is registered into platform Docker registry in order to be accessible
for launching.
o The processing service is integrated into GeoServer component as a
GeoServerProcess calling the Docker files with correct mapping of input and output
directories on the distributed file system.
• Data connectors are integrated into the platform
• Keycloak tool is necessary for the accounts creation
• JupyterHub is integrated, providing Jupyter Notebooks for users to interact with the platform
After the integration of those components, it is possible to create an account to a new user allowing him
to connect to its Jupyter instance and interact with the platform through Notebooks.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 22 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
2.3 Integration and validation test infrastructure
The following schema represents the architecture of a CANDELA environment, as introduced already in
the System Architecture document [7]. The environment is composed of
• One “bounce” machine, i.e. a machine whose role is to route all the user access from outside
and to handle security issues,
• Several computation machines, where the Kubernetes cluster is deployed. The cluster is always
composed of one Kubernetes master machine and several Kubernetes worker machines. The
number of worker machine is arbitrary and can even be dynamically adapted according to the
computation needs. The CANDELA cluster is configured to always have at least 2 worker
machines to be able to host permanently the basis of the platform.
• A storage unit, shared between all the Kubernetes machines, to host the input and output
dataset handled by the CANDELA processing algorithms.
candela-bounce
Bounce machine
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 23 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Figure 11: Overview of the integration and validation environments
According to the integration and validation workflow described section 2.1.2, several environments are
necessary:
• One dedicated development environment for each development team (handled by the team
itself). These environments are not hosted on a cloud infrastructure.
• An integration environment available for integration team during integration phase.
• A functional validation environment available for validation team during validation phase.
• In projects aiming at reaching real end-users, a production environment is also required in the
last stages of the project, to start testing the platform in real use conditions. The utility of such
a production environment for the CANDELA project is not assessed at all, as it mainly aims at
being of proof of concept and technological sandbox to validate cloud scaling capabilities. The
possibility to have this third environment is kept as an option depending on the needs observed
in the project in its next steps.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 24 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
3 Integration tests
3.1 Components deployment
3.1.1 GeoServer
• Test objective: Ensures the following list of WPS processes are deployed into GeoServer
• Test Id: CANDELA_INT_TEST_3112_DEPLOYMENT_ GEOSERVER_WPS
• Prerequisites:
o CANDELA_INT_TEST_3111_DEPLOYMENT_GEOSERVER_COMPONENT successful
• Test steps:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 25 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
3.1.2 Keycloak
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 26 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
• Prerequisites:
o CANDELA_INT_TEST_3121_DEPLOYMENT_KEYCLOAK_COMPONENT successful
• Test steps:
# Description Expected result
3 Select Clients list page in the left menu bar JupyterHub and GeoServer are
in the clients list
• Interfaces under tests: N/A
3.1.3 JupyterHub
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 27 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
3
• Interfaces under tests: N/A
3.1.4 Semsearch
3.1.5 PostGIS
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 28 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
Execute:
3 Returns ‘ep’
myConnection.info.dbname
• Interfaces under tests: N/A
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 29 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
Execute:
4 Returns ‘ep’
myConnection.info.dbname
• Interfaces under tests: N/A
3.1.6 MonetDB
• Test objective: Ensures the availability of MonetDB through the REST API
• Test Id: CANDELA_INT_TEST_3161_DEPLOYMENT_MONETDB _COMPONENT
• Prerequisites:
o Monetdb component is deployed
o Curl installed on local computer
• Test steps:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 30 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
1 Launch a terminal
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 31 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 32 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
Access Notebook Server through direct URL The Notebook Server starts
1
<<GeoServer URL>> and is accessible
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 33 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
4 Click in the cell containing the Python code The code is executed and display “Python
kernel is running”
Click on the play button on top of the title
• Test objective: Ensures that CreoDIAS data is accessible from the platform
• Test Id: CANDELA_INT_TEST_331_CREODIAS_DATA_CONNECTOR
• Test steps:
# Description Expected result
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 34 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
4 Processing services
In this section it is presented the first basic test of algorithms proposed by the partners. Those tests will
also test the custom Python library wpslib, the Notebook Server with the Python Kernel, and the
GeoServer processing services.
• Test objective: Ensures that the Change Detection, Change Index and Change Clustering
processes run correctly
• Test Id: CANDELA_INT_TEST_411_CHANGE_DETECTION_PROCESSES_SEPARATELY
• Test steps:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 35 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
4 Run the cell containing the Python code below The code is executed without error
#4.1.1.4 test the Change Detection Process The folder
/work/tests/test_change_detection_chain/
contains a recent file named
test_change_detection.tif
5 Run the cell containing the Python code below The code is executed without error
#4.1.1.5 test the Change Index Process The folder
/work/tests/test_change_detection_chain/
contains a recent file named
test_change_index.tif
6 Run the cell containing the Python code below The code is executed without error
#4.1.1.6 test the Change Clustering Process
The folder
/work/tests/test_change_detection_chain/
contains a recent file named
test_change_clustering.tif
• Interfaces under tests: N/A
• Test objective: Ensures that the Change Detection processing pipeline runs correctly
• Test Id: CANDELA_INT_TEST_412_CHANGE_DETECTION_PROCESSING_PIPELINE
• Test steps:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 36 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
4 Run the cell containing the Python code below The code is executed without error
#4.1.2.4 test the Change Detection Processing The folder
Pipeline /work/tests/test_change_detection_pipeline
/ contains a recent file named
test_change_clustering.tif
• Interfaces under tests: N/A
• Test objective: Ensures that the Split Image and Merge Images processes run correctly
• Test Id: CANDELA_INT_TEST_421_SPLIT_MERGE_IMAGE_PROCESSES
• Test steps:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 37 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
4 Run the cell containing the Python code below The code is executed without error
#4.2.1.4 test the Split Images Process The folder /work/tests/test_SplitImages/
contains a /subtiles folder containing sub-
images
5 Run the cell containing the Python code below The code is executed without error
#4.2.1.5 test the Merge Images Process The folder /work/tests/test_MergeImages/
contains the resulting .tif file merged
• Interfaces under tests: N/A
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 38 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
4 Run the cell containing the Python code below The code is executed without error
#4.2.2.4 test the Jpeg2Tiff Process The folder /work/tests/test_jpeg2tiff/
contains a recent result.tif file
• Interfaces under tests: N/A
• Test objective: Ensures that the SAR change detection runs correctly
• Test Id: CANDELA_INT_TEST_431_SAR_CHANGE_DETECTION
• Test steps:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 39 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
5 Run the cell containing the Python code The code is executed without error
The folder config contains two log files
The folder output/CD_MAPS contains the
image result
The folder output/CROP_IMG contains two
images
The folder output/LOGS/LOG contains
CANDELA_LOG.log file
The folder output/QLK contains two gtif and
two kml files
• Interfaces under tests: N/A
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 40 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
# Description Expected result
2 Connect with your user credentials User is connected to its Notebook Server
5 Run the cell containing the Python code The code is executed without error
The folder eominer_logs contain two log files
The folder eominer_output/S1_product
contains a file ingestion.sql, a file
EOLib_S1_product.xml and a lot of jpg
images
• Interfaces under tests: N/A
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 41 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
5 Integration deployment environment
The following table detail the Kubernetes configuration defined for the components of the platform. For
each component a Kubernetes service is defined to make the interaction with it from inside and outside
the environment possible. Volumes are also defined to make some data persistent (component
configuration, user data...).
The detailed configuration can be found on the Git repository of the project.
Table 3: Kubernetes configuration
Name Value
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 42 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
6 Conclusion
This document presented a first version of the system integration and validation test plan. It describes
the system components and the interactions between them, the integration strategy, the environment
in which the components are tested and the integration tests that can be performed to validate the
system.
This first version mainly focusses on the technical basis of the CANDELA platform: the IaaS and PaaS
layers, the components providing generic services (authentication, computation capabilities, standard
interfaces…).
D3.5 v1 (released in November 2018) has been updated following the requirements of the first project
review meeting. This updated version includes new standard components integrated on the platform,
details on how the algorithms and partners’ applications are integrated in the platform, update of the
component interaction section or the description of new test cases. Annexes have been also
complemented with two new examples of python test scrips.
Next version should include a validation test plan related to the test cases running on the platform. First
on a technical basis, validating that the algorithms ran on the platform works properly, and then on
functional basis, validating that the algorithms fulfil the needs of the described use cases.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 43 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
References
[1] GeoServer, http://geoserver.org, retrieved 2018/11/26
[2] Keycloak, https://www.keycloak.org/, retrieved 2018/11/26
[3] Jupyter Notebook, http://jupyter.org, retrieved 2018/11/26
[4] JupyterHub sub-project, http://jupyter.org/hub, retrieved 2018/11/26
[5] CreoDIAS Data Finder API https://creodias.eu/eo-data-finder-api-manual, retrieved 2018/11/26
[6] OWSLib API https://geopython.github.io/OWSLib/ , retrieved 2018/11/26
[7] CANDELA Deliverable D3.1 System architecture design and Operational scenarios document v1,
dated 2018/10/29
[8] F. Castel, “D3.3 CANDELA Platform v1”, Deliverable of the CANDELA project, 2018, retrieved
20190524
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 44 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Annexes
Annex I: Notebook server test script
# coding: utf-8
# # A test to check that the Python kernel is running
# coding: utf-8
#4.1.1.4 test the Change Detection Process
import wpslib
wpslogger = wpslib.getLogger(True)
identifier = 'candela:ChangeDetectionProcessing'
PROCESS_ID = "changedetection-timeseries"
inputs = [("IMAGES","/public/test-files/Images/Harbour/TimeSeries/"),
("PROCESS_ID",PROCESS_ID),
("OUTPUT_FOLDER","/work/tests/test_change_detection_chain/"),
("CONFIG_FOLDER","/work/tests/test_change_detection_chain/config/"),
("OUTPUT_FILENAME","test_change_detection.tif")
]
outputs = [('outpath',True),('logfiles',True)]
identifier = 'candela:ChangeIndexProcessing'
PROCESS_ID = "changeindex-timeseries"
inputs =
[("IMAGE","/work/tests/test_change_detection_chain/test_change_detection.tif"),
("PROCESS_ID",PROCESS_ID),
("OUTPUT_FOLDER","/work/tests/test_change_detection_chain/"),
("CONFIG_FOLDER","/work/tests/test_change_detection_chain/config/"),
("OUTPUT_FILENAME","test_change_index.tif")
]
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 45 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
#4.1.1.6 test the Change Clustering process
identifier = 'candela:ChangeClusteringProcessing'
PROCESS_ID = "changeclustering-timeseries"
inputs = [("IMAGE","/work/tests/test_change_detection_chain/test_change_index.tif"),
("PROCESS_ID",PROCESS_ID),
("OUTPUT_FOLDER","/work/tests/test_change_detection_chain/"),
("CONFIG_FOLDER","/work/tests/test_change_detection_chain/config/"),
("OUTPUT_FILENAME","test_change_clustering.tif")
]
pipeline = []
identifier = 'candela:ChangeDetectionProcessing'
PROCESS_ID = "changedetection-timeseries"
inputs = [("IMAGES","/public/test-files/Images/Harbour/TimeSeries/"),
("PROCESS_ID",PROCESS_ID),
("OUTPUT_FOLDER","/work/tests/test_change_detection_pipeline/"),
("CONFIG_FOLDER","/work/tests/test_change_detection_pipeline/config/"),
("OUTPUT_FILENAME","test_change_detect.tif")
]
outputs = [('outpath',True),('logfiles',True)]
process1 = {
"PROCESS_ID": PROCESS_ID,
"IDENTIFIER": identifier,
"INPUTS": inputs,
"OUTPUTS": outputs,
"PREVIOUS_PROCESS": "",
"INPUT":"",
"PREVIOUS_VALUE": ""
}
pipeline.append(process1)
identifier = 'candela:ChangeIndexProcessing'
PROCESS_ID = "changeindex-timeseries"
inputs = [("PROCESS_ID",PROCESS_ID),
("OUTPUT_FOLDER","/work/tests/test_change_detection_pipeline/"),
("CONFIG_FOLDER","/work/tests/test_change_detection_pipeline/config/"),
("OUTPUT_FILENAME","test_change_index.tif")
]
process2 = {
"PROCESS_ID": PROCESS_ID,
"IDENTIFIER": identifier,
"INPUTS": inputs,
"OUTPUTS": outputs,
"PREVIOUS_PROCESS": "changedetection-timeseries",
"INPUT":"IMAGE",
"PREVIOUS_VALUE": "outpath"
}
pipeline.append(process2)
identifier = 'candela:ChangeClusteringProcessing'
PROCESS_ID = "changeclustering-timeseries"
inputs = [("PROCESS_ID",PROCESS_ID),
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 46 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
("OUTPUT_FOLDER","/work/tests/test_change_detection_pipeline/"),
("CONFIG_FOLDER","/work/tests/test_change_detection_pipeline/config/"),
("OUTPUT_FILENAME","test_change_clustering.tif")
]
process3 = {
"PROCESS_ID": PROCESS_ID,
"IDENTIFIER": identifier,
"INPUTS": inputs,
"OUTPUTS": outputs,
"PREVIOUS_PROCESS": "changeindex-timeseries",
"INPUT":"IMAGE",
"PREVIOUS_VALUE": "outpath"
}
pipeline.append(process3)
wpslib.runSinglePipeline(pipeline, wpslogger)
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 47 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Annex III: Data split, merge, transformation test script
# coding: utf-8
#4.2.1.4 test the Split Images Process
import wpslib
wpslogger = wpslib.getLogger(True)
identifier = 'candela:SplitImagesProcessing'
inputs = [("IMAGES","/public/test-files/Images/IMAGES_TerraNIS/im_2016.tif"),
("PROCESS_ID","test-splitimages-im_2016"),
("OUTPUT_FOLDER","/work/tests/test_SplitImages/"),
("N_SPLITS","6")
]
outputs = [('outpath',True),('logfiles',True)]
identifier = 'candela:MergeImagesProcessing'
inputs = [("IMAGES","/work/tests/test_SplitImages/subtiles"),
("IMAGE_NAME","im_2016.tif"),
("PROCESS_ID","test-mergeimages-im_2016"),
("OUTPUT_FOLDER","/work/tests/test_MergeImages/")
]
identifier = 'candela:Jpeg2TiffProcessing'
inputs = [("IMAGES","/eodata/Sentinel-
2/MSI/L1C/2018/09/11/S2A_MSIL1C_20180911T105621_N0206_R094_T30TXQ_20180911T131820.SAF
E/GRANULE/L1C_T30TXQ_A016822_20180911T110521/IMG_DATA/"),
("PROCESS_ID","test-jpeg2tiff"),
("OUTPUT_FOLDER","/work/tests/test_jpeg2tiff/"),
("OUTPUT_FILENAME","result.tif")
]
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 48 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Annex IV: Sar detection change test script
import os
import wpslib
wpslogger = wpslib.getLogger(True)
identifier = 'candela:SarChangeDetectionProcessing'
MEMORY_REQUEST = "10000Mi"
outputs = [('outpath',True),('logfiles',True)]
inputs = [("IMAGES",IMAGES),
("PROCESS_ID",PROCESS_ID),
("OUTPUT_FOLDER",OUTPUT_FOLDER),
("CONFIG_FOLDER",CONFIG_FOLDER),
("TILE_SIZE",TILE_SIZE),
("THRESHOLD",THRESHOLD),
("LOG_FILE_LEVEL",LOG_FILE_LEVEL),
("QLK_DIR",QLK_DIR),
("CROP_IMAGES",CROP_IMAGES),
("CHANGE_DETECTION_MAPS",CHANGE_DETECTION_MAPS),
("LOG_DIR",LOG_DIR),
("MEMORY_REQUEST",MEMORY_REQUEST)
]
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 49 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Annex V: EOminer DMG test script
import os
import wpslib
wpslogger = wpslib.getLogger(True)
INPUT = "/eodata/Sentinel-
1/SAR/GRD/2019/03/08/S1B_IW_GRDH_1SDV_20190308T171625_20190308T171650_015266_01C90B_2
269.SAFE"
OUTPUT = "/work/EOminer/eominer_output"
LOG_FILE_PATH = "/work/EOminer/eominer_logs"
identifier = 'candela:EOminerProcessing'
PROCESS_ID = "test-eominer-jupyter"
MEMORY_REQUEST = "10000Mi"
#Size of the tiles
TILE_SIZE = "120"
#gridLevels choose from (1,2,3)
GRID_LEVELS = "1"
#productType choose from (S1,S2)
PRODUCT_TYPE = "S1"
#featureMethods combine from (GLM,WLD,CHIS,GLC)
FEATURE_METHODS = "GLM"
outputs = [('outpath',True),('logfiles',True)]
inputs = [("INPUT",INPUT),
("PROCESS_ID",PROCESS_ID),
("OUTPUT",OUTPUT),
("LOG_FILE_PATH",LOG_FILE_PATH),
("MEMORY_REQUEST",MEMORY_REQUEST),
("TILE_SIZE",TILE_SIZE),
("GRID_LEVELS",GRID_LEVELS),
("PRODUCT_TYPE",PRODUCT_TYPE),
("FEATURE_METHODS",FEATURE_METHODS)
]
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 50 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Annex VI: CANDELA Service Providers Guide for service integration
<wps:ProcessOfferings>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>candela:ChangeClusteringProcessing</ows:Identifier>
<ows:Title>ChangeClustering</ows:Title>
<ows:Abstract><p>Computes a clustering of change types based
on a change index image.</p></ows:Abstract>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>candela:ChangeDetectionProcessing</ows:Identifier>
<ows:Title>ChangeDetection</ows:Title>
<ows:Abstract><p>Computes unsupervised change detection on a
time-series of sentinel 2 images.</p></ows:Abstract>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>candela:ChangeIndexProcessing</ows:Identifier>
<ows:Title>ChangeIndex</ows:Title>
<ows:Abstract><p>Computes unsupervised change index on a
time-series change detection maps.</p></ows:Abstract>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>candela:GeotiffCollectorProcessing</ows:Identifier>
<ows:Title>GeotiffCollector</ows:Title>
<ows:Abstract><p>Collect GeoTiff files into a
folder.</p></ows:Abstract>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>candela:Jpeg2TiffProcessing</ows:Identifier>
<ows:Title>Jpeg2Tiff</ows:Title>
<ows:Abstract><p>Convert JPEG 2000 files to a GeoTiff
format.</p></ows:Abstract>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>candela:TestProcessing</ows:Identifier>
<ows:Title>Test</ows:Title>
<ows:Abstract><p>Computes unsupervised change detection on a
time-series of sentinel 2 images.</p></ows:Abstract>
</wps:Process>
</wps:ProcessOfferings>
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 51 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
From this, we can perform a describeProcess request that will return the description of a process, which
inputs are expected, which outputs it returns…
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 52 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Here we can see that the expected inputs will be IMAGES, USERNAME, OUTPUT_FILENAME (optional),
and LOG_FILE (optional)
Those inputs parameters will be set as environment variables to the docker container that will run the
service.
Let’s see an example of request executeProcess that runs a service:
<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0"
xmlns="http://www.opengis.net/wps/1.0.0" xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:wfs="http://www.opengis.net/wfs"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>candela:ChangeDetectionProcessing</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>IMAGES</ows:Identifier>
<wps:Data>
<wps:LiteralData>/data/exchange/candela/common_data/test-
files/Images/Harbour/TimeSeries</wps:LiteralData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>USERNAME</ows:Identifier>
<wps:Data>
<wps:LiteralData>a.tonneau</wps:LiteralData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>OUTPUT_FILENAME</ows:Identifier>
<wps:Data>
<wps:LiteralData>changedetection_result_anso.tif</wps:LiteralData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>LOG_FILE</ows:Identifier>
<wps:Data>
<wps:LiteralData>logs_anso.log</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:ResponseDocument />
</wps:ResponseForm>
</wps:Execute>
Geoserver, receiving this request, will set up proper user environment (create folders, permissions,
environment variables…) and will run the corresponding docker image with that context. From the
docker container the appropriate volumes will be mounted, and the parameters are read from
environment variables.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 53 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
How to properly package an app to a service
You need to create a Docker configuration in order to build a Docker image that will be used to run a
Docker Container on demand.
An example of packaging of a simple service ExampleService is given here:
Here this is a Python app. The main code of the app is located in main.py, and the libraries are located
in /common_lib
The Dockerfile defines the configuration for creating a Docker image:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 54 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Best practices
• Inputs parameters
Configuration or internal parameters can be written into a parameters file copied in the docker container
to be read.
For input parameters that will be given by the user who wants to run a service: This is important to
carefully document the needed inputs parameters, and, from the application, to read them from
environment variables. You can see in run.sh example how we set the parameters.
See this example from the main.py that is the main script of the application ExampleService, that shows
how we retrieve the inputs parameters from the environment:
• Logs
Another important thing is to set proper logging system: it is mandatory for the app to write logs in a log
file that is stored in the file system and that is accessible outside the docker container, therefore the
user can get logs during and after its service run.
A convention is to set up LOG_FILE, CONFIG_FOLDER and OUTPUT environment variables, and to create
the log file with the name LOG_FILE in the folder CONFIG_FOLDER.
See this example from the params.py of the application ExampleService, that shows how we configure
the logging in the app:
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 55 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
The OUTPUT variable is used as the output folder of the algorithm.
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 56 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final
Examples
• build.sh example
• run.sh example
Document name: D3.5 System Integration and Validation Test Plan v1 Page: 57 of 57
Reference: D3.5 Dissemination: PU Version: 1.3 Status: Final