Changes between Version 2 and Version 3 of flukes

Show
Ignore:
Timestamp:
10/24/11 16:28:13 (7 years ago)
Author:
pruth (IP: 152.54.9.28)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • flukes

    v2 v3  
    88Flukes allows a post boot script to be associated with each node or node group.   Post boot scripts are the preferred way to create customized instances from a shared image.   Specifically, a post boot script can contain an arbitrary script that is a executed immediately after the instance has booted.    
    99 
    10 For added functionality, ORCA uses [http://velocity.apache.org/engine/releases/velocity-1.5/index.html velocity templates] to create the scripts ([http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html  general velocity template user's guide]). 
     10 
     11Simple example: 
     12 
     13{{{ 
     14   echo "Hello from post boot script script" 
     15   apt-get install my-favorite-app 
     16   echo node1 > /etc/hostname 
     17}}} 
    1118 
    1219 
    1320 
     21For added functionality, ORCA uses [http://velocity.apache.org/engine/releases/velocity-1.5/index.html velocity templates] to create the scripts.   See the [http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html user's guide] for details about Velocity.     
    1422 
    15 === Examples === 
     23ORCA templates follow the Velocity syntax which can be used to replace several key pieces of data that are assigned by ORCA.     Specifically, there is are one or more arrays that contains the IP addresses of each instance.   For each group there is an array of IP addresses referenced using the name provided to Flukes.  In addition, there is a variable called $MY_ADDR_INDEX that is the index of the IP address of the current instance within its group's array of IP addresses.  All arrays of IP addresses are accessible from any post boot script in the current request. 
     24 
     25Template example: 
    1626 
    1727{{{ 
    1828  # Test script  
    19    echo "hello from neuca script" 
    20    mkdir -p /opt/pegasus       
    21    echo 'rnas.edc.renci.org:/euca/data/pruth /opt/pegasus nfs vers=3,proto=tcp,hard,intr,timeo=600,retrans=2,wsize=32768,rsize=32768 0 0' >> /etc/fstab 
    22    #echo 'condor-master:/var/nfs /opt/pegasus nfs vers=3,proto=tcp,hard,intr,timeo=600,retrans=2,wsize=32768,rsize=32768 0 0' >> /etc/fstab 
    23    echo $CondorWorkers.get(0) condor-master >> /etc/hosts 
    24    mount -a 
    25 #set ( $size = $CondorWorkers.size() - 1 ) 
     29   echo "Hello from post boot script" 
     30   apt-get install my-favorite-app 
     31#set ( $size = $Group1.size() - 1 ) 
    2632#foreach ( $i in [1..$size] ) 
    27    echo $CondorWorkers.get($i) condor-w$i >> /etc/hosts 
     33   echo $Group1.get($i) condor-w$i >> /etc/hosts 
    2834#end 
    2935#if ( $MY_ADDR_INDEX == 0) 
     
    3440   cp /opt/pegasus/condor-configs/condor_config.worker /etc/condor/condor_config 
    3541#end 
    36    /bin/hostname -F /etc/hostname 
    37    echo export CONDOR_CONFIG="/opt/pegasus/condor-master/etc/condor_config"  >> /home/pruth/.bashrc 
    38    echo export  PATH="/opt/pegasus/pegasus-3.1.0/bin:/opt/pegasus/condor-master/bin:$PATH" >> /home/pruth/.bashrc 
    39    /etc/init.d/condor start 
    40    echo /opt/pegasus/apps/SC11-demo/libs/l_cprof_p-11.1.072/mkl/lib/em64t >> /etc/ld.so.conf 
    41    echo /opt/pegasus/apps/SC11-demo/libs/l_cprof_p-11.1.072/intel64 >> /etc/ld.so.conf 
    42    echo /opt/pegasus/apps/SC11-demo/libs/l_cproc_p-11.1.072/lib/intel64 >> /etc/ld.so.conf 
    43    /sbin/ldconfig  
    4442}}} 
    4543