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