22.0 Workload-Driven Cloud Services > How-to's > Creating a service

Conventions

22.4 Creating a service

To create a virtual container and add workflows

  1. Create the top layer VC using the mvcctl -c command.
    > mvcctl -c
    VC 'vc1' created
  2. Submit the storage mount to vc1. To do so, run msub -l, requesting the storage workflow's configured submit job. You may submit multiple storage mounts if desired. You must submit a job script to satisfy the msub syntax, but Moab ignores the script.
    > msub -l walltime=2:00:00,gres=gold:50,flags=gresonly,template=storage -W x="vc=vc1" job.sh --xml 
    <Data><job JobID="Moab.4"></job><CreatedVC>vc2</CreatedVC></Data>

    Job Moab.4 and VC vc2 have been created. Moab.4 has been placed inside of vc2, and vc2 has been placed inside of vc1.

  3. Submit the VM-tracking job to vc1, setting its dependencies on the storage mount variable (SM) and its name space (vc2).

    To request a specific name for your VM, set the VMID variable. The request will be rejected if the VM ID is not available.

    > msub -l walltime=INFINITY,template=VMTracking,os=rhel51,depend=set:vc2.SM -W x="vc=vc1" -W x=var=VMID=myVM" job.sh --xml
    <Data><job JobID="Moab.5"></job></CreatedVC>vc4</CreatedVC></Data>

    Job Moab.5 and VC vc4 have been created. Moab.5 has been placed inside of vc4, and vc4 has been placed inside of vc1. Moab.5 depends on vc2.SM, the variable set by Moab.4's trigger.

© 2014 Adaptive Computing