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