Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

venicegeo/pz-ingest

Repository files navigation

pz-ingest

The Ingest component is the internal component that handles the loading of spatial data. This component is capable of referencing data held in external locations, such as another accessible S3 file store; or loading data specified by the user to be stored directly within Piazza. The Ingest component receives RabbitMQ messages from the Gateway, with the information as to the file to be stored. It then inspects the data to validate and populate metadata fields (such as Area of Interest) and then stores this metadata within the Piazza PostgreSQL instance.


Requirements

Before building and/or running the pz-search-query service, please ensure that the following components are available and/or installed, as necessary:

Ensure that the nexus url environment variable ARTIFACT_STORAGE_URL is set:

$ export ARTIFACT_STORAGE_URL={Artifact Storage URL}

For additional details on prerequisites, please refer to the Piazza Developer's Guide Core Overview or Piazza Ingest sections. Also refer to the prerequisites for using Piazza section for additional details.


Setup, Configuring, & Running

Setup

Create the directory the repository must live in, and clone the git repository:

$ mkdir -p {PROJECT_DIR}/src/github.com/venicegeo
$ cd {PROJECT_DIR}/src/github.com/venicegeo
$ git clone [email protected]:venicegeo/pz-ingest.git
$ cd pz-ingest

Note: In the above commands, replace {PROJECT_DIR} with the local directory path for where the project source is to be installed.

Configuring

As noted in the Requirements section, to build and run this project, RabbitMQ and PostgreSQL are required. The src/main/resources/application.properties file controls URL information for connection configurations.

Running

To run the Loader service locally (without Vagrant), perhaps through Eclipse or through CLI, navigate to the project directory and run

$ mvn clean install -U spring-boot:run

This will run the application on port 8084 of the machine.

NOTE: This Maven build depends on having access to the Piazza-Group repository as defined in the pom.xml file. If your Maven configuration does not specify credentials to this Repository, this Maven build will fail.

Running Unit Tests

To run the Piazza ingest unit tests from the main directory, run the following command:

$ mvn test