Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(Work in Progress) 

refer to Geostreams-api-v3 - Local

  1. Install Java 1.8 
  2. Install git
  3. Clone repository from: https://opensource.ncsa.illinois.edu/bitbucket/projects/GEOD/repos/geo-temporalgeostreams-api-v2v3/browse (git clone repositoryUrl)
  4. In Intellij Intellij 
    1. Import project from external model
    ,
    1. select sbt
    .
    1. 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)
  7. Clone a database from one of the

    dev

    DEV machines:

    Code Block
    languagebash
    titleIngest 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 and unzip
    scp isda:/home/shared/clowder/seagrant-dev/postgresql/dumpall.sql.gz seagrant-dev.sql.gz
    gunzip seagrant-dev.sql.gz
    
    # split the database (
    takes
    may take a while)
    ./pg_extract.sh seagrant-dev.sql
    # should see names of databases:
    # Evaluating geostream...
    
    # create and 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
     throughout these instructions 
    ## Note: This may not work as expected if you name with a "dash"
    ## - you may have to manually copy the contents of 'geostream' to your chosen database name 
    createdb geostream -O clowder
    
    psql -d geostream  < seagrant-dev.sql
    


  8. Start your postgres db 
  9. In your geostreams-api-v2 v3 directory you need to create and edit a file conf/application.conf (This file will be where you can override the configuration file in conf/reference.conf)
    1. Copy the entirety of conf/reference.conf to conf/application.conf ensure proper functionality  
    2. Update the play.filters.host in conf/application.conf to contain the proper allowed host for Geodashboard
    3. the application.conf on seagrant-dev has a copy under yanzhao3/
    4. If you changed the name of the database 
      1. i.e.: Instead of geostreams you
    5. If you change the name of the database (Instead of geostreams in the last 2 instructions you
      1. use something like seagrant-dev)
      in your conf/application.conf you need to add
      1. Add

      1. db.default.url="jdbc:postgresql://localhost/seagrant-dev"
  10. In a terminal,

    Cd to

    cd to the geo-temporal-api-v2

    repository

     repository and execute

    'sbt run'

    sbt run to start Clowder

    1. If you use Geodashboard, you may need to update links in the Geodashboard code

    2. Locations will vary based upon the version of Geodashboard 
  11. to setup geo-temporal-api-v2 on server with your local build ( application.conf & messages.en is under your local folder) 

    sudo rm -rf geo-temporal-api-v2/*
    sudo cp -r ~/geostreams-3.0.0-alpha.1/* geo-temporal-api-v2/.
    sudo cp ~/application.conf geo-temporal-api-v2/conf/.
    sudo cp ~/messages.en geo-temporal-api-v2/conf/.

    sudo chown clowder: geo-temporal-api-v2/bin/
    sudo chown clowder: geo-temporal-api-v2/lib/
    sudo chown clowder: geo-temporal-api-v2/conf/
    sudo chmod +r+w geo-temporal-api-v2/lib/*
    sudo chmod +r+w geo-temporal-api-v2/conf/*
    sudo chmod +r+x geo-temporal-api-v2/bin/geostreams
    sudo systemctl restart geostreams.service
    sudo journalctl -xe
    sudo lsof -i -P -n | grep LISTEN