Changes between Version 24 and Version 25 of velocity-templates

Show
Ignore:
Timestamp:
06/13/13 10:03:48 (6 years ago)
Author:
ibaldin (IP: 152.54.9.21)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • velocity-templates

    v24 v25  
    11 
    22== Overview == 
    3 A post-boot script can be added to any node within a slice. This script can be written in any language that can be interpreted by the compute node (that said, the most common script language in use is shell or Bash). The script is executed immediately after boot is complete. Prior to execution these scripts are processed by a Velocity template engine inside ORCA that performs macro substitutions and allows the script to reference entities within the slice (virtual machines, network links, etc.) as objects. This represents a rich 'network scripting' capability within substrates running ORCA. 
     3A post-boot script can be added to any node within a slice. This script can be written in any language that can be interpreted by the compute node (that said, the most common script language in use is shell or Bash). The script is executed immediately after boot is complete. Prior to execution these scripts are processed by a Velocity template engine inside ORCA that performs macro substitutions and allows the script to reference entities within the slice (virtual machines, network links, etc.) as objects. In addition, Velocity is a Turing-complete language suitable for code auto-generation using macros like #foreach ad #if. This represents a rich 'network scripting' capability within substrates running ORCA. 
    44 
    55This document explains the use of the templating features in post-boot scripts. Post-boot scripts can be specified natively in Flukes, or as [wiki:orca-and-rspec RSpec extension].  
     
    4040 
    4141 
    42  
    43  
    44 The following is an example post boot script that adds an entry to the /etc/hosts file for each of the instances in the request and sets the hostname of each instance to an appropriate value.  In this particular example, the first virtual machine in the group is assumed to be a master node named "master" while the remaining nodes are named "!NodeGroup-1", "!NodeGroup-2", etc.. The names of the group and node correspond to names in the screen shot.     
     42The following is an example post boot script that adds an entry to the /etc/hosts file for each of the instances in the request and sets the hostname of each instance to an appropriate value.  In this particular example, the first virtual machine in the group is assumed to be a master node named "master" while the remaining nodes are named "!NodeGroup-1", "!NodeGroup-2", etc.. The names of the group and node correspond to names in the screen shot. Note the use of the #foreach macro that allows for generation of code - the resulting script after the processing has multiple 'echo' lines. 
    4543 
    4644[[Image(flukes-templates1.png)]]