blob: 8545d611317916f859a7547e84bf923114cbbf93 [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
5####If you have trouble running it, drop an email to <ndn-sci@netsec.colostate.edu>.
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
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>
35 brew install boost sqlite3 mysql jsoncpp
36</pre>
37
38 * For Ubuntu, use the command below to install the prerequisites:
39<pre>
40 sudo apt-get install libboost-all-dev libssl-dev libcrypto++-dev \
41 libsqlite3-dev libmysqlclient-dev libjsoncpp-dev \
42 protobuf-compiler libprotobuf-dev netcdf4-python \
43 python3-mysql.connector
44</pre>
45 * For Fedora, use the command below to install the prerequisites:
46<pre>
47 sudo yum install boost-devel openssl-devel cryptopp-devel sqlite3x-devel \
48 mysql-devel jsoncpp-devel protobuf-compiler protobuf-devel \
49 netcdf4-python3 mysql-connector-python3
50</pre>
51
52
53
54Installing ndn-cxx
55---------------------
56
57* Download ndn-cxx source code. Use the link below for ndn-cxx code:
58<pre>
59 git clone https://github.com/named-data/ndn-cxx.git
60 cd ndn-cxx
61 git checkout -b shared_library 7ed294302beee4979e97ff338dee0eb3eef51142
62</pre>
63
64* In library folder, build from the source code
65<pre>
66 ./waf configure --disable-static --enable-shared
67 ./waf
68 ./waf install
69</pre>
70
71Installing ChronoSync
72---------------------
73
74* Download ChronoSync source code. Use the link below for the ChronoSync code:
75<pre>
76 git clone https://github.com/named-data/ChronoSync.git
77 cd ChronoSync
78</pre>
79
80* Build from the source code
81<pre>
82 ./waf configure
83 ./waf
84 ./waf install
85</pre>
86
87
88Installing ndn-atmos
89---------------------
90
91Follow the steps below to compile and install ndn-atmos:
92
93* Download the ndn-atmos source code. Use the command below:
94<pre>
95 git clone https://github.com/named-data/ndn-atmos.git
96 cd ndn-atmos
97</pre>
98
99* Build ndn-atmos in the project folder
100<pre>
101 ./waf configure
102 ./waf
103 ./waf install
104</pre>
105
106* To test ndn-atmos, please use the steps below:
107<pre>
108 ./waf configure --with-tests
109 ./waf
110 ./build/catalog/unit-tests
111</pre>
112
113* Note that you may need to set the LD_LIBRARY_PATH to include the path where the ndn-cxx shared
114library is installed. For example:
115<pre>
116 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
117 ldconfig
118</pre>
119
120
121Running ndn-atmos
122--------------------------
123
124Install translator library
125---------------------------
1261. For the translator, ndn_cmmap_translator library is required to be in PYTHONPATH
127<pre>
128 export PYTHONPATH="full path to /ndn-atmos/lib/ndn_cmmap_translators":$PYTHONPATH
129</pre>
130
131
132Initializing Database
133---------------------
134* Create a database using standard mysql tool.
135* You also need to create a user and set a password to connect to the database the database.
136* Note that you will need to have actual CMIP5 data to run the tool.
137* Run
138<pre>
139$ python3 insert_names.py
140</pre>
141* Input full path to the filename and config file to translate
142* A CMIP5 config file is located under
143<pre> /ndn-atmos/lib/ndn_cmmap_translators/etc/cmip5/cmip5.conf </pre>
144* This will create a table named cmip5 and insert the names into the table
145
146
147Starting NFD
148------------
149NFD is the NDN forwarding daemon.
150
151* Download NFD source code. Use the link below for the NFD code:
152<pre>
153 git clone https://github.com/named-data/NFD.git
154 cd NFD
155 git checkout NFD-0.3.2
156 git submodule init && git submodule update
157</pre>
158
159* Build NFD
160<pre>
161 ./waf configure
162 ./waf
163 ./waf install
164</pre>
165
166* Run NFD
167<pre>
168 nfd-start
169</pre>
170
171* Note that you may need to set the LD_LIBRARY_PATH to include the path where the ndn-cxx shared
172library is installed. For example:
173<pre>
174 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
175 ldconfig
176</pre>
177
178
179Launching atmos-catalog
180-----------------------
181
182* Make sure database is initialized and running
183
184* Create catalog configuration file
185<pre>
186 cp /usr/local/etc/ndn-atmos/catalog.conf.sample /usr/local/etc/ndn-atmos/catalog.conf
187</pre>
188
189* Edit the configuration file /usr/local/etc/ndn-atmos/catalog.conf. Modify the database parameters
190in both the queryAdapter and publishAdapter sections.
191* Note that the database parameters in these two sections may be different to provide different
192privileges.
193
194
195* Run ndn-atmos
196<pre>
197 atmos-catalog
198</pre>
199
200
201Starting front end
202------------------
203
204* Open the client folder in ndn-atmos
205
206* Checkout the ndn-js in the client folder. Use the link blow:
207<pre>
208 git clone http://github.com/named-data/ndn-js.git
209 cd ndn-js
210 git checkout v0.8.1 (or the latest version)
211</pre>
212
213* Start python simple server in the client folder (ndn-atmos/client)
214<pre>
215 python -m SimpleHTTPServer
216</pre>
217
218* Open project query page in a web browser
219<pre>
220 http://localhost:8000/query/query.html
221</pre>