PARENT attribute in placement resolution

"Olivier Pernet" <[email protected]> Wed, 28 Jun 2006 16:53:38 +0200
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
Hello,

I saw in the reference manual that the PARENT, ROOT and ATTRIb
reference parts are not permitted in placement references.

However, we have a configuration here that we feel needs PARENT references :
#####
#include "org/smartfrog/components.sf"
#include "org/smartfrog/sfcore/workflow/combinators/container.sf"
#include "ch/cern/openlab/smartfrog/xen/components.sf"
#include "org/smartfrog/services/shellscript/components.sf"

/*
 * A gLite testbed-in-a-box. Deploy on a Xen-enabled machine.
 */
sfConfig extends Compound {
   // Needed for proper termination of the component :
   // the shell is needed for domain shutdown.
   sfSyncTerminate true;

   // The shell needs to come first, too.
   myShell extends BashShell;

   rgmaServer extends Compound {
      vm4rgma extends XenDomainLVM {
         domainName "rgma";
         ip "128.142.134.121";
         hostname "oplaslim9-rgma";

         defaultsetup extends DefaultSetup;
      }

      dummy extends Prim {
         sfHost ATTRIB vm4rgma:ip;
         sfClass "org.smartfrog.sfcore.prim.PrimImpl";
      }
   }

   vomsServer extends Compound {
      vm4voms extends XenDomainLVM {
         domainName "voms";
         ip "128.142.134.122";
         hostname "oplaslim9-voms";

         defaultsetup extends DefaultSetup;
      }

      dummy extends Prim {
         sfHost ATTRIB vm4voms:ip;
         sfClass "org.smartfrog.sfcore.prim.PrimImpl";
      }
   }

   DefaultSetup extends {
      PARENT:shell LAZY ATTRIB myShell;

      PARENT:kernel "/boot/vmlinuz-2.6-xen";
      PARENT:ramdisk "/boot/initrd-2.6-xen.img";
      PARENT:baseImage "/data/xen/slc3-smartfrog.img";
      PARENT:memory 256;
      PARENT:vcpus 2;

      PARENT:volumeGroup "vg";
      PARENT:volumeSize "2g";

      PARENT:netmask "255.255.0.0";
      PARENT:gateway "128.142.1.1";
   }
}
#####

We'll be adding more virtual machines, so you can understand that we
don't want to duplicate the parameters all over the place.

We could certainly just use
  kernel ATTRIB DefaultSetup:kernel;
,etc. for all parameters, but this is a lot of copy/paste and is not so elegant.

Do you have another idea about how we could do this properly ?

Thanks in advance.
-- 
Olivier Pernet
Summer Student - CERN Openlab

We are the knights who say
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642