Chengyu Fan | 8b92f12 | 2015-03-09 22:13:36 -0600 | [diff] [blame] | 1 | ndn-atmos |
Chengyu Fan | 8b92f12 | 2015-03-09 22:13:36 -0600 | [diff] [blame] | 2 | ============ |
| 3 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 4 | ### This is pre-release software |
susmit shannigrahi | 33e5725 | 2015-06-16 13:17:09 -0600 | [diff] [blame] | 5 | ####If you have trouble running it, subscribe to <a href=http://www.netsec.colostate.edu/mailman/listinfo/ndn-sci> ndn-sci mailing list </a> and send an email. |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 6 | |
| 7 | This software is designed to support ongoing climate model research at Colorado State University, |
| 8 | Berkeley and other institutes. Future plan includes porting this tool to suite other scientific |
| 9 | community such as High Energy Particle Physics. |
| 10 | |
| 11 | Currently, this software provides an API to publish, query and retrieve scientific datasets using |
| 12 | NDN. |
| 13 | |
| 14 | Dependencies |
| 15 | --------------------- |
| 16 | |
| 17 | **The ndn-atmos is built based on several libraries** |
| 18 | |
| 19 | * boost (Minimum required boost version is 1.48.0) |
| 20 | * jsoncpp 1.6.0 (https://github.com/open-source-parsers/jsoncpp.git) |
| 21 | * mysql 5.6.23 (http://www.mysql.com/) |
| 22 | * ndn-cxx (https://github.com/named-data/ndn-cxx.git) |
| 23 | * ChronoSync (https://github.com/named-data/ChronoSync.git) |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame^] | 24 | * libzdb (http://www.tildeslash.com/libzdb/) |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 25 | |
| 26 | **Dependency for tools and translator library** |
| 27 | |
| 28 | * python3 |
| 29 | * netcdf4-python3 |
| 30 | * mysql-connector-python3 |
| 31 | |
| 32 | **The ndn-cxx and ChronoSync need some other prerequisites.** |
| 33 | |
| 34 | * For OSX, the prerequisites can be installed using Homebrew: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 35 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 36 | <pre> |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame^] | 37 | brew install boost sqlite3 mysql jsoncpp hdf5 openssl cryptopp protobuf libzdb |
Susmit Shannigrahi | cad29ca | 2015-06-17 10:10:01 -0600 | [diff] [blame] | 38 | pip3 install mysql-connector-python --allow-all-external |
| 39 | pip3 install netCDF4 |
| 40 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 41 | </pre> |
| 42 | |
| 43 | * For Ubuntu, use the command below to install the prerequisites: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 44 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 45 | <pre> |
| 46 | sudo apt-get install libboost-all-dev libssl-dev libcrypto++-dev \ |
| 47 | libsqlite3-dev libmysqlclient-dev libjsoncpp-dev \ |
| 48 | protobuf-compiler libprotobuf-dev netcdf4-python \ |
Susmit Shannigrahi | cad29ca | 2015-06-17 10:10:01 -0600 | [diff] [blame] | 49 | python3-mysql.connector python3-pip libhdf5-dev \ |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame^] | 50 | libnetcdf-dev python3-numpy libzdb-dev |
Susmit Shannigrahi | cad29ca | 2015-06-17 10:10:01 -0600 | [diff] [blame] | 51 | |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 52 | sudo pip3 install netCDF4 |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 53 | </pre> |
Susmit Shannigrahi | cad29ca | 2015-06-17 10:10:01 -0600 | [diff] [blame] | 54 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 55 | * For Fedora, use the command below to install the prerequisites: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 56 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 57 | <pre> |
| 58 | sudo yum install boost-devel openssl-devel cryptopp-devel sqlite3x-devel \ |
| 59 | mysql-devel jsoncpp-devel protobuf-compiler protobuf-devel \ |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame^] | 60 | netcdf4-python3 mysql-connector-python3 libzdb-devel |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 61 | </pre> |
| 62 | |
| 63 | |
| 64 | |
| 65 | Installing ndn-cxx |
| 66 | --------------------- |
| 67 | |
| 68 | * Download ndn-cxx source code. Use the link below for ndn-cxx code: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 69 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 70 | <pre> |
| 71 | git clone https://github.com/named-data/ndn-cxx.git |
| 72 | cd ndn-cxx |
| 73 | git checkout -b shared_library 7ed294302beee4979e97ff338dee0eb3eef51142 |
| 74 | </pre> |
| 75 | |
| 76 | * In library folder, build from the source code |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 77 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 78 | <pre> |
| 79 | ./waf configure --disable-static --enable-shared |
| 80 | ./waf |
| 81 | ./waf install |
| 82 | </pre> |
| 83 | |
| 84 | Installing ChronoSync |
| 85 | --------------------- |
| 86 | |
| 87 | * Download ChronoSync source code. Use the link below for the ChronoSync code: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 88 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 89 | <pre> |
| 90 | git clone https://github.com/named-data/ChronoSync.git |
| 91 | cd ChronoSync |
| 92 | </pre> |
| 93 | |
| 94 | * Build from the source code |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 95 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 96 | <pre> |
| 97 | ./waf configure |
| 98 | ./waf |
| 99 | ./waf install |
| 100 | </pre> |
| 101 | |
| 102 | |
| 103 | Installing ndn-atmos |
| 104 | --------------------- |
| 105 | |
| 106 | Follow the steps below to compile and install ndn-atmos: |
| 107 | |
| 108 | * Download the ndn-atmos source code. Use the command below: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 109 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 110 | <pre> |
| 111 | git clone https://github.com/named-data/ndn-atmos.git |
| 112 | cd ndn-atmos |
| 113 | </pre> |
| 114 | |
| 115 | * Build ndn-atmos in the project folder |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 116 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 117 | <pre> |
| 118 | ./waf configure |
| 119 | ./waf |
| 120 | ./waf install |
| 121 | </pre> |
| 122 | |
| 123 | * To test ndn-atmos, please use the steps below: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 124 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 125 | <pre> |
| 126 | ./waf configure --with-tests |
| 127 | ./waf |
| 128 | ./build/catalog/unit-tests |
| 129 | </pre> |
| 130 | |
Chengyu Fan | 55ba098 | 2015-06-17 14:09:37 -0600 | [diff] [blame] | 131 | * Note that if you are using Fedora or Ubuntu, you may need to create a configuration file for |
| 132 | ndn-cxx in /etc/ld.so.conf.d to include the path where the libndn-cxx.so is installed. Then |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 133 | update using `ldconfig` |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 134 | |
Chengyu Fan | 55ba098 | 2015-06-17 14:09:37 -0600 | [diff] [blame] | 135 | *For example, if the libndn-cxx.so is installed in /usr/local/lib64, you need to include |
| 136 | this path in a "ndn-cxx.conf" file in /etc/ld.so.conf.d directory, and then run "ldconfig". |
| 137 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 138 | |
| 139 | Running ndn-atmos |
| 140 | -------------------------- |
| 141 | |
| 142 | Install translator library |
| 143 | --------------------------- |
| 144 | 1. For the translator, ndn_cmmap_translator library is required to be in PYTHONPATH |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 145 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 146 | <pre> |
Susmit Shannigrahi | cad29ca | 2015-06-17 10:10:01 -0600 | [diff] [blame] | 147 | export PYTHONPATH="full path to /ndn-atmos/lib":$PYTHONPATH |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 148 | </pre> |
| 149 | |
| 150 | |
| 151 | Initializing Database |
| 152 | --------------------- |
| 153 | * Create a database using standard mysql tool. |
| 154 | * You also need to create a user and set a password to connect to the database the database. |
| 155 | * Note that you will need to have actual CMIP5 data to run the tool. |
| 156 | * Run |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 157 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 158 | <pre> |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 159 | python3 insert_names.py |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 160 | </pre> |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 161 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 162 | * Input full path to the filename and config file to translate |
| 163 | * A CMIP5 config file is located under |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 164 | </pre> /ndn-atmos/lib/ndn_cmmap_translators/etc/cmip5/cmip5.conf ``` |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 165 | * This will create a table named cmip5 and insert the names into the table |
| 166 | |
| 167 | |
| 168 | Starting NFD |
| 169 | ------------ |
| 170 | NFD is the NDN forwarding daemon. |
| 171 | |
| 172 | * Download NFD source code. Use the link below for the NFD code: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 173 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 174 | <pre> |
| 175 | git clone https://github.com/named-data/NFD.git |
| 176 | cd NFD |
| 177 | git checkout NFD-0.3.2 |
| 178 | git submodule init && git submodule update |
| 179 | </pre> |
| 180 | |
| 181 | * Build NFD |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 182 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 183 | <pre> |
| 184 | ./waf configure |
| 185 | ./waf |
| 186 | ./waf install |
| 187 | </pre> |
| 188 | |
| 189 | * Run NFD |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 190 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 191 | <pre> |
| 192 | nfd-start |
| 193 | </pre> |
| 194 | |
Chengyu Fan | 55ba098 | 2015-06-17 14:09:37 -0600 | [diff] [blame] | 195 | * Note that if you are using Fedora or Ubuntu, you may need to create a configuration file for |
| 196 | ndn-cxx in /etc/ld.so.conf.d to include the path where the libndn-cxx.so is installed. Then |
| 197 | update using command below: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 198 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 199 | <pre> |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 200 | ldconfig |
| 201 | </pre> |
| 202 | |
Chengyu Fan | 55ba098 | 2015-06-17 14:09:37 -0600 | [diff] [blame] | 203 | *For example, if the libndn-cxx.so is installed in /usr/local/lib64, you need to include |
| 204 | this path in a "ndn-cxx.conf" file in /etc/ld.so.conf.d directory, and then run "ldconfig". |
| 205 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 206 | |
| 207 | Launching atmos-catalog |
| 208 | ----------------------- |
| 209 | |
| 210 | * Make sure database is initialized and running |
| 211 | |
| 212 | * Create catalog configuration file |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 213 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 214 | <pre> |
| 215 | cp /usr/local/etc/ndn-atmos/catalog.conf.sample /usr/local/etc/ndn-atmos/catalog.conf |
| 216 | </pre> |
| 217 | |
| 218 | * Edit the configuration file /usr/local/etc/ndn-atmos/catalog.conf. Modify the database parameters |
| 219 | in both the queryAdapter and publishAdapter sections. |
| 220 | * Note that the database parameters in these two sections may be different to provide different |
| 221 | privileges. |
| 222 | |
| 223 | |
| 224 | * Run ndn-atmos |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 225 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 226 | <pre> |
| 227 | atmos-catalog |
| 228 | </pre> |
| 229 | |
| 230 | |
| 231 | Starting front end |
| 232 | ------------------ |
| 233 | |
| 234 | * Open the client folder in ndn-atmos |
| 235 | |
| 236 | * Checkout the ndn-js in the client folder. Use the link blow: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 237 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 238 | <pre> |
| 239 | git clone http://github.com/named-data/ndn-js.git |
| 240 | cd ndn-js |
Susmit Shannigrahi | cad29ca | 2015-06-17 10:10:01 -0600 | [diff] [blame] | 241 | git checkout v0.8.1 |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 242 | </pre> |
| 243 | |
| 244 | * Start python simple server in the client folder (ndn-atmos/client) |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 245 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 246 | <pre> |
| 247 | python -m SimpleHTTPServer |
| 248 | </pre> |
| 249 | |
| 250 | * Open project query page in a web browser |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 251 | |
susmit shannigrahi | 4bc4ce8 | 2015-06-15 12:14:08 -0600 | [diff] [blame] | 252 | <pre> |
| 253 | http://localhost:8000/query/query.html |
| 254 | </pre> |