Build and deploy into local from source
- git clone git://github.com/Unidata/thredds.git thredds
- cd thredds
- git checkout 5.0.0 # to compile version 5, checkout any branch you want
- ./gradlew assemble # gradle puts the war in ./tds/build/libs/
- cp ./tds/build/libs/tds-5.0.0-SNAPSHOT.war <TOMCAT_DIRECTORY>/webapps/thredds.war # it is not recommended to change default context path (thredds)
- <TOMCAT_DIRECTORY>/bin/startup.sh
After these steps, if tomcat is configured by default, the THREDDS server and the default datasets should be available in localhost:8080/thredds
Detailed info in [1].
Import thredds in eclipse
Once we have the git repo cloned:
- Open eclipse
- Install the "Buildship gradle integration" plugin (in eclipse, Help -> Eclipse Marketplace and enter "gradle" in the search box)
- Restart eclipse
- Go to File -> Import... -> Existing Gradle project, select your thredds folder cloned from github and click next
- Select Gradle wrapper and click next
- Click finish. Now you should see a bunch of projects in your project explorer
Debugging thredds in eclipse
- Start tomcat from a terminal: <TOMCAT_DIRECTORY>/bin/catalina.sh jpda start
- Go to eclipse and select, in the top bar, Run -> Debug configurations... -> Remote Java Application and click New
- Choose a name for the configuration, e.g. thredds.
- Click Browse... and select the tds project from the project selection window
- Be sure that the host is localhost and the port is 8000
- Click Apply
If you add a breakpoint to some class and do some navigation in the browser, eclipse will stop the execution and will open the debug perspective.
Compiling apache 2.4 and mod_jk from source
- wget -i downloads.txt (see attachments)
- apt-get install build-essential
- Extract all downloads from downloads.txt
- Build apr: ./configure ; make ; make install
- Build apr-util: ./configure --with-apr=<APR_SOURCE_CODE_DIR> ; make ; make install
- Build pcre: ./configure --with-prefix=/usr/local/pcre/ ; make ; make install
- Build httpd: ./configure ; make ; make install
- Build tomcat-connectors: ./configure --with-apxs=/usr/local/apache2/bin/apxs ; make ; make install
- It's necessary to execute ldconfig in a terminal (why?)
- Test: /usr/local/apache2/bin/apachectl start
[1] - https://github.com/Unidata/thredds/blob/5.0.0/docs/website/netcdf-java/tutorial/SourceCodeBuild.adoc
TDS Monitoring
https://meteo.unican.es/tds5/monitoring
TDS logs
Important logs for TDS administration:
- catalina.out -> tomcat log
- serverStartup.xml -> thredds initialization log
- threddsServlet.log -> http request to thredds
- catalogInit.log -> info and errors from thredds catalogs
Register a new catalog
- Create the catalog xml file in <TDS_DIRECTORY>/tomcat/content/thredds/catalogs/<FOLDER_NAME>/<CATALOG_NAME>.xml
- Log in to TAP, go to Administration -> Role Administration
- Create a new role by filling the fields and save
- Go to Administration -> Policy Administration and create the new policy
- Add the catalog.xml to the thredds catalog hierarchy using <dataset> or <catalogRef> elements
- Restart the tds
Last modified 5 years ago
Last modified on Apr 27, 2017 10:05:46 AM
Attachments (3)
- eclipse debug config (386.6 KB) - added by zequi 5 years ago.
- config (386.6 KB) - added by zequi 5 years ago.
- downloads.txt (309 bytes) - added by zequi 5 years ago.
Download all attachments as: .zip