Skip to content

Development Env Setup

Chris Newman edited this page Mar 25, 2019 · 10 revisions

To make things easy, we're moving as much setup as possible to Docker. Download Docker here.

Current Roadmap

  • Move database and service tier to Docker (done 3/25/2019)
  • Convert existing UI tier to Angular (est. 4/15/2019)
  • Dockerize UI tier (4/15/2019)

Docker Installation/Setup

Once you've installed Docker and Maven (version 3+, execute the following commands from the project root:

  • git checkout dev
  • mvn clean install
  • docker-compose up
  • cd database
  • mvn clean install -Preset-db

Test that everything's running by hitting http://localhost:8280/inventory/rest/catalogService/ping in a browser.

From this point you can start working on services, break and debug on an IDE, etc.

Manual Installation/Setup

This is for reference and no longer being updated or guaranteed to be accurate. DOCKER IS THE WAY TO GO!

This is an environment setup for the landing page. Most things you'll need (e.g. Tomcat, MySQL, Apache) can be downloaded and installed via yum, npm, etc. - but for my Windows environments I tend to just download the packages and install them directly.

The following instructions assume you've cloned/forked the greenmaven repository and have installed JDK 1.8 and Maven.

Database Installation:

Services Installation:

  • Install Tomcat 8 or newer
  • Add the minimal CORS filter to <tomcat_install>/conf/server.xml
  • cd <greenmaven_root>/landing-page/landing-page-service
  • mvn clean install
  • copy <greenmaven_root>/landing-page/landing-page-service/target/landing-page.war to <tomcat_install>/webapps
  • Start tomcat

Externalized Properties (Krausening)

  • You'll need to create properties file/folders and update your Tomcat startup script. See this Gist. Below is the quick and dirty:
  • Create folders 'base' and 'localhost' in <tomcat_install>/conf/krausening
  • Add a file farmhacker.properties to each folder
  • Set the contents of that file as shown in the Gist
  • Add set JAVA_OPTS=-DKRAUSENING_BASE="C:/dev/tomcat8/conf/krausening/base" -DKRAUSENING_EXTENSION="C:/dev/tomcat8/conf/krausening/localhost" to Tomcat's startup.[bat/sh] file,

Web/UI Installation:

  • Currently everything's running with Polymer. CD to the UI folder (e.g. inventory/inventory-ui/src/main/webapp/inventory) and run polymer serve --open