184 | | === 3.3. Modify the RSpec to automatically install and execute CCNX software === |
185 | | |
186 | | '''Background:''' For this experiment, we need to install the following software on the nodes: |
187 | | * The CCNX software (ccnx-0.6.2.tar.gz) |
188 | | * Scripts that set up the CCNX software (ccnx-setup.tar.gz) |
189 | | * Scripts used to pull atmospheric precipitation data using the CCNX protocol (ccnx-atmos.tar.gz) |
190 | | |
191 | | When the nodes start up, we need the following scripts to be executed: |
192 | | * Script that sets up the node (node-setup) |
193 | | * Script that sets up the ccnx protocol (ccnx-setup) |
194 | | * Script that setup up ccnx protocol routes (add-precip-routes) |
195 | | |
196 | | In the following steps we automate the installation and running of the software using install and execute scripts in the RSpec. |
197 | | |
198 | | {{{ |
199 | | #!html |
200 | | <table><tr> |
201 | | <td colspan=2> |
202 | | <ol type='a'> |
203 | | <li>Click on the <b>collab node</b> (see figure) to manipulate details of the node configuration. |
204 | | |
205 | | |
206 | | <table id="Table_01" border="0" cellpadding="5" cellspacing="0"> |
207 | | <tr> |
208 | | <td> |
209 | | <img src="http://trac.gpolab.bbn.com/gcf/raw-attachment/wiki/Graphics/4NotesIcon_512x512.png" width="50" height="50" alt="Note"> |
210 | | </td> |
211 | | <td> |
212 | | When you open the node information, you should see a new pane with fields to fill in like |
213 | | in the figure. |
214 | | </td> |
215 | | </tr> |
216 | | </table> |
217 | | |
218 | | |
219 | | </li> |
220 | | </ol> |
221 | | </td> |
222 | | |
223 | | <td colspan=2> |
224 | | <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JacksLab1_5.png?format=raw" width='500'/> |
225 | | <br /> |
226 | | <b>Figure 3-2</b> <i>Edit the nodes</i> |
227 | | </td> |
228 | | </tr> |
229 | | </table> |
230 | | |
231 | | <table> |
232 | | <tr><td> |
233 | | <ol type='a' start='2'> |
234 | | |
235 | | <li>The way we will request installation of the proper software and execution |
236 | | of our experiment is to add <i>install</i> and <i>execute</i> services. |
237 | | </li> |
238 | | </td> |
239 | | <td> |
240 | | <img width='500' src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JacksLab1_6.png?format=raw" /> |
241 | | <br /> |
242 | | <b>Figure 3-3</b> <i>Specify the install and execute scripts </i> |
243 | | </td></tr> |
244 | | |
245 | | |
246 | | </table> |
247 | | |
248 | | <table> |
249 | | |
250 | | <tr> |
251 | | <td colspan=2> |
252 | | <ol type='a' start='3'> |
253 | | <li> |
254 | | You will be adding three install scripts. First, select "<tt>Add</tt>" under the <b>Install Scripts</b> sections as shown. In the box in the <b>URL</b> field enter (cut-and-paste): <br> |
255 | | <pre>http://www.gpolab.bbn.com/experiment-support/LabOne/ccnx/ccnx-0.6.2.tar.gz</pre> |
256 | | and enter |
257 | | <pre>/</pre> |
258 | | in the box under it (labeled 'Install Path:'). |
259 | | <br> |
260 | | <br> |
261 | | Now, select "<tt>Add</tt>" under the <b>Install Scripts</b> again. This time add: <br> |
262 | | <pre>http://www.gpolab.bbn.com/experiment-support/LabOne/ccnx/ccnx-atmos.tar.gz</pre> |
263 | | and enter <br> |
264 | | <pre>/</pre> |
265 | | in the box under it (labeled 'Install Path:'). |
266 | | <br> |
267 | | <br> |
268 | | Similarly, add a third install service: |
269 | | <pre>http://www.gpolab.bbn.com/experiment-support/LabOne/ccnx/ccnx-setup.tar.gz</pre> |
270 | | and enter <br> |
271 | | <pre>/tmp</pre> |
272 | | in the box under it (labeled 'Install Path:'). <strong> Note the different install directory this time. </strong> |
273 | | <br> |
274 | | <br> |
275 | | |
276 | | <li>In a similar manner, use the "<tt>Add</tt>" button under the <b>Execute Scripts</b> section to add three execute services on this node: |
277 | | <br> |
278 | | <pre> |
279 | | cd /tmp/ccnx-setup && ./node-setup |
280 | | cd /tmp/ccnx-setup && ./add-precip-routes rsrchr |
281 | | cd /tmp/ccnx-setup && ./ccnx-setup router 4 |
282 | | </pre> |
283 | | </li> |
284 | | |
285 | | <table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" width='50' height='50'/></td><td>Be very careful when entering this information -- these commands will not |
286 | | be executed yet, so it will be some time before you will see any relevant |
287 | | error messages if there is a mistake here.</td></tr></table> |
288 | | </li> |
289 | | </ol> |
290 | | </table> |
292 | | <table> |
293 | | <tr><td> |
294 | | <ol type='a' start='5'> |
295 | | <li> You <i> DO NOT </i> have to specify install and execute scripts for the other nodes as they have already been done for you. You can check this by clicking on the icons for these nodes. </li> |
296 | | |
297 | | |
298 | | </ol> |
299 | | </td> |
300 | | </tr> |
301 | | |
302 | | </table> |
303 | | }}} |
304 | | |
305 | | |
306 | | |
307 | | |
308 | | === 3.4. Export the modified request RSpec === |
309 | | Now we will pull back some of the covers and inspect exactly what Jacks has been doing for us when preparing the RSpecs for the experiments we design. Each node and link has a corresponding element in the RSpec, and the details of the component configuration (such as the install and execute services we requested above) are specified with attributes, or sometimes child elements, within those portions of the document. |
310 | | |
311 | | {{{ |
312 | | #!html |
313 | | <table><tr> |
314 | | <td> |
315 | | <ol type='a'> |
316 | | <li>From the <i>Add Resources</i> window (see figure), select the <b>View |
317 | | Rspec</b> button on the top right hand side. This will bring up a pane showing the |
318 | | current RSpec -- please take a moment to inspect it. The `<node>` and `<link>` elements |
319 | | contain the specification for the components we will request, and if you |
320 | | look closely, you will be able to see the install and execute service |
321 | | elements you added earlier. Click on the "View RSpec" button again to return to the main screen. |
322 | | </li> |
323 | | |
324 | | </ol> |
325 | | </td> |
326 | | <td> |
327 | | <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/JacksLab1_7.png?format=raw" width='500'/> |
328 | | <br/> |
329 | | <b>Figure 3-4</b> View and save the final request RSpec |
330 | | </td> |
331 | | </tr></table> |
332 | | |
333 | | <table><tr> |
334 | | <td> |
335 | | <ol type='a' start=2> |
336 | | <li>Use the <b>Download</b> button (in the lower left part of the screen next to Save RSpec) to |
337 | | make a local copy of your RSpec with the name <tt>rspec.xml</tt>. We'll use this in the next step to |
338 | | demonstrate how other client tools also use RSpec files to communicate |
339 | | requests to aggregate managers.</li> |
340 | | </ol> |
341 | | </td></tr> |
342 | | </table> |
343 | | }}} |
344 | | |
345 | | |
346 | | |
347 | | === 3.5. Instantiate the new experiment using Omni === |
348 | | |
349 | | For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client. |
350 | | |
351 | | From a terminal, please enter the command: |
352 | | {{{ |
353 | | $ omni -a AM_NICKNAME createsliver SLICENAME RSPEC_FILE |
354 | | }}} |
355 | | where {{{AM_NICKNAME}}} is the nickname for your assigned aggregate manager and {{{SLICENAME}}} is the name of the slice you created earlier (both of these are given on your worksheet). {{{RSPEC_FILE}}} should be replaced with the filename of the RSpec you saved in step 3.4. |
356 | | |
357 | | |
358 | | If all is well, Omni should give you a number of informational messages, such as: |
359 | | {{{ |
360 | | INFO:omni:Loading config file /home/geni/.gcf/omni_config |
361 | | }}} |
362 | | |
363 | | It should quickly proceed to the point where it makes the request to the remote manager: |
364 | | {{{ |
365 | | INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ... |
366 | | }}} |