FFFF
Skip to content

Commit 0a1a731

Browse files
example
1 parent e8bf062 commit 0a1a731

File tree

13 files changed

+1220
-0
lines changed

13 files changed

+1220
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,22 @@ Note that this UID/GID configuration option will not work on operating systems w
198198
## Citation
199199

200200
In order to cite this project, please simply make use of the Unidata LDM DOI: doi:10.5065/D64J0CT0 https://doi.org/10.5065/D64J0CT0
201+
## Self-Contained Example
202+
203+
This project comes with a self-contained example. To run it:
204+
205+
1. `docker pull unidata/ldm-docker:latest`
206+
2. `cd example`
207+
3. possibly edit `etc/registry.xml` to change hostname currently set at `ldm-example.jetstream-cloud.org`
208+
4. possibly edit `etc/registry.xml` to change the LDM queue size currently set at `2G`
209+
5. edit `compose.env` to set `UID` and `GID` of user running container
210+
6. `docker-compose up -d`
211+
212+
213+
Assuming you have permission to request data from `iddb.unidata.ucar.edu` (see `example/etc/ldmd.conf`), after a few moments you should see data. For example:
214+
215+
```
216+
./example/data/ldm/pub/native/radar/composite/grib2/N0R/20180301/Level3_Composite_N0R_20180301_2010.grib2
217+
./example/data/ldm/pub/native/radar/composite/grib2/N0R/20180301/Level3_Composite_N0R_20180301_2015.grib2
218+
./example/data/ldm/pub/native/radar/composite/grib2/N0R/20180301/Level3_Composite_N0R_20180301_2020.grib2
219+
```

example/compose.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
LDM_USER_ID=1000
2+
3+
LDM_GROUP_ID=1000

example/cron/ldm

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
MAILTO=""
2+
3+
# crontab according to http://www.unidata.ucar.edu/software/ldm/ldm-current/basics/configuring.html#cron
4+
5+
# run ldm scour
6+
0 1,4,7,10,13,16,19,22 * * * bash -l -c 'ldmadmin scour'
7+
8+
# Rotate logs
9+
0 0 * * * bash -l -c 'ldmadmin newlog'
10+
11+
# performance metrics
12+
0,5,10,15,20,25,30,35,40,45,50,55 * * * * bash -l -c 'ldmadmin addmetrics'
13+
0 0 * * 0 bash -l -c 'ldmadmin newmetrics'
14+
15+
# check the LDM
16+
0,15,30,45 * * * * bash -l -c 'ldmadmin check' >/dev/null
17+
18+
####
19+
# Compliments scour.conf since the LDM does not scour empty directories
20+
####
21+
22+
# UNIWISC Satellite Imagery
23+
16 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/ANTARCTIC 1
24+
17 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/ARCTIC 1
25+
18 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/GEWCOMP 1
26+
19 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/GLOBAL 1
27+
20 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/GOES-13 1
28+
21 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/GOES-15 1
29+
22 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/MOLLWEIDE 1
30+
23 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/decoded/gempak/areas/SOUNDER 1
31+
32+
# TDS Tree
33+
25 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/native/radar 1
34+
30 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/native/grid 1
35+
35 0 * * * /home/ldm/util/scourBYday /data/ldm/pub/native/satellite 1

example/docker-compose.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '3'
2+
3+
services:
4+
5+
###
6+
# LDM
7+
###
8+
ldm:
9+
image: unidata/ldm-docker:latest
10+
container_name: ldm
11+
# restart: always
12+
volumes:
13+
- ./etc/:/home/ldm/etc/
14+
- ./data/:/home/ldm/var/data/
15+
- ./queues:/home/ldm/var/queues/
16+
- ./logs/:/home/ldm/var/logs/
17+
- ./cron/:/var/spool/cron/
18+
- ./data/:/data/
19+
ports:
20+
- "388:388"
21+
ulimits:
22+
nofile:
23+
soft: 64
24+
hard: 64
25+
env_file:
26+
- "compose.env"

0 commit comments

Comments
 (0)
0