Tools: url of iotlab production
[unfold.git] / portal / templates / slice-tab-experiment.html
index 0953410..e10c88f 100644 (file)
                $ ssh {{ple_slicename}}@{{resource}}<br>
        {%endfor%}
        </p>
-       <h4>Windows users</h4>
-       <p>Use <a href="http://www.putty.org/" target="_blank">SSH client.</a></p>
        <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>
-       <p>Please note that the first '.' is replaced by number 8 and the rest of the dot/s are replaced by underscore/s.</p>
        <p>
                Be aware that after you reserve a PlanetLab Europe resource your slice will be deployed with a delay of about 15 minutes, 
                after witch you will be able to access the resource.
        </p>
+    <div id="initscript">
+        <div>
+            <h4>Init Script on PLE</h4>
+            <i>This bash script will be deployed on all PLE nodes of your slice</i>
+        </div>
+        <textarea style="width:100%; height:100px;" id="initscript_code"></textarea><br>
+        <button name="deploy" class="btn btn-success btn-sm" onclick="deploy('{{slicename}}');">Deploy</button>
+        <button name="delete" class="btn btn-danger btn-xs" onclick="del('{{slicename}}');">Delete</button>
+    </div>
+    <script type="text/javascript">
+    $(document).ready(function() {
+        $.post("/initscript/get/",{'slice_hrn':'onelab.upmc.express'}, function( data ) {
+            console.log(data);
+            jQuery('#initscript_code').val(data['initscript_code']);
+        });
+    });
+    function deploy(slice_hrn){
+        console.log("deploy = "+slice_hrn);
+        var initscript_code = jQuery('#initscript_code').val()
+        $.post("/initscript/update/",{'slice_hrn':slice_hrn, 'initscript_code':initscript_code}, function( data ) {
+            console.log(data);
+            if (data['ret'] == 0) {
+                mysliceAlert('Success: initscript deployed','success', true);
+            }else{
+                mysliceAlert('Rest Error for: '+data.error,'warning', true);
+            }
+            //jQuery('#initscript_code').val(data['initscript_code']);
+        });
+    }
+    function del(slice_hrn){
+        console.log("delete");
+        $.post("/initscript/delete/",{'slice_hrn':slice_hrn}, function( data ) {
+            console.log(data);
+            if (data['ret'] == 0) {
+                mysliceAlert('Success: initscript deleted','success', true);
+                jQuery('#initscript_code').val('');
+            }else{
+                mysliceAlert('Rest Error for: '+data.error,'warning', true);
+            }
+
+        });
+    }
+    </script>
+    <br>
        {% endif %}
 
        {% if iotlab_resources %}       
                the following command:
        </p>
        <p class="command">
-               ssh {{username}}@fit3-dev.inrialpes.fr
+               ssh {{iot_login}}@grenoble.iot-lab.info
        </p>
-       <h4>Windows users</h4>
-       <p>Use <a href="http://www.putty.org/" target="_blank">SSH client.</a></p>
        {% endif %}
        {% if nitos_resources or nitos_paris_resources %}
        <h3>NITOS</h3>
        {% if nitos_resources %}        
        <h4>NITLab</h4>
        <p class="command">
-       $ ssh {{slicename}}@nitlab.inf.uth.gr
-       </p>
+           $ ssh {{slicename}}@nitlab.inf.uth.gr #nodes 001-040<br>
+        $ ssh {{slicename}}@nitlab2.inf.uth.gr #nodes 041-049<br>
+        $ ssh {{slicename}}@nitlab3.inf.uth.gr #nodes > 049
+    </p>
        
-       <p>For each of the reserved nodes, follo the steps given below:</p>
+       <p>Loading an OMF-compatible image on your resource:</p>
        <p class="command">
        {%for resource in nitos_resources %}
                <b>Resource</b><br>
-       $ omf load -i baseline_grid.ndz -t {{resource}}  #loading OMF image on the node<br>
-               $ omf tell -a on -t {{resource}}  #turn on the node <br>
-               $ ssh root@{{resource}}  #ssh to the node<br><br>
+        $ omf6 stat -t {{resource}} #check the status of the node<br>
+        $ omf6 tell -a on -t {{resource}}  #turn on/off the node <br>
+       $ omf6 load -i baseline.ndz -t {{resource}}  #for orbit-like node (002-009) use "baseline_orbit.ndz"<br>
+               $ ssh root@{{resource}}  #ssh to the node<br>
        {%endfor%}
        </p>
+    <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>
        {% endif %}
 
        {% if nitos_paris_resources %}
        {%endif%}
 
        <p>
-               On the node itself you will have to modify the file /etc/omf-resctl-5.3/omf-resctl.yaml according to your slice settings and then
+               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
                restart the OMF Resource Controller and finally execute the experiment:
        </p>
        <p class="command">
                $ omf exec --slice {{slicename}} your_exp.rb
        </p>
        <p>
-       The complete tutorial is available at the following address:
+       The complete tutorial on NITOS nodes:
        <a target="_blank" href="http://nitlab.inf.uth.gr/NITlab/index.php/testbed/instructions/basic-tutorial">NITOS basic tutorial</a>
        </p>
-       <p>To learn more about OMF6, please click <a href="http://omf.mytestbed.net/projects/omf6/wiki/Wiki" target="_blank">here.</a></p>
-       {% endif %}
-       
-        <h5>Windows users</h5>
-        <p>Use <a href="http://www.putty.org/" target="_blank">SSH client.</a></p>
+    <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> 
+       <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>
 
+       {% endif %}
        
        <h2>Available Tools</h2>
        <p><img src="{{ STATIC_URL }}img/terminal_icon.png" width="50"> <b>SSH</b></p>