Skip to content

Kevin-M-Smith/nwisnfie-ldm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Instructions for A Vanilla Install Unidata LDM on Ubuntu

Request Access to disconbb16.cloudapp.net

  • Find your external IP address:
ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'

(as superuser) Add User ldm

groupadd ldm
useradd -m -g users -G ldm -s /bin/bash ldm
passwd ldm

(as superuser) Install pax

apt-get install pax

Login as ldm, switch to /home/ldm

su - ldm
cd

Download and Unpack Unidata LDM

wget ftp://ftp.unidata.ucar.edu/pub/ldm/ldm-6.12.6.tar.gz
gunzip -c ldm-6.12.6.tar.gz | pax -r '-s:/:/src/:'
cd ldm-6.12.6/src

Configure & Make

./configure >&configure.log

Be sure to check configure.log for errors.

make install >&install.log

Be sure to check install.log for errors.

Edit /home/ldm/etc/registry.xml

e.g.

vim /home/ldm/etc/registry.xml

Edit Hostname

  • Make sure the host name is fully qualified.

e.g.

<hostname>nwisnfie-b.cloudapp.net</hostname>

Edit Queue

  • Change path to the desired location.
  • Change size if necessary.

e.g.

<queue>
	<path>/data/queue/ldm.pq</path>
	<size>1G</size>
	<slots>default</slots>
</queue>

Edit /home/ldm/etc/ldmd.conf

e.g.

vim /home/ldm/etc/ldmd.conf

Add the following entry to ldmd.conf:

REQUEST EXP “.*” disconbb16.cloudapp.net

(optional) Edit /home/ldm/etc/pqact.conf

If you'd like incoming files written to disk, edit pqact.conf.

e.g.

vim /home/ldm/etc/pqact.conf

Add the following entries to pqact.conf:

ANY     ((.*)([0-9]{4}-[0-9]{2}-[0-9]{2})(.*.nc))
        EXEC    /bin/mkdir      -p      /data/queue/\3

ANY     ((.*)([0-9]{4}-[0-9]{2}-[0-9]{2})(.*.nc))
        FILE    -close  /data/queue/\3/\1

N.B. This will create daily subdirectories at /data/queue/.

  • The regular expression back-references are:
    • \1 e.g. nfie_hydro_region_num_18_2015-02-09.nc
    • \3 e.g. 2015-02-09
    • so in this example /data/queue/\3/\1 evaluates to /data/queue/2015-02-09/nfie_hydro_region_num_18_2015-02-09.nc

Build Product Queue

cd
/home/ldm/bin/ldmadmin mkqueue

Launch LDM

/home/ldm/bin/ldmadmin start

Keep LDM Running

Create a file that starts LDM if it is not running.

#!/bin/bash
/home/ldm/bin/ldmadmin isrunning

if [[ $? != 0 ]]
then
        /home/ldm/bin/pqcheck -F
        /home/ldm/bin/ldmadmin clean
        /home/ldm/bin/ldmadmin start
fi

Use cron to schedule the task to check LDM regularly.

crontab -e

Example: Add A File to the Product Queue

/home/ldm/bin/pqinsert -v nfie_hydro_region_num_02_2015-01-27.nc

About

Instructions for installing Unidata LDM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published