blob: a6ec74542ada25af14206c254a479c958df2a8fc [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
120* Note that you may need to set the LD_LIBRARY_PATH to include the path where the ndn-cxx shared
121library is installed. For example:
122<pre>
123 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
124 ldconfig
125</pre>
126
127
128Running ndn-atmos
129--------------------------
130
131Install translator library
132---------------------------
1331. For the translator, ndn_cmmap_translator library is required to be in PYTHONPATH
134<pre>
Susmit Shannigrahicad29ca2015-06-17 10:10:01 -0600135 export PYTHONPATH="full path to /ndn-atmos/lib":$PYTHONPATH
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600136</pre>
137
138
139Initializing Database
140---------------------
141* Create a database using standard mysql tool.
142* You also need to create a user and set a password to connect to the database the database.
143* Note that you will need to have actual CMIP5 data to run the tool.
144* Run
145<pre>
146$ python3 insert_names.py
147</pre>
148* Input full path to the filename and config file to translate
149* A CMIP5 config file is located under
150<pre> /ndn-atmos/lib/ndn_cmmap_translators/etc/cmip5/cmip5.conf </pre>
151* This will create a table named cmip5 and insert the names into the table
152
153
154Starting NFD
155------------
156NFD is the NDN forwarding daemon.
157
158* Download NFD source code. Use the link below for the NFD code:
159<pre>
160 git clone https://github.com/named-data/NFD.git
161 cd NFD
162 git checkout NFD-0.3.2
163 git submodule init && git submodule update
164</pre>
165
166* Build NFD
167<pre>
168 ./waf configure
169 ./waf
170 ./waf install
171</pre>
172
173* Run NFD
174<pre>
175 nfd-start
176</pre>
177
178* Note that you may need to set the LD_LIBRARY_PATH to include the path where the ndn-cxx shared
179library is installed. For example:
180<pre>
181 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
182 ldconfig
183</pre>
184
185
186Launching atmos-catalog
187-----------------------
188
189* Make sure database is initialized and running
190
191* Create catalog configuration file
192<pre>
193 cp /usr/local/etc/ndn-atmos/catalog.conf.sample /usr/local/etc/ndn-atmos/catalog.conf
194</pre>
195
196* Edit the configuration file /usr/local/etc/ndn-atmos/catalog.conf. Modify the database parameters
197in both the queryAdapter and publishAdapter sections.
198* Note that the database parameters in these two sections may be different to provide different
199privileges.
200
201
202* Run ndn-atmos
203<pre>
204 atmos-catalog
205</pre>
206
207
208Starting front end
209------------------
210
211* Open the client folder in ndn-atmos
212
213* Checkout the ndn-js in the client folder. Use the link blow:
214<pre>
215 git clone http://github.com/named-data/ndn-js.git
216 cd ndn-js
Susmit Shannigrahicad29ca2015-06-17 10:10:01 -0600217 git checkout v0.8.1
susmit shannigrahi4bc4ce82015-06-15 12:14:08 -0600218</pre>
219
220* Start python simple server in the client folder (ndn-atmos/client)
221<pre>
222 python -m SimpleHTTPServer
223</pre>
224
225* Open project query page in a web browser
226<pre>
227 http://localhost:8000/query/query.html
228</pre>