- Observe the properties of the network interfaces
# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr fa:16:3e:72:ad:a6
inet addr:10.103.0.20 Bcast:10.103.0.255 Mask:255.255.255.0
inet6 addr: fe80::f816:3eff:fe72:ada6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1982 errors:0 dropped:0 overruns:0 frame:0
TX packets:1246 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:301066 (294.0 KiB) TX bytes:140433 (137.1 KiB)
Interrupt:11 Base address:0x2000
eth1 Link encap:Ethernet HWaddr fe:16:3e:00:6d:af
inet addr:172.16.1.1 Bcast:172.16.1.255 Mask:255.255.255.0
inet6 addr: fe80::fc16:3eff:fe00:6daf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21704 errors:0 dropped:0 overruns:0 frame:0
TX packets:4562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3100262 (2.9 MiB) TX bytes:824572 (805.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:19394 errors:0 dropped:0 overruns:0 frame:0
TX packets:19394 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4010954 (3.8 MiB) TX bytes:4010954 (3.8 MiB)
- Observe the contents of the NEuca user data file. This file includes a script that will install and execute the script that you configured for the VM.
# neuca-user-data
[global]
actor_id=67C4EFB4-7CBF-48C9-8195-934FF81434DC
slice_id=39672f6e-610a-4d86-8810-30e02d20cc99
reservation_id=55676541-5221-483d-bb60-429de025f275
unit_id=902709a4-32f2-41fc-b85c-b4791c779580
;router= Not Specified
;iscsi_initiator_iqn= Not Specified
slice_name=urn:publicid:IDN+ch.geni.net:ADAMANT+slice+pruth-winter-camp
unit_url=http://geni-orca.renci.org/owl/8210b4d7-4afc-4838-801f-c20a8f1f75ae#hadoop-master
host_name=hadoop-master
[interfaces]
fe163e006daf=up:ipv4:172.16.1.1/24
[storage]
[routes]
[scripts]
bootscript=#!/bin/bash
# Automatically generated boot script
# wget or curl must be installed on the image
mkdir -p /tmp
cd /tmp
if [ -x `which wget 2>/dev/null` ]; then
wget -q -O `basename http://geni-images.renci.org/images/GENIWinterCamp/master.sh` http://geni-images.renci.org/images/GENIWinterCamp/master.sh
else if [ -x `which curl 2>/dev/null` ]; then
curl http://geni-images.renci.org/images/GENIWinterCamp/master.sh > `basename http://geni-images.renci.org/images/GENIWinterCamp/master.sh`
fi
fi
eval "/bin/sh -c \"chmod +x /tmp/master.sh; /tmp/master.sh\""
- Observe the contents of the of the script that was installed and executed on the VM.
# cat /tmp/master.sh
#!/bin/bash
echo "Hello from neuca script" > /home/hadoop/log
MY_HOSTNAME=hadoop-master
hostname $MY_HOSTNAME
echo 172.16.1.1 hadoop-master >> /etc/hosts
echo 172.16.1.10 hadoop-worker-0 >> /etc/hosts
echo 172.16.1.11 hadoop-worker-1 >> /etc/hosts
echo 172.16.1.12 hadoop-worker-2 >> /etc/hosts
echo 172.16.1.13 hadoop-worker-3 >> /etc/hosts
echo 172.16.1.14 hadoop-worker-4 >> /etc/hosts
echo 172.16.1.15 hadoop-worker-5 >> /etc/hosts
echo 172.16.1.16 hadoop-worker-6 >> /etc/hosts
echo 172.16.1.17 hadoop-worker-7 >> /etc/hosts
echo 172.16.1.18 hadoop-worker-8 >> /etc/hosts
echo 172.16.1.19 hadoop-worker-9 >> /etc/hosts
echo 172.16.1.20 hadoop-worker-10 >> /etc/hosts
echo 172.16.1.21 hadoop-worker-11 >> /etc/hosts
echo 172.16.1.22 hadoop-worker-12 >> /etc/hosts
echo 172.16.1.23 hadoop-worker-13 >> /etc/hosts
echo 172.16.1.24 hadoop-worker-14 >> /etc/hosts
echo 172.16.1.25 hadoop-worker-15 >> /etc/hosts
while true; do
PING=`ping -c 1 172.16.1.1 > /dev/null 2>&1`
if [ "$?" = "0" ]; then
break
fi
sleep 5
done
echo '/home/hadoop/hadoop-euca-init.sh 172.16.1.1 -master' >> /home/hadoop/log
/home/hadoop/hadoop-euca-init.sh 172.16.1.1 -master
echo "Done starting daemons" >> /home/hadoop/log
- Test for connectivity between the VMs.
# ping hadoop-worker-0
PING hadoop-worker-0 (172.16.1.10) 56(84) bytes of data.
64 bytes from hadoop-worker-0 (172.16.1.10): icmp_req=1 ttl=64 time=0.747 ms
64 bytes from hadoop-worker-0 (172.16.1.10): icmp_req=2 ttl=64 time=0.459 ms
64 bytes from hadoop-worker-0 (172.16.1.10): icmp_req=3 ttl=64 time=0.411 ms
^C
--- hadoop-worker-0 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.411/0.539/0.747/0.148 ms
# ping hadoop-worker-1
PING hadoop-worker-1 (172.16.1.11) 56(84) bytes of data.
64 bytes from hadoop-worker-1 (172.16.1.11): icmp_req=1 ttl=64 time=0.852 ms
64 bytes from hadoop-worker-1 (172.16.1.11): icmp_req=2 ttl=64 time=0.468 ms
64 bytes from hadoop-worker-1 (172.16.1.11): icmp_req=3 ttl=64 time=0.502 ms
^C
--- hadoop-worker-1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.468/0.607/0.852/0.174 ms