blob: 5758a8db98b609bbbc75cfca8f8e45a8e4955069 [file] [log] [blame] [view]
Chengyu Fan8b92f122015-03-09 22:13:36 -06001ndn-atmos
Chengyu Fan8b92f122015-03-09 22:13:36 -06002============
3
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -06004### This is pre-release software
susmit shannigrahi33e57252015-06-16 13:17:09 -06005####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 shannigrahi4bc4ce82015-06-15 12:14:08 -06006
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
14Dependencies
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 Scott08263852015-07-31 19:05:52 -060034
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060035<pre>
Susmit Shannigrahicad29ca2015-06-17 10:10:01 -060036 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 shannigrahi4bc4ce82015-06-15 12:14:08 -060040</pre>
41
42 * For Ubuntu, use the command below to install the prerequisites:
Tyler Scott08263852015-07-31 19:05:52 -060043
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060044<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 Shannigrahicad29ca2015-06-17 10:10:01 -060048 python3-mysql.connector python3-pip libhdf5-dev \
49 libnetcdf-dev python3-numpy
50
Tyler Scott08263852015-07-31 19:05:52 -060051 sudo pip3 install netCDF4
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060052</pre>
Susmit Shannigrahicad29ca2015-06-17 10:10:01 -060053
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060054 * For Fedora, use the command below to install the prerequisites:
Tyler Scott08263852015-07-31 19:05:52 -060055
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060056<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
64Installing ndn-cxx
65---------------------
66
67* Download ndn-cxx source code. Use the link below for ndn-cxx code:
Tyler Scott08263852015-07-31 19:05:52 -060068
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060069<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 Scott08263852015-07-31 19:05:52 -060076
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060077<pre>
78 ./waf configure --disable-static --enable-shared
79 ./waf
80 ./waf install
81</pre>
82
83Installing ChronoSync
84---------------------
85
86* Download ChronoSync source code. Use the link below for the ChronoSync code:
Tyler Scott08263852015-07-31 19:05:52 -060087
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060088<pre>
89 git clone https://github.com/named-data/ChronoSync.git
90 cd ChronoSync
91</pre>
92
93* Build from the source code
Tyler Scott08263852015-07-31 19:05:52 -060094
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -060095<pre>
96 ./waf configure
97 ./waf
98 ./waf install
99</pre>
100
101
102Installing ndn-atmos
103---------------------
104
105Follow the steps below to compile and install ndn-atmos:
106
107* Download the ndn-atmos source code. Use the command below:
Tyler Scott08263852015-07-31 19:05:52 -0600108
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600109<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 Scott08263852015-07-31 19:05:52 -0600115
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600116<pre>
117 ./waf configure
118 ./waf
119 ./waf install
120</pre>
121
122* To test ndn-atmos, please use the steps below:
Tyler Scott08263852015-07-31 19:05:52 -0600123
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600124<pre>
125 ./waf configure --with-tests
126 ./waf
127 ./build/catalog/unit-tests
128</pre>
129
Chengyu Fan55ba0982015-06-17 14:09:37 -0600130* Note that if you are using Fedora or Ubuntu, you may need to create a configuration file for
131ndn-cxx in /etc/ld.so.conf.d to include the path where the libndn-cxx.so is installed. Then
Tyler Scott08263852015-07-31 19:05:52 -0600132update using `ldconfig`
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600133
Chengyu Fan55ba0982015-06-17 14:09:37 -0600134*For example, if the libndn-cxx.so is installed in /usr/local/lib64, you need to include
135this path in a "ndn-cxx.conf" file in /etc/ld.so.conf.d directory, and then run "ldconfig".
136
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600137
138Running ndn-atmos
139--------------------------
140
141Install translator library
142---------------------------
1431. For the translator, ndn_cmmap_translator library is required to be in PYTHONPATH
Tyler Scott08263852015-07-31 19:05:52 -0600144
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600145<pre>
Susmit Shannigrahicad29ca2015-06-17 10:10:01 -0600146 export PYTHONPATH="full path to /ndn-atmos/lib":$PYTHONPATH
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600147</pre>
148
149
150Initializing 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 Scott08263852015-07-31 19:05:52 -0600156
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600157<pre>
Tyler Scott08263852015-07-31 19:05:52 -0600158 python3 insert_names.py
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600159</pre>
Tyler Scott08263852015-07-31 19:05:52 -0600160
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600161* Input full path to the filename and config file to translate
162* A CMIP5 config file is located under
Tyler Scott08263852015-07-31 19:05:52 -0600163</pre> /ndn-atmos/lib/ndn_cmmap_translators/etc/cmip5/cmip5.conf ```
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600164* This will create a table named cmip5 and insert the names into the table
165
166
167Starting NFD
168------------
169NFD is the NDN forwarding daemon.
170
171* Download NFD source code. Use the link below for the NFD code:
Tyler Scott08263852015-07-31 19:05:52 -0600172
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600173<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 Scott08263852015-07-31 19:05:52 -0600181
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600182<pre>
183 ./waf configure
184 ./waf
185 ./waf install
186</pre>
187
188* Run NFD
Tyler Scott08263852015-07-31 19:05:52 -0600189
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600190<pre>
191 nfd-start
192</pre>
193
Chengyu Fan55ba0982015-06-17 14:09:37 -0600194* Note that if you are using Fedora or Ubuntu, you may need to create a configuration file for
195ndn-cxx in /etc/ld.so.conf.d to include the path where the libndn-cxx.so is installed. Then
196update using command below:
Tyler Scott08263852015-07-31 19:05:52 -0600197
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600198<pre>
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600199 ldconfig
200</pre>
201
Chengyu Fan55ba0982015-06-17 14:09:37 -0600202*For example, if the libndn-cxx.so is installed in /usr/local/lib64, you need to include
203this path in a "ndn-cxx.conf" file in /etc/ld.so.conf.d directory, and then run "ldconfig".
204
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600205
206Launching atmos-catalog
207-----------------------
208
209* Make sure database is initialized and running
210
211* Create catalog configuration file
Tyler Scott08263852015-07-31 19:05:52 -0600212
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600213<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
218in both the queryAdapter and publishAdapter sections.
219* Note that the database parameters in these two sections may be different to provide different
220privileges.
221
222
223* Run ndn-atmos
Tyler Scott08263852015-07-31 19:05:52 -0600224
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600225<pre>
226 atmos-catalog
227</pre>
228
229
230Starting 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 Scott08263852015-07-31 19:05:52 -0600236
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600237<pre>
238 git clone http://github.com/named-data/ndn-js.git
239 cd ndn-js
Susmit Shannigrahicad29ca2015-06-17 10:10:01 -0600240 git checkout v0.8.1
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600241</pre>
242
243* Start python simple server in the client folder (ndn-atmos/client)
Tyler Scott08263852015-07-31 19:05:52 -0600244
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600245<pre>
246 python -m SimpleHTTPServer
247</pre>
248
249* Open project query page in a web browser
Tyler Scott08263852015-07-31 19:05:52 -0600250
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600251<pre>
252 http://localhost:8000/query/query.html
253</pre>