bfa9cee9f3ca7ef35f07a6c314fbc7c256d771b8
[unfold.git] / portal / templates / slice-tab-experiment.html
1 <div class="col-md-10 col-md-offset-1">
2 <script type="text/javascript">
3     $(document).ready(function() {
4         console.log('{{platforms}}');
5             {% for platform in platforms %}
6         // /sfa/Describe?hrn=onelab.upmc.projectx.slicex&platform[]={{platform}}&type=slice
7         $.post("/sfa/Describe",{'hrn':'{{slicename}}', 'type':'slice', 'platform':['{{platform}}']}, function( data ) {
8             if('parsed' in data['{{platform}}'] && 'rspec' in data['{{platform}}']['parsed']){
9                 rspec = data['{{platform}}']['parsed']['rspec'];
10                 if('node' in rspec){
11                     jQuery.each( rspec['node'], function( i, node ) {
12                         render_node('{{platform}}',node);
13                     });
14                 }
15             }
16         });
17             {% endfor %}
18     });
19     
20     function render_node(platform, node){
21         console.log(platform,node);
22         if('@component_manager_id' in node){
23             // urn:publicid:IDN+ple+authority+cm
24             t_urn = node['@component_manager_id'].split('+');
25             //if(t_urn[1].indexOf(":") > -1)
26             testbed = t_urn[1];
27             if(!$('#'+testbed).length){
28                 testbed = 'default';
29             }
30         }else{
31             testbed = 'default';
32         }
33         if('services' in node && 'login' in node['services']){
34             console.log(node['services']['login']);
35             login = node['services']['login'];
36             if('@port' in login && login['@port']!='22'){
37                 $('#'+testbed).append("<p class='command'>$ ssh "+login['@username']+"@"+login['@hostname']+" -p "+login['@port']+"</p>");
38             }else{
39                 $('#'+testbed).append("<p class='command'>$ ssh "+login['@username']+"@"+login['@hostname']+"</p>");
40             }
41         
42         }else if('@component_name' in node){
43             console.log(node['@component_name']);
44         }else{
45             console.log(node);
46         }
47         $("#access").show();
48
49         $('#'+testbed).show();
50         if($('#'+testbed+'_header').length){
51             $('#'+testbed+'_header').show();
52         }
53         if($('#'+testbed+'_footer').length){
54             $('#'+testbed+'_footer').show();
55         }
56     }
57 </script>
58 <div id="access" style="display:none;">
59     <h2>How to access your reserved resources</h2>
60 </div>
61 <div id="default">
62 </div>
63 <div id="ple_header" style="display:none;">
64         <h3>PlanetLab Europe</h3>
65         
66         <p>
67                 PlanetLab Europe resources are accessible directly via SSH. Your SSH public key is deployed automatically
68                 on the reserved nodes. To access your slice on a resource just type the following command:
69         </p>
70 </div>
71 <div id="ple" style="display:none;">
72 </div>
73 <div id="ple_footer" style="display:none;">
74         <p><strong>NOTE:</strong> Your original slicename <b>{{slicename}}</b> has been converted to PlanetLab specific format <b>{{ple_slicename}}</b> in order to do SSH.</p>
75         <p>
76                 Be aware that after you reserve a PlanetLab Europe resource your slice will be deployed with a delay of about 15 minutes, 
77                 after witch you will be able to access the resource.
78         </p>
79     <div id="initscript">
80         <div>
81             <h4>Init Script on PLE</h4>
82             <i>This bash script will be deployed on all PLE nodes of your slice</i>
83         </div>
84         <textarea style="width:100%; height:100px;" id="initscript_code"></textarea><br>
85 <!-- TODO !!!
86         <div>
87             <select>
88                 <option>All</option>
89                 <option>node1</option>
90                 <option>node2</option>
91             </select>
92         </div>
93 -->
94         <button name="deploy" class="btn btn-success btn-sm" onclick="deploy('{{slicename}}');">Deploy</button>
95         <button name="delete" class="btn btn-danger btn-xs" onclick="del('{{slicename}}');">Delete</button>
96     </div>
97     <script type="text/javascript">
98     $(document).ready(function() {
99         $.post("/initscript/get/",{'slice_hrn':'{{slicename}}'}, function( data ) {
100             console.log(data);
101             jQuery('#initscript_code').val(data['initscript_code']);
102         });
103     });
104     function deploy(slice_hrn){
105         console.log("deploy = "+slice_hrn);
106         var initscript_code = jQuery('#initscript_code').val()
107         $.post("/initscript/update/",{'slice_hrn':slice_hrn, 'initscript_code':initscript_code}, function( data ) {
108             console.log(data);
109             if (data['ret'] == 0) {
110                 mysliceAlert('Success: initscript deployed','success', true);
111             }else{
112                 mysliceAlert('Rest Error for: '+data.error,'warning', true);
113             }
114             //jQuery('#initscript_code').val(data['initscript_code']);
115         });
116     }
117     function del(slice_hrn){
118         console.log("delete");
119         $.post("/initscript/delete/",{'slice_hrn':slice_hrn}, function( data ) {
120             console.log(data);
121             if (data['ret'] == 0) {
122                 mysliceAlert('Success: initscript deleted','success', true);
123                 jQuery('#initscript_code').val('');
124             }else{
125                 mysliceAlert('Rest Error for: '+data.error,'warning', true);
126             }
127
128         });
129     }
130     </script>
131     <br>
132 </div>
133 <div id="iotlab_header" style="display:none;">
134         <h3>FIT IoT-Lab</h3>
135         <p>FIT IoT-Lab resources are accessible directly via SSH and <a href="https://www.iot-lab.info/testbed/" target="_blank">web GUI.</a>
136                 To acess IoT-Lab resources using web GUI, use the same login and  password of OneLab portal. To acess Iot-Lab resources using SSH type
137                 the following command:
138         </p>
139 </div>
140 <div id="iotlab" style="display:none;">
141 </div>
142 <div id="nitos_header" style="display:none;">
143         <h3>NITOS Volos (Greece)</h3>
144         
145         <p>
146          NITOS resources are not directly accessible. You will need to log in on a gateway server and from there access the node.
147          You will find the ssh commands to connect to NITOS nodes below:
148         </p>
149         <h4>NITLab</h4>
150         <p class="command">
151             $ ssh {{slicename}}@nitlab.inf.uth.gr #nodes 001-040<br>
152         $ ssh {{slicename}}@nitlab2.inf.uth.gr #nodes 041-049<br>
153         $ ssh {{slicename}}@nitlab3.inf.uth.gr #nodes > 049
154     </p>
155 </div>
156 <div id="nitos" style="display:none;">
157         <p>Loading an OMF-compatible image on your resource:</p>
158         <p class="command">
159                 <b>Resource</b><br>
160         $ omf6 stat -t {{resource}} #check the status of the node<br>
161         $ omf6 tell -a on -t {{resource}}  #turn on/off the node <br>
162         $ omf6 load -i baseline.ndz -t {{resource}}  #for orbit-like node (002-009) use "baseline_orbit.ndz"<br>
163         </p>
164 </div>
165 <div id="nitos_footer" style="display:none;">
166     <p><b>NOTE:</b> Nodes 002-009 are orbit-like nodes. For these nodes use "baseline_orbit.ndz". All these images come with OMF5.4 resource controller. To do OMF6 experiments use "baseline_omf6_1_1.ndz" and  "baseline_orbit_omf6_1_1.ndz" for grid nodes and orbit nodes respectively. </p>
167 </div>
168         {% if nitos_paris_resources %}
169         <h4>FIT NITOS-Lab Paris</h4>
170          <p class="command">
171                 $ ssh {{slicename}}@griffin.ipv6.lip6.fr
172          </p>
173         <p>For each of the reserved nodes, follo the steps given below:</p>
174         <p class="command">
175         {%for resource in nitos_paris_resources %}
176                 <b>Resource</b><br>
177         $ omf load -i baseline_grid.ndz -t {{resource}}  #loading OMF image on the node<br>
178         $ omf tell -a on -t {{resource}}  #turn on the node <br>
179         $ ssh root@{{resource}}  #ssh to the node<br><br>
180         {%endfor%}
181         </p>
182
183         <p>
184                 On the node itself you will have to modify the file /etc/omf-resctl-5.3/omf-resctl.yaml (OMF5.4 only) according to your slice settings and then
185                 restart the OMF Resource Controller and finally execute the experiment:
186         </p>
187         <p class="command">
188                 $ omf exec --slice {{slicename}} your_exp.rb
189         </p>
190         <p>
191         The complete tutorial on NITOS nodes:
192         <a target="_blank" href="http://nitlab.inf.uth.gr/NITlab/index.php/testbed/instructions/basic-tutorial">NITOS basic tutorial</a>
193         </p>
194     <p>OMF based experiments' tutorials are available <a href="http://nitlab.inf.uth.gr/NITlab/index.php/testbed/instructions/omf-tutorials-scenarios" target="_blank">here.</a></p> 
195         <p>To learn more about OMF, please click <a href="http://omf.mytestbed.net/projects/omf/wiki/OMF_Main_Page" target="_blank">here.</a></p>
196
197         {% endif %}
198         
199         <h2>Available Tools</h2>
200         <p><img src="{{ STATIC_URL }}img/terminal_icon.png" width="50"> <b>SSH</b></p>
201         <p>
202         Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
203         </p>
204         <p> More info: <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">http://en.wikipedia.org/wiki/Secure_Shell</a></p>
205         <br>
206         <p><img src="{{ STATIC_URL }}img/putty-logo.png" width="50"> <b>PuTTY</b></p>
207         <p>
208                 PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers.
209         </p>
210         <p>More info: <a href="http://www.putty.org/" target="_blank">http://www.putty.org/</a></p>     
211         <br>
212         <p><img src="{{ STATIC_URL }}img/nepi_logo.png" width="90"></p>
213         <p>NEPI, the Network Experimentation Programming Interface, is a life-cycle management tool for network experiments. The idea behind NEPI is to provide a single tool to design, deploy, and control network experiments, and gather the experiment results. Going further, NEPI was specially conceived to function with arbitrary experimentation platforms, so researchers could use a single tool to work with network simulators, emulators, or physical testbeds, or even a mixture of them. To accomplish this, NEPI provides a high-level interface to describe experiments that is independent from any experimentation platform, but is able to capture platform specific configurations. Experiment definitions can be stored in XML format to be later reproduced, and modified according to experimentation needs. Experiment execution is orchestrated by a global experiment controller, that is platform independent, and different platform-dependent testbed controllers, creating a control hierarchy that is able t adapt to platform specific requirements while providing an integrated control scheme.</p>
214         <p> More info: <a href="http://nepi.inria.fr" target="_blank">http://nepi.inria.fr</a></p>
215         <br>
216         <p><img src="{{ STATIC_URL }}img/omf-logo.png" width="90"></p>
217         <p>OMF is a Testbed Control, Measurement and Management Framework.</p>
218         <p>
219         OMF was originally developed for the ORBIT wireless testbed at Winlab, Rutgers University. Since 2007, OMF has been actively extended to operate on testbeds with many different type of network and resource technologies. It is now deployed and used on different testbeds in Australia, Europe, and in the U.S. OMF is currently being extended further to support exciting new features and technologies. This website is hosting this ongoing activity. OMF development is now conducted essentially within the TEMPO project at NICTA (Australia) in strong collaboration with Winlab (Rutgers University).
220         </p>
221         <p>In addition to the main OMF software, this site also hosts OMF sub-projects addressing various related aspects of a testbed's control, measurement, and management.</p>
222         <p>More Info: <a href="http://mytestbed.net/projects/omf" target="_blank">http://mytestbed.net/projects/omf</a></p>
223 </div>