experiment tab
[myslice.git] / portal / templates / slice-tab-experiment.html
1 <script type="text/javascript">
2 function is_finished(len_platforms, pf_status){
3     if(len_platforms == pf_status){
4         return true;
5     }else{
6         return false;
7     }
8 }
9
10 // Specific DIVs for each type of testbed
11 $(document).ready(function() {
12     var platform_status = Array();
13     var platform_empty = Array();
14     {% for platform in platforms %}
15     // /sfa/Describe?hrn=onelab.upmc.projectx.slicex&platform[]={{platform}}&type=slice
16     $.post("/sfa/Describe",{'hrn':'{{slicename}}', 'type':'slice', 'platform':['{{platform}}']}, function( data ) {
17         console.log(data);
18         if('parsed' in data['{{platform}}'] && 'rspec' in data['{{platform}}']['parsed']){
19             rspec = data['{{platform}}']['parsed']['rspec'];
20             if('node' in rspec){
21                 if(rspec['node'] instanceof Array) {
22                     jQuery.each( rspec['node'], function( i, node ) {
23                         render_node('{{platform}}',node);
24                     });
25                 }else{
26                     render_node('{{platform}}',rspec['node']);
27                 }
28             }else{
29                 platform_empty.push('{{platform}}');
30             }
31         }else{
32             platform_empty.push('{{platform}}');
33         }
34         platform_status.push('{{platform}}');
35         if(is_finished({{len_platforms}},platform_status.length)){
36             $("#loading").hide();
37             if(platform_empty.length == {{len_platforms}}){
38                 $("#warning_message").show();
39             }
40         }
41     });
42     {% endfor %}
43 });
44 </script>
45 <div class="col-md-10 col-md-offset-1">
46 <div id="access">
47     <h2>How to access your reserved resources?</h2>
48     <img src="{{ STATIC_URL }}img/loading.gif" id="loading" alt="Loading reserved resources" />
49 </div>
50 <div id="warning_message" style="display:none; color:orange; font-weigh:bold;">
51 Please add resources to your slice from the left tab <a href="/resources/{{slicename}}">"Resources"</a>
52 </div>
53 <div id="default">
54 </div>
55 {% if "ple" in platforms %}
56 <div id="ple_header" style="display:none;">
57         <h3>PlanetLab Europe</h3>
58         
59         <p>
60                 PlanetLab Europe resources are accessible directly via SSH. Your SSH public key is deployed automatically
61                 on the reserved nodes. To access your slice on a resource just type the following command:
62         </p>
63 </div>
64 <div id="ple" style="display:none;">
65 </div>
66 <div id="ple_footer" style="display:none;">
67         <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>
68         <p>
69                 Be aware that after you reserve a PlanetLab Europe resource your slice will be deployed with a delay of about 15 minutes, 
70                 after witch you will be able to access the resource.
71         </p>
72     <div id="initscript">
73         <div>
74             <h4>Init Script on PLE</h4>
75             <i>This bash script will be deployed on all PLE nodes of your slice</i>
76         </div>
77         <textarea style="width:100%; height:100px;" id="initscript_code"></textarea><br>
78 <!-- TODO !!!
79         <div>
80             <select>
81                 <option>All</option>
82                 <option>node1</option>
83                 <option>node2</option>
84             </select>
85         </div>
86 -->
87         <button name="deploy" class="btn btn-success btn-sm" onclick="deploy('{{slicename}}');">Deploy</button>
88         <button name="delete" class="btn btn-danger btn-xs" onclick="del('{{slicename}}');">Delete</button>
89     </div>
90     <script type="text/javascript">
91     $(document).ready(function() {
92         $.post("/initscript/get/",{'slice_hrn':'{{slicename}}'}, function( data ) {
93             jQuery('#initscript_code').val(data['initscript_code']);
94         });
95     });
96     function deploy(slice_hrn){
97         var initscript_code = jQuery('#initscript_code').val()
98         $.post("/initscript/update/",{'slice_hrn':slice_hrn, 'initscript_code':initscript_code}, function( data ) {
99             if (data['ret'] == 0) {
100                 mysliceAlert('Success: initscript deployed','success', true);
101             }else{
102                 mysliceAlert('Rest Error for: '+data.error,'warning', true);
103             }
104             //jQuery('#initscript_code').val(data['initscript_code']);
105         });
106     }
107     function del(slice_hrn){
108         $.post("/initscript/delete/",{'slice_hrn':slice_hrn}, function( data ) {
109             if (data['ret'] == 0) {
110                 mysliceAlert('Success: initscript deleted','success', true);
111                 jQuery('#initscript_code').val('');
112             }else{
113                 mysliceAlert('Rest Error for: '+data.error,'warning', true);
114             }
115
116         });
117     }
118     </script>
119     <br>
120 </div>
121 {% endif %}
122 {% if "iotlab" in platforms %}
123 <div id="iotlab_header" style="display:none;">
124         <h3>FIT IoT-Lab</h3>
125         <p>FIT IoT-Lab resources are accessible directly via SSH and <a href="https://www.iot-lab.info/testbed/" target="_blank">web GUI.</a>
126                 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
127                 the following command:
128         </p>
129 </div>
130 <div id="iotlab" style="display:none;">
131 </div>
132 {% endif %}
133 {% if "nitos" in platforms %}
134 <div id="nitos_header" style="display:none;">
135         <h3>NITOS Volos (Greece)</h3>
136         
137         <p>
138          NITOS resources are not directly accessible. You will need to log in on a gateway server and from there access the node.
139          You will find the ssh commands to connect to NITOS nodes below:
140         </p>
141         <h4>NITLab</h4>
142 </div>
143 <div id="nitos" style="display:none;">
144 </div>
145 <div id="nitos_footer" style="display:none;">
146     <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>
147         <p>
148         The complete tutorial on NITOS nodes:
149         <a target="_blank" href="http://nitlab.inf.uth.gr/NITlab/index.php/testbed/instructions/basic-tutorial">NITOS basic tutorial</a>
150         </p>
151     <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> 
152         <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>
153
154 </div>
155 {% endif %}
156 {% if "nitos-paris" in platforms %}
157 <div id="paris.fit-nitos.fr_header" style="display:none;">
158         <h4>FIT NITOS-Lab Paris</h4>
159 </div>
160 <div id="paris.fit-nitos.fr" style="display:none;">
161 </div>
162 <div id="paris.fit-nitos.fr_footer" style="display:none;">
163         <p>
164                 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
165                 restart the OMF Resource Controller and finally execute the experiment:
166         </p>
167         <p class="command">
168                 $ omf exec --slice {{slicename}} your_exp.rb
169         </p>
170
171         <p>
172         The complete tutorial on FIT NITOS nodes:
173         <a target="_blank" href="http://doc.onelab.eu/nitos.html">basic tutorial</a>
174         </p>
175     <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> 
176         <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>
177 </div>
178 {% endif %}
179 <div style="padding-top:20px;"> 
180         <h2>Available Tools</h2>
181         <p><img src="{{ STATIC_URL }}img/terminal_icon.png" width="50"> <b>SSH</b></p>
182         <p>
183         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.
184         </p>
185         <p> More info: <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">http://en.wikipedia.org/wiki/Secure_Shell</a></p>
186         <br>
187         <p><img src="{{ STATIC_URL }}img/putty-logo.png" width="50"> <b>PuTTY</b></p>
188         <p>
189                 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.
190         </p>
191         <p>More info: <a href="http://www.putty.org/" target="_blank">http://www.putty.org/</a></p>     
192         <br>
193         <p><img src="{{ STATIC_URL }}img/nepi_logo.png" width="90"></p>
194         <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>
195         <p> More info: <a href="http://nepi.inria.fr" target="_blank">http://nepi.inria.fr</a></p>
196         <br>
197         <p><img src="{{ STATIC_URL }}img/omf-logo.png" width="90"></p>
198         <p>OMF is a Testbed Control, Measurement and Management Framework.</p>
199         <p>
200         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).
201         </p>
202         <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>
203         <p>More Info: <a href="http://mytestbed.net/projects/omf" target="_blank">http://mytestbed.net/projects/omf</a></p>
204 </div>
205 </div>