catalog: add logging and fix bugs

* use user-friendly messages
* fix help output

refs: #3189

Change-Id: I33dcb1a9c806d01c6665e0ef941d5b4f1d64774f
12 files changed
tree: 4103aba9d02ba96884f19d3e7449b45b6eb17f69
  1. .jenkins.d/
  2. .waf-tools/
  3. catalog/
  4. client/
  5. lib/
  6. tools/
  7. .gitattributes
  8. .gitignore
  9. .gitmodules
  10. .jenkins
  11. .travis.yml
  12. AUTHORS.md
  13. catalog.conf.sample.in
  14. COPYING
  15. log4cxx.properties
  16. README-dev.md
  17. README.md
  18. waf
  19. wscript
README.md

ndn-atmos

This is pre-release software

####If you have trouble running it, subscribe to ndn-sci mailing list and send an email.

This software is designed to support ongoing climate model research at Colorado State University, Berkeley and other institutes. Future plan includes porting this tool to suite other scientific community such as High Energy Particle Physics.

Currently, this software provides an API to publish, query and retrieve scientific datasets using NDN.

Dependencies

The ndn-atmos is built based on several libraries

Dependency for tools and translator library

  • python3
  • netcdf4-python3
  • mysql-connector-python3

The ndn-cxx and ChronoSync need some other prerequisites.

  • For OSX, the prerequisites can be installed using Homebrew:
  • For Ubuntu, use the command below to install the prerequisites:
  • For Fedora, use the command below to install the prerequisites:

Installing ndn-cxx

  • Download ndn-cxx source code. Use the link below for ndn-cxx code:
  • In library folder, build from the source code

Installing ChronoSync

  • Download ChronoSync source code. Use the link below for the ChronoSync code:
  • Build from the source code

Installing ndn-atmos

Follow the steps below to compile and install ndn-atmos:

  • Download the ndn-atmos source code. Use the command below:
  • Build ndn-atmos in the project folder
  • To test ndn-atmos, please use the steps below:
  • Note that if you are using Fedora or Ubuntu, you may need to create a configuration file for ndn-cxx in /etc/ld.so.conf.d to include the path where the libndn-cxx.so is installed. Then update using ldconfig

*For example, if the libndn-cxx.so is installed in /usr/local/lib64, you need to include this path in a "ndn-cxx.conf" file in /etc/ld.so.conf.d directory, and then run "ldconfig".

Running ndn-atmos

Install translator library

  1. For the translator, ndn_cmmap_translator library is required to be in PYTHONPATH

Initializing Database

  • Create a database using standard mysql tool.
  • You also need to create a user and set a password to connect to the database the database.
  • Note that you will need to have actual CMIP5 data to run the tool.
  • Run
  • Input full path to the filename and config file to translate
  • A CMIP5 config file is located under /ndn-atmos/lib/ndn_cmmap_translators/etc/cmip5/cmip5.conf ```
  • This will create a table named cmip5 and insert the names into the table

Starting NFD

NFD is the NDN forwarding daemon.

  • Download NFD source code. Use the link below for the NFD code:
  • Build NFD
  • Run NFD
  • Note that if you are using Fedora or Ubuntu, you may need to create a configuration file for ndn-cxx in /etc/ld.so.conf.d to include the path where the libndn-cxx.so is installed. Then update using command below:

*For example, if the libndn-cxx.so is installed in /usr/local/lib64, you need to include this path in a "ndn-cxx.conf" file in /etc/ld.so.conf.d directory, and then run "ldconfig".

Launching atmos-catalog

  • Make sure database is initialized and running

  • Create catalog configuration file

  • Edit the configuration file /usr/local/etc/ndn-atmos/catalog.conf. Modify the database parameters in both the queryAdapter and publishAdapter sections.

  • Note that the database parameters in these two sections may be different to provide different privileges.

  • Run ndn-atmos

Starting front end

  • Open the client folder in ndn-atmos

  • Checkout the ndn-js in the client folder. Use the link blow:

  • Start python simple server in the client folder (ndn-atmos/client)
  • Open project query page in a web browser