The pz-access project provides REST services that are responsible for handling access to data - either by requesting metadata, requesting file downloads, or requesting GeoServer deployments of data. When requesting GeoServer deployments of loaded data into Piazza, the Access component will transfer the appropriate files over to the GeoServer data directory, and then create a deployment lease that provides a guarantee for a certain length of time that the data will be available on the Piazza GeoServer instance.
Before building and running the pz-access project, please ensure that the following components are available and/or installed:
- Java (JDK for building/developing, otherwise JRE is fine)
- Maven (v3 or later)
- Git (for checking out repository source)
- Eclipse, or any maven-supported IDE
- RabbitMQ
- PostgreSQL
- GeoServer
- Access to Nexus is required to build
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 repository content for Core Overview or Piazza Access sections. Also refer to the prerequisites for using Piazza section for additional details.
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-access.git
$ cd pz-access
Note: In the above commands, replace {PROJECT_DIR} with the local directory path for where the project source is to be installed.
As noted in the Requirements section, to build and run this project, RabbitMQ, PostgreSQL, and GeoServer are required. The application.properties
file controls URL information for these components it connects to - mainly GeoServer. If you are intending to debug a local instance of GeoServer, then simply changing the appropriate vcap.services.pz-geoserver.* configuration values.
To build and run the Access service locally, pz-access can be run using Eclipse any maven-supported IDE. Alternatively, pz-access can be run through command line interface (CLI), by navigating to the project directory and run:
mvn clean install -U spring-boot:run
Note: This Maven build depends on having access to the
Piazza-Group
repository as defined in thepom.xml
file. If your Maven configuration does not specify credentials to this Repository, this Maven build will fail.