Index: /trunk/wikifiles/Tutorials/HadoopInASlice/hadoop_ansible.yml
===================================================================
--- /trunk/wikifiles/Tutorials/HadoopInASlice/hadoop_ansible.yml	(revision 3392)
+++ /trunk/wikifiles/Tutorials/HadoopInASlice/hadoop_ansible.yml	(revision 3392)
@@ -0,0 +1,161 @@
+#Copyright (c) 2015 Raytheon BBN Technologies
+#
+#Permission is hereby granted, free of charge, to any person obtaining
+#a copy of this software and/or hardware specification (the "Work") to
+#deal in the Work without restriction, including without limitation the
+#rights to use, copy, modify, merge, publish, distribute, sublicense,
+#and/or sell copies of the Work, and to permit persons to whom the Work
+#is furnished to do so, subject to the following conditions:
+#
+#The above copyright notice and this permission notice shall be
+#included in all copies or substantial portions of the Work.
+#
+#THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+#OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+#HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
+#IN THE WORK. 
+
+---
+- name: test all hosts
+  hosts: all
+  sudo: True
+  tasks:
+   - name: neuca test 
+     shell: neuca-user-data
+     register: neuca_test
+   - debug: var=neuca_test.stdout_lines
+
+   - name: test if the postboot script is there
+     shell:  if [ -f /home/hadoop/hadoop_config_dynamic.sh ] ; then echo "yes" ; else echo "no" ; fi
+     register: file_test
+     failed_when: "'no' in file_test.stdout_lines"
+   - debug: var=file_test.stdout_lines
+
+   - name: install script has run
+     shell:  if  grep -q "Hello from neuca script" "/home/hadoop/hadoop_boot.log" ; then echo "yes" ; else echo "no" ; fi
+     register: install_test
+     failed_when: "'no' in install_test.stdout_lines"
+   - debug: var=install_test.stdout_lines
+     
+- name: test workers
+  hosts: worker-*
+  sudo: True
+  tasks:
+   - name: ping test
+     command: ping -c 5 master
+     register: ping_test
+   - debug: var=ping_test.stdout_lines
+
+- name: test master
+  hosts: master
+  sudo: True
+  tasks:
+
+   - name: check hadoop user is present
+     shell: "cut -d: -f1 /etc/passwd"
+     register: user_test
+     failed_when: "'hadoop' not in user_test.stdout"
+   - debug: var=user_test.stdout
+
+   - name: check formating the hadoop filesystem
+     become: True
+     become_user: hadoop
+     shell: cd ~; source ~/.bashrc; hdfs namenode -format -force
+     register: hdfs_format
+     failed_when: "'SHUTDOWN_MSG: Shutting down NameNode at master/172.16.1.1' not in hdfs_format.stderr"
+     async: 600
+     poll: 30
+   - debug: var=hdfs_format.stderr
+
+   - name: start dfs
+     become: True
+     become_user: hadoop
+     shell: cd ~; source ~/.bashrc; start-dfs.sh
+     register: dfs_start
+     async: 600
+     poll: 10
+   - debug: var=dfs_start.stderr
+
+   - name: start yarn
+     become: True
+     become_user: hadoop
+     shell: cd ~; source ~/.bashrc; start-yarn.sh
+     register: yarn_start
+     async: 600
+     poll: 10
+   - debug: var=yarn_start.stdout
+   - debug: var=yarn_start.stderr
+
+   - name: hdfs report
+     become: True
+     become_user: hadoop
+     shell: cd ~; source ~/.bashrc; hdfs dfsadmin -report
+     register: hdfs_report
+     async: 600
+     poll: 5
+   - debug: var=hdfs_report.stdout
+   - debug: var=hdfs_report.stderr 
+   
+   - name: small test
+     become: True
+     become_user: hadoop
+     shell: "cd ~; source ~/.bashrc; echo Hello GENI World > /tmp/hello.txt; hdfs
+     dfs -put  /tmp/hello.txt /hello.txt; hdfs dfs -ls /; hdfs dfs -cat /hello.txt"
+     register: small_test
+     async: 600
+     poll: 5
+     failed_when: "'-rw-r--r--   2 hadoop supergroup' not in small_test.stdout"
+   - debug: var=small_test.stdout
+   - debug: var=small_test.stderr
+
+   # Need to activate async when ansible 2.0 is out and fixes : https://github.com/ansible/ansible/issues/9798
+   # XXX When this is does remove timeout from shell hadoop command
+   - name: generate dataset
+     become: True
+     become_user: hadoop
+     shell: "cd ~; source ~/.bashrc; timeout 600 hadoop jar /home/hadoop/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar teragen 10000000 /input"
+#     async: 600
+#     poll: 20
+     register: gen_dataset
+     failed_when: "'Bytes Written=1000000000' not in gen_dataset.stderr"
+   - debug: var=gen_dataset.stderr
+   - debug: var=gen_dataset.stdout
+
+   # Need to activate async when ansible 2.0 is out and fixes : https://github.com/ansible/ansible/issues/9798
+   # XXX When this is does remove timeout from shell hadoop command
+   - name: sort dataset
+     become: True
+     become_user: hadoop
+     shell: "cd ~; source ~/.bashrc; timeout 600 hadoop jar /home/hadoop/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar terasort  /input /output"
+     register: sort_dataset
+#     async: 600
+     failed_when: "'INFO terasort.TeraSort: done' not in sort_dataset.stderr"
+   - debug: var=sort_dataset.stderr
+
+   - name: verify files
+     become: True
+     become_user: hadoop
+     shell: "cd ~; source ~/.bashrc; hdfs dfs -ls /input/; hdfs dfs -ls
+     /output/; hdfs dfs -cat /input/part-m-00000 | head; hdfs dfs -cat /output/part-r-00000 | head"
+     register: verify_files
+     async: 600
+     poll: 10
+   - debug: var=verify_files.stdout
+   - debug: var=verify_files.stderr
+
+   # Need to activate async when ansible 2.0 is out and fixes : https://github.com/ansible/ansible/issues/9798
+   # XXX When this is does remove timeout from shell execution
+   - name: hexdump
+     become: True
+     become_user: hadoop
+     shell: "cd ~; source ~/.bashrc; timeout 600 hdfs dfs -get /output/part-r-00000 /tmp/part-r-00000; hexdump /tmp/part-r-00000 | head"
+     register: hexdump
+#     async: 600
+#     poll: 30
+   - debug: var=hexdump.stdout
+   - debug: var=hexdump.stderr
+
Index: /trunk/wikifiles/Tutorials/HadoopInASlice/hadoop_rspec.xml
===================================================================
--- /trunk/wikifiles/Tutorials/HadoopInASlice/hadoop_rspec.xml	(revision 3392)
+++ /trunk/wikifiles/Tutorials/HadoopInASlice/hadoop_rspec.xml	(revision 3392)
@@ -0,0 +1,58 @@
+<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:tour="http://www.protogeni.net/resources/rspec/ext/apt-tour/1" xmlns:jacks="http://www.protogeni.net/resources/rspec/ext/jacks/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geni.net/resources/rspec/3    http://www.geni.net/resources/rspec/3/request.xsd" type="request">
+<node xmlns="http://www.geni.net/resources/rspec/3" client_id="hadoop-master">
+<icon xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" url="https://portal.geni.net/images/EG-VM-noTxt-centered.svg"/>
+<site xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" id="Site 2"/>
+<sliver_type xmlns="http://www.geni.net/resources/rspec/3" name="XOMedium">
+<disk_image xmlns="http://www.geni.net/resources/rspec/3" name="http://geni-images.renci.org/images/GENIWinterCamp/images/gwc-hadoop.v0.4a.xml"/>
+</sliver_type>
+<hardware_type xmlns="http://www.geni.net/resources/rspec/3" name="orca-vm-cloud"/>
+<services xmlns="http://www.geni.net/resources/rspec/3">
+
+
+<execute xmlns="http://www.geni.net/resources/rspec/3" command="chmod +x /tmp/master.sh; /tmp/master.sh" shell="/bin/sh"/>
+<install xmlns="http://www.geni.net/resources/rspec/3" url="http://geni-images.renci.org/images/GENIWinterCamp/master.sh " install_path="/tmp"/>
+</services>
+<interface xmlns="http://www.geni.net/resources/rspec/3" client_id="interface-1">
+<ip xmlns="http://www.geni.net/resources/rspec/3" address="172.16.1.1" type="ipv4" netmask="255.255.255.0"/>
+</interface>
+</node>
+<node xmlns="http://www.geni.net/resources/rspec/3" client_id="hadoop-worker-0">
+<icon xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" url="https://portal.geni.net/images/EG-VM-noTxt-centered.svg"/>
+<site xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" id="Site 2"/>
+<sliver_type xmlns="http://www.geni.net/resources/rspec/3" name="XOMedium">
+<disk_image xmlns="http://www.geni.net/resources/rspec/3" name="http://geni-images.renci.org/images/GENIWinterCamp/images/gwc-hadoop.v0.4a.xml"/>
+</sliver_type>
+<hardware_type xmlns="http://www.geni.net/resources/rspec/3" name="orca-vm-cloud"/>
+<services xmlns="http://www.geni.net/resources/rspec/3">
+
+
+<execute xmlns="http://www.geni.net/resources/rspec/3" command="chmod +x /tmp/worker.sh; /tmp/worker.sh $hadoop-master.Name() $hadoop-master.IP(&quot;link-0&quot;) $hadoop-worker-0.Name() $hadoop-worker-0.IP(&quot;link-0&quot;)" shell="/bin/sh"/>
+<install xmlns="http://www.geni.net/resources/rspec/3" url="http://geni-images.renci.org/images/GENIWinterCamp/worker.sh " install_path="/tmp"/>
+</services>
+<interface xmlns="http://www.geni.net/resources/rspec/3" client_id="interface-2">
+<ip xmlns="http://www.geni.net/resources/rspec/3" address="172.16.1.10" type="ipv4" netmask="255.255.255.0"/>
+</interface>
+</node>
+<node xmlns="http://www.geni.net/resources/rspec/3" client_id="hadoop-worker-1">
+<icon xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" url="https://portal.geni.net/images/EG-VM-noTxt-centered.svg"/>
+<site xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" id="Site 2"/>
+<sliver_type xmlns="http://www.geni.net/resources/rspec/3" name="XOMedium">
+<disk_image xmlns="http://www.geni.net/resources/rspec/3" name="http://geni-images.renci.org/images/GENIWinterCamp/images/gwc-hadoop.v0.4a.xml"/>
+</sliver_type>
+<hardware_type xmlns="http://www.geni.net/resources/rspec/3" name="orca-vm-cloud"/>
+<services xmlns="http://www.geni.net/resources/rspec/3">
+
+
+<execute xmlns="http://www.geni.net/resources/rspec/3" command="chmod +x /tmp/worker.sh; /tmp/worker.sh $hadoop-master.Name() $hadoop-master.IP(&quot;link-0&quot;) $hadoop-worker-1.Name() $hadoop-worker-1.IP(&quot;link-0&quot;)" shell="/bin/sh"/>
+<install xmlns="http://www.geni.net/resources/rspec/3" url="http://geni-images.renci.org/images/GENIWinterCamp/worker.sh " install_path="/tmp"/>
+</services>
+<interface xmlns="http://www.geni.net/resources/rspec/3" client_id="interface-0">
+<ip xmlns="http://www.geni.net/resources/rspec/3" address="172.16.1.11" type="ipv4" netmask="255.255.255.0"/>
+</interface>
+</node>
+<link xmlns="http://www.geni.net/resources/rspec/3" client_id="link-0">
+<interface_ref xmlns="http://www.geni.net/resources/rspec/3" client_id="interface-0"/>
+<interface_ref xmlns="http://www.geni.net/resources/rspec/3" client_id="interface-1"/>
+<interface_ref xmlns="http://www.geni.net/resources/rspec/3" client_id="interface-2"/>
+</link>
+</rspec>
Index: /trunk/wikifiles/Tutorials/HelloGENI/hellogeni_ansible.yml
===================================================================
--- /trunk/wikifiles/Tutorials/HelloGENI/hellogeni_ansible.yml	(revision 3392)
+++ /trunk/wikifiles/Tutorials/HelloGENI/hellogeni_ansible.yml	(revision 3392)
@@ -0,0 +1,71 @@
+#Copyright (c) 2015 Raytheon BBN Technologies
+#
+#Permission is hereby granted, free of charge, to any person obtaining
+#a copy of this software and/or hardware specification (the "Work") to
+#deal in the Work without restriction, including without limitation the
+#rights to use, copy, modify, merge, publish, distribute, sublicense,
+#and/or sell copies of the Work, and to permit persons to whom the Work
+#is furnished to do so, subject to the following conditions:
+#
+#The above copyright notice and this permission notice shall be
+#included in all copies or substantial portions of the Work.
+#
+#THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+#OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+#HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
+#IN THE WORK. 
+
+---
+- name: test server and client
+  hosts: all
+  sudo: True
+  tasks:
+   - name: test installation
+     shell:  if [ -f /local/installed.txt ] ; then echo "yes" ; else echo "no" ; fi
+     register: installation_test
+     failed_when: "'no' in installation_test.stdout_lines"
+   - debug: var=installation_test.stdout_lines
+   - name: test whether files have been copied to /var/www
+     shell:  if [ -f /var/www/index.html ] ; then echo "yes" ; else echo "no" ; fi
+     register: file_test
+     failed_when: "'no' in file_test.stdout_lines"
+   - debug: var=file_test.stdout_lines
+   - name: check apache server running
+     command: service apache2 status
+     register: apache_running
+   - debug: var=apache_running.stdout_lines
+- name: test server
+  hosts: server
+  sudo: True
+  tasks:
+   - name: check iperf running
+     shell: ps aux | grep iperf
+     register: iperf_running
+     failed_when: "'iperf -s -i 10 &> /var/www/iperflogs/iperf-server.log' not in iperf_running.stdout"
+   - debug: var=iperf_running.stdout_lines
+- name: test client
+  hosts: client
+  sudo: True
+  tasks:
+   - name: ping test
+     command: ping -c 5 server
+     register: ping_test
+   - debug: var=ping_test.stdout_lines
+   - name: iperf test
+     command: iperf -c server -P 2
+     register: iperf_test
+     failed_when: "'failed' in iperf_test.stderr"
+     async: 30
+     poll: 10
+   - debug: var=iperf_test.stdout_lines
+   - name: wget test
+     command: wget -q http://10.10.10.1/graphics/hellogeni-banner.png -O /tmp/banner_test.png
+     register: wget_test
+     async: 60
+     poll: 10
+   - debug: var=wget_test
+
Index: /trunk/wikifiles/Tutorials/HelloGENI/hellogeni_rspec.xml
===================================================================
--- /trunk/wikifiles/Tutorials/HelloGENI/hellogeni_rspec.xml	(revision 3392)
+++ /trunk/wikifiles/Tutorials/HelloGENI/hellogeni_rspec.xml	(revision 3392)
@@ -0,0 +1,65 @@
+<!--
+Copyright (c) 2010-2015 Raytheon BBN Technologies
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and/or hardware specification (the "Work") to
+deal in the Work without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Work, and to permit persons to whom the Work
+is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Work.
+
+THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
+IN THE WORK.
+-->
+
+<rspec xmlns="http://www.geni.net/resources/rspec/3"  
+       xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" 
+       xmlns:tour="http://www.protogeni.net/resources/rspec/ext/apt-tour/1" 
+       xmlns:jacks="http://www.protogeni.net/resources/rspec/ext/jacks/1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.geni.net/resources/rspec/3    http://www.geni.net/resources/rspec/3/request.xsd" 
+       type="request">
+
+ <node xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1" client_id="server" exclusive="false">
+    <sliver_type name="default-vm"/>
+    <emulab:routable_control_ip xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1"/>
+    <services>
+      <install install_path="/local" url="http://www.gpolab.bbn.com/experiment-support/HelloGENI//hellogeni-install.tar.gz"/>
+      <execute command="sudo /local/install-script.sh" shell="sh"/>
+    </services>
+    <interface client_id="server:if0">
+       <ip xmlns="http://www.geni.net/resources/rspec/3" address="10.10.10.1" type="ipv4" netmask="255.255.255.0"/>
+     </interface>
+    <site xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" id="28"/>
+  </node>
+  
+  <node xmlns:rs="http://www.protogeni.net/resources/rspec/ext/emulab/1" client_id="client" exclusive="false">
+    <sliver_type name="default-vm"/>
+    <services>  
+      <install install_path="/local" url="http://www.gpolab.bbn.com/experiment-support/HelloGENI//hellogeni-install.tar.gz"/>
+      <execute command="sudo /local/install-script.sh" shell="sh"/>
+    </services>
+    <interface client_id="client:if0">
+      <ip xmlns="http://www.geni.net/resources/rspec/3" address="10.10.10.2" type="ipv4" netmask="255.255.255.0"/>
+    </interface>
+    <site xmlns="http://www.protogeni.net/resources/rspec/ext/jacks/1" id="28"/>
+  </node>
+
+  <link client_id="lan0">
+    <interface_ref client_id="server:if0"/>
+    <interface_ref client_id="client:if0"/>
+    <property source_id="server:if0" dest_id="client:if0"/>
+    <property source_id="client:if0" dest_id="server:if0"/>
+    <link_type name="lan"/>
+  </link>
+
+</rspec>
