PostbootTutorial: GREE2013-demo.rdf

File GREE2013-demo.rdf, 16.0 KB (added by yxin@renci.org, 12 years ago)
Line 
1<?xml version="1.0"?>
2
3
4<!DOCTYPE rdf:RDF [
5    <!ENTITY time "http://www.w3.org/2006/time#" >
6    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
7    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
8    <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
9    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
10    <!ENTITY ip4 "http://geni-orca.renci.org/owl/ip4.owl#" >
11    <!ENTITY ec2 "http://geni-orca.renci.org/owl/ec2.owl#" >
12    <!ENTITY dtn "http://geni-orca.renci.org/owl/dtn.owl#" >
13    <!ENTITY geni "http://geni-orca.renci.org/owl/geni.owl#" >
14    <!ENTITY orca "http://geni-orca.renci.org/owl/orca.owl#" >
15    <!ENTITY layer "http://geni-orca.renci.org/owl/layer.owl#" >
16    <!ENTITY kansei "http://geni-orca.renci.org/owl/kansei.owl#" >
17    <!ENTITY modify-schema "http://geni-orca.renci.org/owl/modify.owl#" >
18    <!ENTITY domain "http://geni-orca.renci.org/owl/domain.owl#" >
19    <!ENTITY compute "http://geni-orca.renci.org/owl/compute.owl#" >
20    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
21    <!ENTITY request-schema "http://geni-orca.renci.org/owl/request.owl#" >
22    <!ENTITY ethernet "http://geni-orca.renci.org/owl/ethernet.owl#" >
23    <!ENTITY openflow "http://geni-orca.renci.org/owl/openflow.owl#" >
24    <!ENTITY topology "http://geni-orca.renci.org/owl/topology.owl#" >
25    <!ENTITY planetlab "http://geni-orca.renci.org/owl/planetlab.owl#" >
26    <!ENTITY eucalyptus "http://geni-orca.renci.org/owl/eucalyptus.owl#" >
27    <!ENTITY collections "http://geni-orca.renci.org/owl/collections.owl#" >
28    <!ENTITY rcivmsite "http://geni-orca.renci.org/owl/rcivmsite.rdf#rcivmsite/" >
29    <!ENTITY request "http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#" >
30]>
31
32
33<rdf:RDF xmlns="file:/Users/yxin/RENCI-Research/orca40/GREE2013-demo.rdf#"
34     xml:base="file:/Users/yxin/RENCI-Research/orca40/GREE2013-demo.rdf"
35     xmlns:modify-schema="http://geni-orca.renci.org/owl/modify.owl#"
36     xmlns:kansei="http://geni-orca.renci.org/owl/kansei.owl#"
37     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
38     xmlns:dtn="http://geni-orca.renci.org/owl/dtn.owl#"
39     xmlns:rcivmsite="http://geni-orca.renci.org/owl/rcivmsite.rdf#rcivmsite/"
40     xmlns:time="http://www.w3.org/2006/time#"
41     xmlns:ethernet="http://geni-orca.renci.org/owl/ethernet.owl#"
42     xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
43     xmlns:request-schema="http://geni-orca.renci.org/owl/request.owl#"
44     xmlns:request="http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#"
45     xmlns:domain="http://geni-orca.renci.org/owl/domain.owl#"
46     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
47     xmlns:topology="http://geni-orca.renci.org/owl/topology.owl#"
48     xmlns:compute="http://geni-orca.renci.org/owl/compute.owl#"
49     xmlns:collections="http://geni-orca.renci.org/owl/collections.owl#"
50     xmlns:ip4="http://geni-orca.renci.org/owl/ip4.owl#"
51     xmlns:layer="http://geni-orca.renci.org/owl/layer.owl#"
52     xmlns:openflow="http://geni-orca.renci.org/owl/openflow.owl#"
53     xmlns:geni="http://geni-orca.renci.org/owl/geni.owl#"
54     xmlns:orca="http://geni-orca.renci.org/owl/orca.owl#"
55     xmlns:ec2="http://geni-orca.renci.org/owl/ec2.owl#"
56     xmlns:owl="http://www.w3.org/2002/07/owl#"
57     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
58     xmlns:planetlab="http://geni-orca.renci.org/owl/planetlab.owl#"
59     xmlns:eucalyptus="http://geni-orca.renci.org/owl/eucalyptus.owl#">
60    <owl:Ontology rdf:about=""/>
61   
62
63
64    <!--
65    ///////////////////////////////////////////////////////////////////////////////////////
66    //
67    // Object Properties
68    //
69    ///////////////////////////////////////////////////////////////////////////////////////
70     -->
71
72   
73
74
75    <!-- http://geni-orca.renci.org/owl/collections.owl#element -->
76
77    <owl:ObjectProperty rdf:about="&collections;element"/>
78   
79
80
81    <!-- http://geni-orca.renci.org/owl/compute.owl#diskImage -->
82
83    <owl:ObjectProperty rdf:about="&compute;diskImage"/>
84   
85
86
87    <!-- http://geni-orca.renci.org/owl/compute.owl#specificCE -->
88
89    <owl:ObjectProperty rdf:about="&compute;specificCE"/>
90   
91
92
93    <!-- http://geni-orca.renci.org/owl/domain.owl#hasResourceType -->
94
95    <owl:ObjectProperty rdf:about="&domain;hasResourceType"/>
96   
97
98
99    <!-- http://geni-orca.renci.org/owl/ip4.owl#localIPAddress -->
100
101    <owl:ObjectProperty rdf:about="&ip4;localIPAddress"/>
102   
103
104
105    <!-- http://geni-orca.renci.org/owl/layer.owl#atLayer -->
106
107    <owl:ObjectProperty rdf:about="&layer;atLayer"/>
108   
109
110
111    <!-- http://geni-orca.renci.org/owl/request.owl#dependOn -->
112
113    <owl:ObjectProperty rdf:about="&request-schema;dependOn"/>
114   
115
116
117    <!-- http://geni-orca.renci.org/owl/request.owl#hasTerm -->
118
119    <owl:ObjectProperty rdf:about="&request-schema;hasTerm"/>
120   
121
122
123    <!-- http://geni-orca.renci.org/owl/request.owl#inDomain -->
124
125    <owl:ObjectProperty rdf:about="&request-schema;inDomain"/>
126   
127
128
129    <!-- http://geni-orca.renci.org/owl/topology.owl#hasInterface -->
130
131    <owl:ObjectProperty rdf:about="&topology;hasInterface"/>
132   
133
134
135    <!-- http://www.w3.org/2006/time#hasDurationDescription -->
136
137    <owl:ObjectProperty rdf:about="&time;hasDurationDescription"/>
138   
139
140
141    <!--
142    ///////////////////////////////////////////////////////////////////////////////////////
143    //
144    // Data properties
145    //
146    ///////////////////////////////////////////////////////////////////////////////////////
147     -->
148
149   
150
151
152    <!-- http://geni-orca.renci.org/owl/ip4.owl#netmask -->
153
154    <owl:DatatypeProperty rdf:about="&ip4;netmask"/>
155   
156
157
158    <!-- http://geni-orca.renci.org/owl/layer.owl#bandwidth -->
159
160    <owl:DatatypeProperty rdf:about="&layer;bandwidth"/>
161   
162
163
164    <!-- http://geni-orca.renci.org/owl/layer.owl#label_ID -->
165
166    <owl:DatatypeProperty rdf:about="&layer;label_ID"/>
167   
168
169
170    <!-- http://geni-orca.renci.org/owl/layer.owl#numCE -->
171
172    <owl:DatatypeProperty rdf:about="&layer;numCE"/>
173   
174
175
176    <!-- http://geni-orca.renci.org/owl/request.owl#postBootScript -->
177
178    <owl:DatatypeProperty rdf:about="&request-schema;postBootScript"/>
179   
180
181
182    <!-- http://geni-orca.renci.org/owl/topology.owl#hasGUID -->
183
184    <owl:DatatypeProperty rdf:about="&topology;hasGUID"/>
185   
186
187
188    <!-- http://geni-orca.renci.org/owl/topology.owl#hasURL -->
189
190    <owl:DatatypeProperty rdf:about="&topology;hasURL"/>
191   
192
193
194    <!-- http://www.w3.org/2006/time#days -->
195
196    <owl:DatatypeProperty rdf:about="&time;days"/>
197   
198
199
200    <!--
201    ///////////////////////////////////////////////////////////////////////////////////////
202    //
203    // Classes
204    //
205    ///////////////////////////////////////////////////////////////////////////////////////
206     -->
207
208   
209
210
211    <!-- http://geni-orca.renci.org/owl/compute.owl#ComputeElement -->
212
213    <owl:Class rdf:about="&compute;ComputeElement"/>
214   
215
216
217    <!-- http://geni-orca.renci.org/owl/compute.owl#DiskImage -->
218
219    <owl:Class rdf:about="&compute;DiskImage"/>
220   
221
222
223    <!-- http://geni-orca.renci.org/owl/compute.owl#ServerCloud -->
224
225    <owl:Class rdf:about="&compute;ServerCloud"/>
226   
227
228
229    <!-- http://geni-orca.renci.org/owl/ip4.owl#IPAddress -->
230
231    <owl:Class rdf:about="&ip4;IPAddress"/>
232   
233
234
235    <!-- http://geni-orca.renci.org/owl/request.owl#Reservation -->
236
237    <owl:Class rdf:about="&request-schema;Reservation"/>
238   
239
240
241    <!-- http://geni-orca.renci.org/owl/topology.owl#Interface -->
242
243    <owl:Class rdf:about="&topology;Interface"/>
244   
245
246
247    <!-- http://geni-orca.renci.org/owl/topology.owl#NetworkConnection -->
248
249    <owl:Class rdf:about="&topology;NetworkConnection"/>
250   
251
252
253    <!-- http://geni-orca.renci.org/owl/topology.owl#NetworkDomain -->
254
255    <owl:Class rdf:about="&topology;NetworkDomain"/>
256   
257
258
259    <!-- http://www.w3.org/2006/time#DurationDescription -->
260
261    <owl:Class rdf:about="&time;DurationDescription"/>
262   
263
264
265    <!-- http://www.w3.org/2006/time#Interval -->
266
267    <owl:Class rdf:about="&time;Interval"/>
268   
269
270
271    <!--
272    ///////////////////////////////////////////////////////////////////////////////////////
273    //
274    // Individuals
275    //
276    ///////////////////////////////////////////////////////////////////////////////////////
277     -->
278
279   
280
281
282    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f# -->
283
284    <request-schema:Reservation rdf:about="http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#">
285        <collections:element rdf:resource="&request;CondorMaster"/>
286        <collections:element rdf:resource="&request;CondorWorkers"/>
287        <collections:element rdf:resource="&request;Link1"/>
288        <request-schema:hasTerm rdf:resource="&request;Term"/>
289    </request-schema:Reservation>
290   
291
292
293    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#CondorMaster -->
294
295    <compute:ComputeElement rdf:about="&request;CondorMaster">
296        <request-schema:postBootScript rdf:datatype="&xsd;string"
297            >#!/bin/bash
298
299echo &quot;hello from neuca script&quot;
300echo  StrictHostKeyChecking no &gt;&gt; /etc/ssh/ssh_config
301
302echo $CondorMaster.IP(&quot;Link1&quot;)  condor-master condor-master.orca &gt;&gt; /etc/hosts
303for i in {100..200}; do
304   name=$(($i - 100))
305   echo `echo $self.IP(&quot;Link1&quot;) | sed &#39;s/.[0-9][0-9]*$//g&#39;`.$i  condor-w$name condor-w$name\.orca &gt;&gt; /etc/hosts
306done
307#
308echo condor-master &gt; /etc/hostname
309/bin/hostname -F /etc/hostname
310/etc/init.d/condor stop
311cp /etc/condor/condor_config.master.local /etc/condor/condor_config.local
312echo &#39;CONDOR_HOST     = condor-master.orca&#39; &gt;&gt; /etc/condor/condor_config.local
313echo &#39;DEFAULT_DOMAIN_NAME = orca&#39; &gt;&gt; /etc/condor/condor_config.local
314/etc/init.d/condor start
315#</request-schema:postBootScript>
316        <compute:diskImage rdf:resource="&request;GREE2013-demo"/>
317        <topology:hasInterface rdf:resource="&request;Link1-CondorMaster"/>
318        <domain:hasResourceType rdf:resource="&compute;VM"/>
319        <compute:specificCE rdf:resource="&eucalyptus;EucaM1Large"/>
320        <request-schema:inDomain rdf:resource="&rcivmsite;Domain"/>
321    </compute:ComputeElement>
322   
323
324
325    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#CondorWorkers -->
326
327    <compute:ServerCloud rdf:about="&request;CondorWorkers">
328        <request-schema:postBootScript rdf:datatype="&xsd;string"
329            >#!/bin/bash
330
331function testSSH() {
332        local user=${1}
333        local host=${2}
334        local timeout=${3}
335       
336        SSH_OPTS=&quot;-q -o PreferredAuthentications=publickey -o HostbasedAuthentication=no -o PasswordAuthentication=no -o StrictHostKeyChecking=no&quot;
337       
338        ssh -q -q $SSH_OPTS -o &quot;BatchMode=yes&quot; -o &quot;ConnectTimeout ${timeout}&quot;  ${user}@${host} &quot;echo 2&gt;&amp;1&quot; &amp;&amp; return 0 || return 1
339}
340
341
342
343echo &quot;hello from neuca script&quot;
344
345echo $CondorMaster.IP(&quot;Link1&quot;)  condor-master condor-master.orca &gt;&gt; /etc/hosts
346for i in {100..200}; do
347   name=$(($i - 100))
348   echo `echo $self.IP(&quot;Link1&quot;) | sed &#39;s/.[0-9][0-9]*$//g&#39;`.$i  condor-w$name  condor-w$name\.orca &gt;&gt; /etc/hosts
349done
350ip_end=`echo $self.IP(&quot;Link1&quot;) |  sed &#39;s/^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.//g&#39;`
351name=$(($ip_end - 100))
352host_name=condor-w$name
353echo $host_name  &gt; /etc/hostname
354/bin/hostname -F /etc/hostname
355
356# wait until the condor-master is pingable
357UNPINGABLE=true
358for ((i=0;i&lt;60;i+=1));
359do
360      echo &quot;testing ping, try: $i &quot; &gt;&gt; /tmp/bootscript.out
361      PING=`ping -c 3 condor-master &gt; /dev/null 2&gt;&amp;1`
362      if [ &quot;$?&quot; = &quot;0&quot; ]; then
363           UNPINGABLE=false
364           break
365       fi
366       sleep 10
367done
368
369UNSSHABLE=true
370for ((i=0;i&lt;60;i+=1));
371do
372   echo &quot;testing ssh, try: $i&quot; &gt;&gt; /tmp/bootscript.out
373   testSSH root condor-master 5
374   if [ &quot;$?&quot; = &quot;0&quot; ]; then
375        UNSSHABLE=false
376        break
377    fi
378    sleep 10
379 done
380
381orca_name=$self.Name()
382echo $orca_name
383
384ssh condor-master &quot;echo $orca_name &gt; /tmp/$host_name&quot;
385
386/etc/init.d/condor stop
387cp /etc/condor/condor_config.worker.local /etc/condor/condor_config.local
388echo &#39;CONDOR_HOST     = condor-master.orca&#39; &gt;&gt; /etc/condor/condor_config.local
389echo &#39;DEFAULT_DOMAIN_NAME = orca&#39; &gt;&gt; /etc/condor/condor_config.local
390echo &#39;ALLOW_ADMINISTRATOR = *&#39; &gt;&gt; /etc/condor/condor_config.local
391echo &#39;ALLOW_OWNER = *&#39; &gt;&gt; /etc/condor/condor_config.local
392/etc/init.d/condor start</request-schema:postBootScript>
393        <layer:numCE rdf:datatype="&xsd;integer">2</layer:numCE>
394        <request-schema:dependOn rdf:resource="&request;CondorMaster"/>
395        <compute:diskImage rdf:resource="&request;GREE2013-demo"/>
396        <topology:hasInterface rdf:resource="&request;Link1-CondorWorkers"/>
397        <domain:hasResourceType rdf:resource="&compute;VM"/>
398        <compute:specificCE rdf:resource="&eucalyptus;EucaM1Large"/>
399        <request-schema:inDomain rdf:resource="&rcivmsite;Domain"/>
400    </compute:ServerCloud>
401   
402
403
404    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#GREE2013-demo -->
405
406    <compute:DiskImage rdf:about="&request;GREE2013-demo">
407        <topology:hasGUID
408            >8eefd8b0a311add05fd5ce7bf4c9eb0d264e3dce</topology:hasGUID>
409        <topology:hasURL
410            >http://geni-images.renci.org/images/GEC-demos/GEC17/GEC17-v0.1.xml</topology:hasURL>
411    </compute:DiskImage>
412   
413
414
415    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#Link1 -->
416
417    <topology:NetworkConnection rdf:about="&request;Link1">
418        <layer:bandwidth rdf:datatype="&xsd;integer">10000000</layer:bandwidth>
419        <topology:hasInterface rdf:resource="&request;Link1-CondorMaster"/>
420        <topology:hasInterface rdf:resource="&request;Link1-CondorWorkers"/>
421        <layer:atLayer rdf:resource="&ethernet;EthernetNetworkElement"/>
422    </topology:NetworkConnection>
423   
424
425
426    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#Link1-CondorMaster -->
427
428    <topology:Interface rdf:about="&request;Link1-CondorMaster">
429        <ip4:localIPAddress rdf:resource="&request;Link1-CondorMaster-ip-172-16-42-1"/>
430    </topology:Interface>
431   
432
433
434    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#Link1-CondorMaster-ip-172-16-42-1 -->
435
436    <ip4:IPAddress rdf:about="&request;Link1-CondorMaster-ip-172-16-42-1">
437        <ip4:netmask>255.255.255.0</ip4:netmask>
438        <layer:label_ID>172.16.42.1</layer:label_ID>
439    </ip4:IPAddress>
440   
441
442
443    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#Link1-CondorWorkers -->
444
445    <topology:Interface rdf:about="&request;Link1-CondorWorkers">
446        <ip4:localIPAddress rdf:resource="&request;Link1-CondorWorkers-ip-172-16-42-100"/>
447    </topology:Interface>
448   
449
450
451    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#Link1-CondorWorkers-ip-172-16-42-100 -->
452
453    <ip4:IPAddress rdf:about="&request;Link1-CondorWorkers-ip-172-16-42-100">
454        <layer:label_ID>172.16.42.100</layer:label_ID>
455        <ip4:netmask>255.255.255.0</ip4:netmask>
456    </ip4:IPAddress>
457   
458
459
460    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#Term -->
461
462    <time:Interval rdf:about="&request;Term">
463        <time:hasDurationDescription rdf:resource="&request;TermDuration"/>
464    </time:Interval>
465   
466
467
468    <!-- http://geni-orca.renci.org/owl/2089bed0-c3e7-4f17-8de7-db3cb790849f#TermDuration -->
469
470    <time:DurationDescription rdf:about="&request;TermDuration">
471        <time:days rdf:datatype="&xsd;decimal">14</time:days>
472    </time:DurationDescription>
473   
474
475
476    <!-- http://geni-orca.renci.org/owl/compute.owl#VM -->
477
478    <rdf:Description rdf:about="&compute;VM"/>
479   
480
481
482    <!-- http://geni-orca.renci.org/owl/ethernet.owl#EthernetNetworkElement -->
483
484    <rdf:Description rdf:about="&ethernet;EthernetNetworkElement"/>
485   
486
487
488    <!-- http://geni-orca.renci.org/owl/eucalyptus.owl#EucaM1Large -->
489
490    <rdf:Description rdf:about="&eucalyptus;EucaM1Large"/>
491   
492
493
494    <!-- http://geni-orca.renci.org/owl/rcivmsite.rdf#rcivmsite/Domain -->
495
496    <topology:NetworkDomain rdf:about="&rcivmsite;Domain"/>
497</rdf:RDF>
498
499
500
501<!-- Generated by the OWL API (version 2.2.1.1101) http://owlapi.sourceforge.net -->
502