Giter VIP home page Giter VIP logo

mlr-legacy-service's Introduction

MLR-Legacy-Service

Monitoring Location Legacy CRU Service

Database Configuration

You will need a postgreSQL database to run this application. A Dockerized version is available at https://github.com/USGS-CIDA/MLR_Legacy_DB. The connection configuration is located in src/main/results/application.yml. You will need to create an application.yml file in your local project's root directory to provide the variable values. It should contain:

mlrLegacyDbHost: localhost
mlrLegacyDbPort: 5435
mlrLegacyDataUsername: mlr_legacy_data
mlrLegacyDataPassword: changeMe
mlrLegacyServicePassword: changeMe

Automated Testing

This application has two flavors of automated tests: unit tests (in the gov.usgs.wma.mlrlegacy package) and integration tests (in the gov.usgs.wma.mlrlegacy.db package) requiring a database. The unit tests can be run in isolation according to your normal practices. The integration tests can be run in a terminal with the maven command mvn verify -P it in the project's root directory. Running in this manner will pull the database Docker image from the central repository and run it in a container. They can also be run in your IDE against a database accessible to you. (Note that you should not use a shared database as the tests will destroy data and may have contention issues with other processes accessing the database.) In either case, configuration information will be pulled from the maven setting.xml file. It will need to contain the following profile:

  <profile>
    <id>it</id>
    <properties>
      <postgresPassword>changeMe</postgresPassword>
      <mlrLegacyPassword>changeMe</mlrLegacyPassword>
      <mlrLegacyDataPassword>changeMe</mlrLegacyDataPassword>
      <mlrLegacyUserPassword>changeMe</mlrLegacyUserPassword>
      <mlrLegacyDataUsername>mlr_legacy_data</mlrLegacyDataUsername>
      <mlrLegacyServicePassword>changeMe</mlrLegacyServicePassword>
    </properties>
  </profile>

Running the Application

Open a terminal window and navigate to the project's root directory. Use the maven command mvn spring-boot:run to run the application. It will be available at http://localhost:8080/monitoringLocations in you browser.

Swagger documentation is available at http://localhost:8080/swagger-ui.html

ctrl-c will stop the application.

Using Docker

To build the image you will need to provide the location of the jar within https://cida.usgs.gov/artifactory/mlr-maven/gov/usgs/wma/mlrLegacy as follows:

% docker build --build-arg mlr_version=0.8-SNAPSHOT .

To run the image, you will need to provide as environment variables the variables listed above. The application will be available on part 8080 within the container.

mlr-legacy-service's People

Contributors

mbucknell avatar dsteinich avatar kmschoep-usgs avatar ayan-usgs avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.