You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

(Work in Progress) 

  1. Install Java 1.8 
  2. Install git
  3. Clone repository from: https://opensource.ncsa.illinois.edu/bitbucket/projects/GEOD/repos/geo-temporal-api-v2/browse (git clone repositoryUrl)
  4. In Intellij Import project from external model, select sbt. Leave default options 
  5. Install Scala and Play plugins on Intellij 
  6. Download postgres from your operating system: https://www.postgresql.org/download/  or https://postgresapp.com/ (Mac)
    1. Clone a database from one of the dev machines:


      Ingest Database
      # from https://gist.github.com/brock/63830f11c0945f82f9ea
      curl -o pg_extract.sh https://gist.githubusercontent.com/brock/63830f11c0945f82f9ea/raw/ff164b14311de62ee475d1612f1e80e4df6edc15/pg_extract.sh
      chmod 755 pg_extract.sh
      
      # get the database
      scp isda:/home/shared/clowder/seagrant-dev/postgresql/dumpall.sql.gz seagrant-dev.sql.gz
      gunzip seagrant-dev.sql.gz
      
      # split the database (takes a while)
      ./pg_extract.sh seagrant-dev.sql
      # should see names of databases:
      # Evaluating geostream...
      
      # load database (In the line below clowder can be updated for your username on your machine)
      # geostream will be the name of the database. It can be the name that you prefer, just use the same name in the next line as well and see step 8.a to update the configuration file
      createdb geostream -O clowder
      
      psql -d geostream  < seagrant-dev.sql
      
      
  7. Start your postgres db 
  8. In your geostreams-api-v2 directory you need to create a file conf/application.conf (This file will be where you can override the configuration file in conf/reference.conf)
    1. If you change the name of the database (Instead of geostreams in the last 2 instructions you use something like seagrant-dev) in your conf/application.conf you need to add: 
      db.default.url="jdbc:postgresql://localhost/seagrant-dev"
  9. In a terminal, Cd to the geo-temporal-api-v2 repository and execute 'sbt run'

  • No labels