Versions Compared

Key

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

...

In a first instance, we have installed SeisFinder v2 on dev01-quakecore. This is the machine where our beta testers will use it.

If you are using the To start testing on dev01-quakecore, enter:

Code Block
$ssh username@dev01-quakecore
username@dev01-quakecore:~$ cd /var/www/seisfinder2

And server, go straight to step Step 6 in the following installation instruction.

If you wish to test on your local machine, please follow the instructions from Pre-requirements.

Pre-requirements

The following version of software must be installed:

...

Sample CSV and Hazard data for populating the database are located at username@dev01-quakecore:/var/wwwrcc/home/projects/quakecore/seis2Data.

Type the following command and come back after lunch.

Code Block
# First, create a folder called 'private' under your git repository seisfinder2
$ cd seisfinder2
/seisfinder2$ mkdir private
 
# Then create a folder called 'data' under private/
/seisfinder2$ cd private
/seisfinder2/private$ mkdir data 
 
# General copy command: scp -r username@remoteserver:remote_path_to_copy_files local_path_to_put_copied_files.eg
# add sudo if permission denied
# if still permission denied, type the following command in the dev01-quakecore server to change permssion
username@dev01-quakecore $ sudo chmod 755 /var/www/seisfinder2rcc/home/projects/quakecore/seis2Data/private/data/cybershake17p8_csv
 
# Now copy files from remote server to your local machine
# cybershake17p8 csvs
scp -r gg999@dev01-quakecore:/rcc/home/varprojects/wwwquakecore/seisfinder2seis2Data/private/data/cybershake17p8_csv home/gg999/seisfinder2/private/data/
 
# darfield csvs
scp -r gg999@dev01-quakecore:/rcc/home/varprojects/wwwquakecore/seisfinder2seis2Data/private/data/darfield_csv home/gg999/seisfinder2/private/data/
 
# hazard data
scp -r gg999@dev01-quakecore:/rcc/varhome/projects/wwwquakecore/seisfinder2seis2Data/private/data/hazard home/gg999/seisfinder2/private/data/
 
# event data
scp -r gg999@dev01-quakecore:/rcc/varhome/projects/wwwquakecore/seisfinder2seis2Data/private/data/event home/gg999/seisfinder2/private/data/

...

Code Block
$cd seisfinder2
 
# if running local host
/seisfinder2 $ python manage.py runserver 
 
# if running from the dev01-quakecore server
# first change file permission if permission denied use:
/seisfinder2 $ sudo chmod 755 var/www/seisfinder2/rcc/home/projects/quakecore/seis2Data/private/data/cybershake17p8_csv 
# then 
/seisfinder2 $ sudo python manage.py runserver 132.181.39.127:8000
 
# else use 'ifconfig' to figure out the IP address of your server
 

...

Code Block
# The 'root_dir=' is the absolute path where you just put the copied data in step 4. Eg.
 
# local host:
http://127.0.0.1:8000/seisfinderapp/insert?root_dir=home/gg999/seisfinder2/private/data/cybershake17p8_csv&type=cybershake

# dev01-quakcore:
http://132.181.39.127:8000/seisfinderapp/insert?root_dir=var/www/seisfinder2/rcc/home/projects/quakecore/seis2Data/private/data/cybershake17p8_csv&type=cybershake
 

...

Code Block
# local host:
http://127.0.0.1:8000/seisfinderapp/insert?root_dir=home/gg999/seisfinder2/private/data/darfield_csv&type=historic

# dev01-quakcore:
http://132.181.39.127:8000/seisfinderapp/insert?root_dir=var/www/seisfinder2/rcc/home/projects/quakecore/seis2Data/private/data/darfield_csv&type=historic

After terminal output 'final result= OK', type the following command in postgres and you should get two row rows like this:

 

(3) Now let's insert hazard data. Doesn't matter if the Django server is running or not.

...

After insertion, type the following command in postgres and postgres and you should get 1 row.

6.Testing

Now you've finished all the installation steps.  Let's do some test to see if the python scripts can run with the database smoothly.  The two scripts that need to be tested are hazard_search.py and event_search.py:

(1) To see the detailed usage of hazard_search.py and event_search.py, type:

Code Block
/seisfinder2/sqlsts $ python hazard_search.py -h
 
/sesifinder2/sqlsts $ python event_search.py -h

 

(2) Sample test Test for hazard_search.py

Code Block
$cd seisfinder2/sqlsts
seisfinder2/sqlsts $ python hazard_search.py -q Cybershake17p8 -45.63 168.94

Output:

 

(23) Test Sample test for event_search.py

Code Block
seisfinder2/sqlsts $ python event_search.py -e Kelly_m7pt252010Sept4_m7pt1_newtdelay_VMCant_v1p65_BULLDOZED-h0p100_EMODv3p0p4_170426 -c -4143.74831325 171.48317693 -r Kelly_HYP03-03_S1284bev01_s103246Allsegm_v8_23

Output:

Image Added

 Image Removed

Done !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!