-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherddap.txt
10117 lines (8884 loc) · 403 KB
/
erddap.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
ERDDAP: Serving Datasets in the Geosciences
==========================================
Steven K. Baum
v0.1, 2012-07-22
:doctype: book
:toc:
:icons:
:threddshome: http://www.unidata.ucar.edu/projects/THREDDS/
:cdm: http://www.unidata.ucar.edu/software/netcdf-java/CDM/index.html
:ncml: http://www.unidata.ucar.edu/software/netcdf/ncml/
:netcdf: http://www.unidata.ucar.edu/software/netcdf/
:hdf: http://www.hdfgroup.org/
:grib: http://www.grib.us/
:nexrad: http://en.wikipedia.org/wiki/NEXRAD
:wms: http://en.wikipedia.org/wiki/Web_Map_Service
:wcs: http://en.wikipedia.org/wiki/Web_Coverage_Service
:http: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
:java: http://www.java.com/en/
:tomcat: http://tomcat.apache.org/
:numbered!:
[preface]
Preface
-------
This document should explain:
* what ERDDAP is and how it might be useful to you;
* how to obtain and install ERDDAP; and
* how to create and configure datasets that can be served by ERDDAP.
The creation and configuration of datasets will take up by far the most
of your time and effort. As of this writing, the types and formats of
datasets that ERDDAP
can serve include:
* gridded and tabular data from OPeNDAP servers;
* gridded and tabular data from THREDDS servers;
* gridded and tabular data from local NetCDF files;
* gridded and tabular data from another ERDDAP server;
* tabular data from local or remote MySQL, PostgreSQL, etc. database servers;
* tabular data from NOAA NOS web services;
* tabular data from Automatic Weather Station XML files;
* tabular data from NOS XML servers;
* tabular data from OBIS servers; and
* tabular data from SOS servers.
It can also:
* aggregate data from many of these data sources; and
* automatically create local copies of remote datasets.
:numbered:
Introduction to ERDDAP
----------------------
Motivation and Overview
~~~~~~~~~~~~~~~~~~~~~~~
The Environmental Research Division's Data Access Program (*ERDDAP*) is a data
server that provides a simple, consistent way to
download and create maps and graphs of entire or subsets of scientific
datasets. An example of a working ERDDAP server can be found at:
http://pacioos-mapserver2.ancl.hawaii.edu/erddap/info/index.html?page=1&itemsPerPage=1000[+http://pacioos-mapserver2.ancl.hawaii.edu/erddap/info/index.html?page=1&itemsPerPage=1000+]
Once you have properly configured the datasets served by ERDDAP, the
web interface provides the end user with a wide range of options for finding, exploring
and obtaining the data including:
* full text search for datasets;
* searching for datasets by category;
* obtaining full or partial datasets in a wide range of formats;
* interactively creating graphs and maps that can be downloaded in several
formats;
* access to gridded datasets via the
http://en.wikipedia.org/wiki/Web_Map_Service[Web Map Service (WMS)]; and
* http://en.wikipedia.org/wiki/Representational_state_transfer[RESTful] access to the data.
Roadmap
~~~~~~~
In this document you will learn how to:
* xref:Installation[install] the ERDDAP server and its software prerequisites;
* generally xref:Configuring_the_Server[configure the ERDDAP server] for serving datasets from your
location;
* xref:Automatic_Dataset_Configuration[automatically create configuration
files] for a wide range of specific dataset types;
* xref:Configuration_of_Datasets[modify and supplement the configuration files] for
those datasets to make them even more useful; and
* create or modify datasets to be better compliant with and therefore
useful in ERDDAP.
Features and Capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~
Push and Pull Technology
^^^^^^^^^^^^^^^^^^^^^^^^
The normal mode of ERDDAP is to act as an intermediary, i.e. it takes a
request from a user, gets data from a remote source, reformats the
data, and sends it to the user.
ERDDAP can also also use what is known and push and pull technology.
* http://en.wikipedia.org/wiki/Pull_technology[*Pull Technology*] - the
ability to actively get all of the available data from a remote
source and xref:EDDGridCopy[store a local copy of the data].
* http://en.wikipedia.org/wiki/Push_technology[*Push Technology*] - the use
of subscription services to notify other data servers when new data
is available so they can request or pull the data.
The xref:EDDGridFromErddap[+EDDGridFromErddap+]
and xref:EDDTableFromErddap[+EDDTableFromErddap+] ERDDAP
dataset types use the subscription services and
xref:flag_system[flag system] to make immediate notifications when new data
is available.
[[flag_system]]
Flag System
^^^^^^^^^^^
The use of a flag file
[[subscription_service]]
Subscription Services
^^^^^^^^^^^^^^^^^^^^^
The
Metadata Standards
~~~~~~~~~~~~~~~~~~
The metadata will be implemented via the IOOS Biological Data Terminology at:
http://www.ioos.gov/schema/ioosbiology/1_0/ioos_biological_terminology20120608v1point0.xml[+http://www.ioos.gov/schema/ioosbiology/1_0/ioos_biological_terminology20120608v1point0.xml+]
[[Installation]]
Installation
------------
Related pages with additional installation information:
*Set Up Your Own ERDDAP*:
http://coastwatch.pfeg.noaa.gov/erddap/download/setup.html[+http://coastwatch.pfeg.noaa.gov/erddap/download/setup.html+]
Installing the Prerequisite Software
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The two key prerequisites for installing ERDDAP are
{java}[Java] and {tomcat}[Apache Tomcat].
Many operating systems are shipped with a recent version of Java, while Tomcat
usually has
to be installed separately. Be sure to note which versions of Java
and Tomcat your version of ERDDAP requires.
UNIX/Linux
^^^^^^^^^^
A UNIX platform - preferably Linux - is a highly recommended choice
on which to install and run your ERDDAP server.
In addition to being a stable platform on which to run the server,
the ERDDAP software was and is still being developing on a
Linux platform.
Also, the vast majority of the documentation - including this document - has
been written by those employing Linux and contains many examples specific
to that platform.
While the ERDDAP server can be installed and run in a production mode
on a Windows or OS X platform, it is not recommended and certainly
not supported herein.
Those platforms are better employed in a client rather
than server capacity.
Java
^^^^
Java is a programming language designed to have minimal implementation
dependencies,
which enables developers to write a program once that will run on any device
that
includes a Java installation. To accomplish this goal, Java programs are
compiled to run on so-called virtual
machines, which are basically a software version of a computer's hardware CPU.
Once a virtual machine is create for a specific hardware architecture, any
Java program
should run on that architecture. Java is especially useful for client-server
web
applications such as ERDDAP.
Although it is unusual for a computing platform to not come with Java already
installed,
if the need arises the latest version of Java can be obtained at the download
site at:
* http://www.java.com/en/download/manual.jsp[+http://www.java.com/en/download/manual.jsp+]
which has virtual machine packages for Windows, Linux and Solaris machines for
both
32- and 64-bit architectures.
Apple supplies their own version of Java for the OS X operating system.
Once you have figured out where the Java installation is located, you need to
specify it via a global environment variable. An example, for a Java
installation
located at */opt/java*, would be:
--------------------------------------
export JAVA_HOME=/opt/java
--------------------------------------
The location is highly variable by platform, so you may have to consult your
sysadmin about this.
Apache Tomcat
^^^^^^^^^^^^^
Relevant Documentation
++++++++++++++++++++++
Tomcat - http://tomcat.apache.org/tomcat-6.0-doc/index.html[+http://tomcat.apache.org/tomcat-6.0-doc/index.html+]
Tomcat Installation - http://tomcat.apache.org/tomcat-6.0-doc/setup.html[+http://tomcat.apache.org/tomcat-6.0-doc/setup.html+]
Tomcat and TDS Security Tutorial -
http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Security.html[+http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Security.html+]
Introduction
++++++++++++
Apache Tomcat is an open source implementation of Java Servlet and JavaServer
Pages
techologies. A Java servlet is a Java programming language class used to
extend the
capabilities of servers that host web applications accessed by a
request-response
model. Servlets provide component-based, platform-independent methods for
building
web-based applications such as ERDDAP. JavaServer Pages (JSP) is a
technology
for creating dynamically generated web pages based on HTML and XML. It is
similar
to the PHP web programming language but built on top of Java.
Basically, Tomcat is an HTTP server that leverages the platform-independence
of Java all the way up to the server level, enabling and allowing the
portability of such web-based applications as ERDDAP.
It should be noted that implementations of Java Servlet and JavaServer Pages
other
than Tomcat are available and can also be used with ERDDAP. We have chosen
to
document Tomcat for the simple reason that it works well with ERDDAP and that
most of the available documentations is for that combination.
Tomcat is usually not included in standard operating system distributions and
must be obtained from the Tomcat home site at:
* http://tomcat.apache.org/[+http://tomcat.apache.org/+]
Tomcat can be obtained in source code format and compiled for your specific
platform, but it is recommended that you skip that chore and simply
download a binary distribution appropriate to your platform.
An Installation Warning
+++++++++++++++++++++++
*WARNING*: This section contains a quick and easy method for installing Apache Tomcat.
It is also a dangerous and insecure method, and as such anything in this
section that contradicts anything found in the *Tomcat and TDS Security
Tutorial* at:
http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Security.html[+http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Security.html+]
should be ignored in favor of the instructions in the latter.
Please do follow the instructions in the latter on how to:
* create a dedicated, non-root user and group under which you can run Tomcat;
* remove unused web applications in the +webapps+ directory;
* use digested passwords;
* enable SSL encryption;
* block non-essential port access at the firewall;
* restrict access to the TDS by remote IP address or host;
* secure the Tomcat +manager+ application;
* run the TDS behind a proxy server; and
* run Tomcat with a security manager.
Performing any of these tasks essentially creates another layer of
security to frustrate hackers, and the more layers you have
the more secure your installation will be.
That being said, if you're chomping at the bit to give THREDDS a try
and you're comfortably and safely behind about 20 firewalls, then
you can have THREDDS up and running in probably about 15 minutes
using the instructions in this section. That being said, please
do follow all or most of the security suggestions if you're
planning to move on and install a production server that will
be open to the public, including every bored hacker on the
planet.
A Quickie Installation Procedure
++++++++++++++++++++++++++++++++
The download page for Apache Tomcat version 6.x is at:
http://tomcat.apache.org/download-60.cgi[+http://tomcat.apache.org/download-60.cgi+]
A basic installation procedure begins with downloading a compressed version of
the distribution,
in this case +apache-tomcat-6.0.35.tar.gz+. We will be installing
Tomcat in the
+/opt+ directory, but that can vary depending on how your local
installation is
configured.
If you install in a different location, just replace +/opt+ with the root path
of your installation in all that follows.
After we have downloaded the distribution, we enter the following
commands (with
root privileges required for this particular location as indicated by
the +su+ command below):
------------------------------------------------------
su
mv apache-tomcat-6.0.35.tar.gz /opt
cd /opt
tar xzvf apache-tomcat-6.0.35.tar.gz
mv apache-tomcat-6.0.35 tomcat
------------------------------------------------------
This uncompresses and unarchives the files contained in the distribution and
creates a hierachy of subdirectories in the +tomcat+ directory that, upon
entering the commands:
-------------------------
cd tomcat
ls -l
-------------------------
should look something like this:
--------------------------------------------------------------------------
drwxr-xr-x. 2 root root 4096 Apr 24 14:24 bin
drwxr-xr-x. 3 root root 4096 Apr 24 14:24 conf
drwxr-xr-x. 2 root root 4096 Apr 24 14:08 lib
-rw-r--r--. 1 root root 37951 Nov 28 04:22 LICENSE
drwxr-xr-x. 2 root root 4096 Apr 24 14:24 logs
-rw-r--r--. 1 root root 558 Nov 28 04:22 NOTICE
-rw-r--r--. 1 root root 8680 Nov 28 04:20 RELEASE-NOTES
-rw-r--r--. 1 root root 6670 Nov 28 04:22 RUNNING.txt
drwxr-xr-x. 2 root root 4096 Apr 24 14:08 temp
drwxr-xr-x. 7 root root 4096 Nov 28 04:20 webapps
drwxr-xr-x. 3 root root 4096 Apr 24 14:24 work
--------------------------------------------------------------------------
Setting the Environment
+++++++++++++++++++++++
To save time, frustration and grief in the long run, it is strongly
recommended that a +setenv.sh+ file be created in the
directory +/opt/tomcat/bin+ that is created during installation.
To do this, execute the following command:
------------------------------
cd /opt/tomcat/bin
------------------------------
and use a text editor to create a file containing the following commands. For
example, if we use the +vi+ text editor we would issue the command:
---------------------------------
vi setenv.sh
---------------------------------
and, upon entering editing mode, enter the following lines:
------------------------------------------------------------------------------------------------
#!/bin/sh
#
# ENVARS for Tomcat and TDS environment
#
JAVA_HOME="/opt/java"
export JAVA_HOME
JAVA_OPTS="-Xmx4096m -Xms512m -server -Djava.awt.headless=true
-Djava.util.prefs.systemRoot=$CATALINA_HOME/content/thredds/javaUtilPrefs"
export JAVA_OPTS
CATALINA_HOME="/opt/tomcat"
export CATALINA_HOME
------------------------------------------------------------------------------------------------
On 32-bit platforms where RAM size may be smaller than 4 Gb, we can
swap +-Xmx4096m+ for +-Xmx1500m+ in the above.
See the *Security Measures* section below for additional steps recommended for
production installations of ERDDAP.
Starting the Server
+++++++++++++++++++
There are a couple of options for starting Tomcat, with extensive details
available at:
http://www.mulesoft.com/tomcat-start[+http://www.mulesoft.com/tomcat-start+]
Basically, Tomcat can be started manually or automatically.
A manual start - given the +/opt+ location into which we have installed the
package - would be performed via:
------------------------------------------------------
/opt/tomcat/bin/startup.sh
------------------------------------------------------
with a shutdown performed similarly via:
------------------------------------------------------
/opt/tomcat/bin/shutdown.sh
------------------------------------------------------
If these commands do not work, check the commands you used to set up the
environment via creating the +setenv.sh+ file.
Tomcat can also be run automatically as a
http://en.wikipedia.org/wiki/Daemon_%28computing%29[UNIX daemon]
using a program called +jsvc+ that is included in Tomcat binary
distributions. The following commands will compile and install this program:
---------------------------------------------------------
cd /opt/tomcat/bin
tar xzvf commons-daemon-native.tar.gz
cd commons-daemon-1.0.x-native-src/unix
./configure
make
cp jsvc ../..
----------------------------------------------------------
This procedure puts the +jsvc+ binary in the +/opt/tomcat/bin+ directory and
allows you to run it as a daemon via:
----------
/opt/tomcat/bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out
-errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap
----------
Additional information about this procedure including several additional
options can be found at:
http://tomcat.apache.org/tomcat-6.0-doc/setup.html[+http://tomcat.apache.org/tomcat-6.0-doc/setup.html+]
Checking for a Running Server
+++++++++++++++++++++++++++++
Once you have started the Tomcat server via one of the procedures above, you
can verify that it
is running either via the command line with:
--------------------------------
ps -ef | grep tomcat
--------------------------------
where, if the server is running, you'll see something like the following
confusing mess:
--------------------------------
baum 10781 23963 0 13:40 pts/26 00:00:00 grep tomcat
root 18619 1 0 Apr24 pts/32 00:04:13 /usr/bin/java
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Xmx4096m
-Xms512m -XX:MaxPermSize=180m -server -Djava.awt.headless=true
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath
/opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat
-Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp
org.apache.catalina.startup.Bootstrap start
---------------------------------
or, if it's not running, you'll see just the first line containing +grep
tomcat+.
You can also check for a running server by opening a browser window or tab and going to:
http://localhost:8080/[+http://localhost:8080/+]
where you should see the welcome page for Apache Tomcat looking something like
this:
.Tomcat Welcome Page
image::thredds/tomcat.png[height=700]
Troubleshooting
+++++++++++++++
Tomcat troubleshooting starts with checking the logs in the directory:
--------------------------------
/opt/tomcat/logs
--------------------------------
with the most useful messages usually ending up in the main log file, that is:
---------------------------------------------
/opt/tomcat/logs/catalina.out
---------------------------------------------
although you may not be able to make out hide nor hair of what's happening in
there due to the recondite nature of Java and its error messages. Try Google
or you local sysadmin if you're hopelessly confused on the matter.
Security Measures
+++++++++++++++++
The *Tomcat and TDS Security Tutorial* at:
http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Security.html[+http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Security.html+]
is an excellent, detailed look at how to secure your Tomcat and TDS
installation.
The THREDDS site has a checklist for production installation available at:
http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Checklist.html[+http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/tutorial/Checklist.html+]
that details several additional installation steps recommended for securing a
production Tomcat installation. Basically, if you do this now you'll be
dealing much less with the predations of Romanian hackers later.
Performance Tuning
++++++++++++++++++
If you are having performance issues with Tomcat, for instance, it's running
very slowly, then you have some options to tune it for optimum performance. A
good overview of these options can be found at:
http://www.mulesoft.com/tomcat-performance[+http://www.mulesoft.com/tomcat-performance+]
although they fall outside of the purview of our basic installation procedure.
Installing ERDDAP
~~~~~~~~~~~~~~~~~
Relevant Documentation
^^^^^^^^^^^^^^^^^^^^^^
Set Up Your Own ERDDAP -
http://coastwatch.pfeg.noaa.gov/erddap/download/setup.html[+http://coastwatch.pfeg.noaa.gov/erddap/download/setup.html+]
Obtaining ERDDAP
^^^^^^^^^^^^^^^^
The latest ERDDAP release can always be found on this page:
http://coastwatch.pfeg.noaa.gov/erddap/download/setup.html[+http://coastwatch.pfeg.noaa.gov/erddap/download/setup.html+]
with the actual file link being:
http://coastwatch.pfeg.noaa.gov/erddap/download/erddap.war[+http://coastwatch.pfeg.noaa.gov/erddap/download/erddap.war+]
ERDDAP configuration files are supplied in a separate file:
http://coastwatch.pfeg.noaa.gov/erddap/download/erddapContent.zip[+http://coastwatch.pfeg.noaa.gov/erddap/download/erddapContent.zip+]
and should be downloaded and installed first.
Installing the Configuration Files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Once the +erddapContent.zip+
file has been downloaded, you move it from where you downloaded it to the
Tomcat base directory, e.g.
------
mv erddapContent.zip /opt/tomcat
------
and then unzip it. This will unpack the files therein and create and
populate the directory:
------
/opt/tomcat/content/erddap
------
You must make some changes to the +setup.xml+ configuration file before you
can attempt to install the +erddap.war+ file.
Startup Configuration of +setup.xml+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A +bigParentDirectory+ must be configured wherein various logging,
cache and temporary files will be stored. In our case we create a
+/raid/erddap+ directory and set it as:
-----
<bigParentDirectory>/raid/erddap/</bigParentDirectory>
-----
Email addresses where daily and other reports can be sent must be
set in the lines:
------
<emailEverythingTo>[email protected]</emailEverythingTo>
<emailDailyReportsTo>[email protected]</emailDailyReportsTo>
------
A base URL must be set that is the start of the public URL for
your Tomcat server. This is set in the line:
-----
<baseUrl>http://127.0.0.1:8080</baseUrl>
-----
and should be changed to something like:
-----
<baseUrl>http://barataria.tamu.edu</baseUrl>
-----
These are the changes needed to initially start ERDDAP.
Installing ERDDAP
^^^^^^^^^^^^^^^^^
The ERDDAP Java web archive file or *war* file is installed in the +webapps+
subdirectory
of the main Tomcat installation which, in our example, is:
---------------------------------
/opt/tomcat/webapps
---------------------------------
The installation is performed simply by copying or moving the
+thredds.war+ into that directory,
after which a running Tomcat server will automatically unpack and start the
programs
therein.
You can tell that the process has at least started if you can see
that
an +erddap+ subdirectory has been created under
+/opt/tomcat/webapps+, i.e.
------------------------------
/opt/tomcat/webapps/erddap
------------------------------
If nothing happens, first check to see if you have successfully started you
Tomcat server, and then check the logs.
Checking for a Running ERDDAP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the installation has proceeded correctly, you can point your browser at:
http://localhost:8080/thredds/[+http://localhost:8080/thredds/+]
and, if you have been successful, the dynamically generated default ERDDAP home
page appears something like this:
.ERDDAP Default Welcome Page
image::erddap/erddap_home.png[height=700]
You can also check on the page listing the default datasets by clicking
on *View a List of Datasets* in the upper right of the home page to obtain:
.ERDDAP Default Data Page
image::erddap/erddap_data_default.png[width=1000]
[[setup]]
[[Configuring_the_Server]]
Configuring the Server
----------------------
Overview
~~~~~~~~
You will be creating or editing configuration files for both
your server and your datasets. First,
you will be configuring the server itself. There is an XML file that
contains information about the server itself, e.g. its name, who owns
and runs it, what organization is involved, etc. It also allows you
to configure how your HTML pages will appear to users, how large your
caches will be, whether or not various services will be enabled, etc.
Basically, you establish the way your server will look and perform
via configuring this file.
This is something you do when you first install the TDS, and then
perhaps tweak occasionally as your situation changes and you might
need to offer more services, establish larger caches, etc.
The second type of configuration is done within data catalogs.
That is where you configure how your datasets are served to
your users. This is significantly more complicated and involved
than configuring the server itself, and will be more or less an
ongoing process as you create or acquire more datasets and gradually
learn the full capabilities of the TDS and apply them to your
datasets.
Both the server and data configuration files are configured
using a human- and machine-readable file written in a dialect
of XML. Since XML is a fairly abstract concept, we'll now take
a brief look at what it is.
XML
^^^
The eXtensible Markup Language or XML is a markup language that defines a set
of rules
for encoding documents in a format that is both human- and machine-readable.
An XML
document is immediately recognizable by the number of angle brackets contained
therein, and
sort of resembles HTML markup although the two markup languages have different
purposes.
A good way of looking at this is that HTML is for form and XML is for content.
XML documents consist mainly of *elements* and
*attributes*.
An element is a component
that begins with a start-tag and ends with a matching end-tag, with an example
being:
---------------------------
<serviceName>odap</serviceName>
---------------------------
where +serviceName+ is the element name.
An attribute is a name/value pair within a start-tag, and example being:
---------------------------
<dataset name="TDS Tutorial"/>
---------------------------
where within the element +dataset+ the attribute name is +name+
and the value is +TDS Tutorial+.
An XML schema or grammar is a description of a specific type of XML document,
usually
expressed in terms of constraints on the structure and content of documents of
that
type. Typically a schema constrains the set of elements that may be used in a
document,
which attributes
can be applied to them, the order in which they may appear,
and
the allowable parent/child relationships. Basically, a schema allows you to
specify
what you really need in a document while excluding extraneous material. The
ERDDAP Configuration Directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All the configuration files are located in a single directory
in the standard, default ERDDAP distribution.
In our installation example, this directory is located at:
---------------------------------
/opt/tomcat/content/erddap
---------------------------------
wherein all the configuration files are located. They are located in a
directory separate from the +webapp+ directory into which the software is
installed to separate the software from the configuration files and thus
allow the former to be upgraded without disturbing the latter. This
subdirectory should look something like this:
-------------------------------------------------------
-rw-r--r-- 1 root root 49629 May 2 16:00 datasets.xml
drwxr-xr-x 2 root root 4096 Jul 24 17:49 images
-rw-r--r-- 1 root root 169596 May 2 16:00 messages.xml
-rw-r--r-- 1 root root 33829 Jul 24 18:09 setup.xml
-------------------------------------------------------
The initial and basic configuration is performed within the +setup.xml+
file. The content configuration is performed
within the +datasets.xml+ file.
Mandatory Server Configuration Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ERDDAP server configuration file is at:
+/opt/tomcat/content/erddap/setup.xml+
and allows the ERDDAP administrator to set parameters that control the general
behavior of ERDDAP. Most are set to reasonable parameters, although there
is a group of parameters that [red]*must be changed* for your specific
server.
[[bigParentDirectory]]
+bigParentDirectory+
^^^^^^^^^^^^^^^^^^^^
The +bigParentDirectory+ is the absolute path on the serve (with a trailing
slash) to a directory with a large amount of space. This should be a newly
created directory *outside* of the Tomcat directory, for instance somewhere
on your huge data disc array.
The user that runs Tomcat must have read and write privileges for this
directory. ERDDAP will create several subdirectories under this:
* +datasetInfo+ - which is used by some datasets to cache information
about the dataset to speed up reloading;
* +flag+ - wherein you can place a file with the name of a
xref:datasetID[+datasetID+] to force the reloading of that dataset;
* +cache+ - which is used to hold cached data files (and wherein
files are removed that are older than +cacheMinutes+).
The ERDDAP +log.txt+ file will also be placed in this directory. An
example is:
[source,xml]
-----
<bigParentDirectory>/data/erddap/</bigParentDirectory>
-----
[[emailEverythingTo]]
[[emailDailyReportsTo]]
+emailEverythingTo+ and +emailDailyReportsTo+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Status and change reports are emailed to the email addresses
contained within +emailEverythingTo+ and +emailDailyReportsTo+.
Either of these can be not specified, specified but with no value (i.e.
blank), and specified with either a single email address or
multiple, comma-separated email addresses.
Daily status reports are emailed to the email address contained
within +emailDailyReportsTo+.
The first +emailEverythingTo+ address is more important than
the others if multiple addresses are specified.
It is used for subscriptions to +EDDXxxxFromErddap+
datasets.
An example of their usage is:
[source,xml]
-----
<emailEverythingTo>[email protected]</emailEverythingTo>
<emailDailyReportsTo>[email protected]</emailDailyReportsTo>
-----
Even if you do not set up the email system, all potential
email messages are logged to an +emailLogYEAR-MONTH.txt+ file
in xref:bigParentDirectory[+bigParentDirectory+].
[[baseUrl]]
+baseUrl+
^^^^^^^^^
The +baseUrl+ sets the start of the public URL to which +/[warName]+
is appended. This must be changed when you install ERDDAP. For
example, if you're running and testing ERDDAP on your own computer
you might specify this as:
[source,xml]
-----
<baseUrl>http://127.0.0.1:8080</baseUrl>
-----
and if you're finished testing and want to go into production mode
you might specify it as:
[source,xml]
-----
<baseUrl>http://erddap.university.edu:8080</baseUrl>
-----
Email Account Information
^^^^^^^^^^^^^^^^^^^^^^^^^
The email account information is used for sending emails to the
xref:emailEverythingTo[+emailEverythingTo+] and
xref:emailDailyReportsTo[+emailDailyReportsTo+] addresses. If either
has been specified, this information must be changed.
If you do not wish to send emails, then specify the
+emailSmtpHost+ tag to be blank.
The +emailPassword+ tag is optional, although if it is absent
emails cannot be sent to non-local addresses.
The +emailProperties+ tag is a list of additional properties of the form:
-----
prop1|value1|prop2|value2
-----
with an example for the requirements of GMail accounts being:
-----
mail.smtp.starttls.enable|true
-----
(with the +emailSmtpPort+ needed for GMail being +587+).
The default is a blank.
An example of the email account information tags is:
[source,xml]
-----
<emailFromAddress>[email protected]</emailFromAddress>
<emailUserName>your.email</emailUserName>
<emailPassword>yourPassword</emailPassword>
<emailProperties></emailProperties>
<emailSmtpHost>your.smtp.host.edu</emailSmtpHost>
<emailSmtpPort>25</emailSmtpPort>
-----
Even if you do not set up the email system, all potential email
messages are logged to an +emailLogYEAR-MONTH.txt+ file in the
xref:bigParentDirectory[+bigParentDirectory+].
If you cannot get ERDDAP to send email, receive the error
message +Connection refused+, and are using McAfee anti-virus
software, then uncheck:
-----
Virus Scan Console : Access Protection Properties : Anti Virus Standard Protections : Prevent mass mailing worms from sending mail
-----
[[adminInstitution]]
[[adminIndividualName]]
[[adminPosition]]
[[adminPhone]]
[[adminCountry]]
[[adminEmail]]
ERDDAP Administrator Information
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Information about the ERDDAP administrator is used for the SOS and WMS
servers. These tags [red]*must* be changed to describe your installation.
An example is:
[source,xml]
-----
<adminInstitution>Texas A&M University, Dept. of Oceanography</adminInstitution>
<adminIndividualName>Steven Baum</adminIndividualName>
<adminPosition>ERDDAP administrator</adminPosition>
<adminPhone>979-867-5309</adminPhone>
<adminAddress>D. G. Eller Bldg.</adminAddress>
<adminCity>College Station</adminCity>
<adminStateOrProvince>TX</adminStateOrProvince>
<adminPostalCode>77843</adminPostalCode>
<adminCountry>USA</adminCountry>
<adminEmail>[email protected]</adminEmail>
-----
OGC Services Requirements
^^^^^^^^^^^^^^^^^^^^^^^^^
The +accessConstraint+, +accessRequiresAuthorization+, +fees+ and
+keywords+ tags are tags used for
default access constraints, fees and keywords that need to be supplied
for the ERDDAP SOS, WCS and WMS services.
* If a dataset does not have an xref:accessibleTo[+accessibleTo+] tag, then
+accessConstraints+ and +fees+ are the defaults.
* If a dataset has an xref:accessibleTo[+accessibleTo+] tag, then
+accessRequiresAuthorization+ is the default.
The comma-separted list of +keywords+ should describe the dataset in a general way.
The +accessConstraints+, +fees+ and +keywords+ tags can be overwritten
by attributes of the same name in a dataset's global attributes
within the +datasets.xml+ file.
Examples of their use are:
[source,xml]
-----
<accessConstraints>NONE</accessConstraints>
<accessRequiresAuthorization>only accessible to authorized users</accessRequiresAuthorization>
<fees>NONE</fees>
<keywords>earth science, atmosphere, ocean, biosphere, biology, environment</keywords>
-----
Legal Boilerplate
^^^^^^^^^^^^^^^^^
The following XML fragment appears on the +erddap/legal.html+ web page
after the general disclaimer.
[source,xml]
-----
<legal><![CDATA[
[standardDisclaimerOfEndorsement]
[standardDisclaimerOfExternalLinks]
[standardPrivacyPolicy]
[standardDataLicenses]
[standardContact]
]]></legal>
-----
Any of the +standard*+ parts can be replaced with local information.
The +standardContact+ tag refers to the
xref:adminEmail[+adminEmail+] address.
Optional Server Configuration Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[[logLevel]]
+logLevel+
^^^^^^^^^^
The +logLevel+ tag determines how many diagnostic messages will be sent
to the +log.txt+ file. It can be set to:
* +warning+ - for the fewest messages;
* +info+ - the default value with more messages;
* +all+ - for the most messages.
An example is:
[source,xml]
-----
<logLevel>info</logLevel>
-----
Diagnostic messages are displayed on some HTML pages if
xref:displayDiagnosticInfo[+displayDiagnosticInfo+] is
set to +true+. The diagnostic messages are written to
the +log.txt+ in the xref:bigParentDirectory[+bigParentDirectory+].
Leaving this at the default value of +info+ is a good idea