Deployment Solution

 View Only
  • 1.  DS Job Sequencing

    Posted Jun 17, 2009 08:51 PM
    Hi, 

    I'm wondering, does anyone have any experience in Job sequencing? I'm fully aware of the error handling capabilities in a task that allows you to direct the flow of code execution based on success or failure. I'm looking to find out if there are more advanced ways to sequence jobs? Specifically, I'm looking to create a tree of jobs that might go a little like

    std Server build
    --> + IIS
    --> + SQL
    --> + FS
    std Desktop build
    --> + dev
    --> + mgmt
    ...etc

    Thanks,
    jasbro


  • 2.  RE: DS Job Sequencing

    Posted Jun 22, 2009 11:59 AM
    I specifically number my jobs in each folder (mainly it helps me to remember which order they go in as well when I am testing).  The jobs should run in order.  Another note, don't initiate jobs that have to run in any specific order from DSWEB.  I've found that it randomly takes the jobs and runs them.  The DS Console seems to take them in order one at a time.


  • 3.  RE: DS Job Sequencing

    Posted Jun 22, 2009 04:22 PM
     We configure all the Tasks in a single job with conditionals. Thats the only consistent way we have found to have all Tasks running in a particular order both in the 32 bit console and the web console.


  • 4.  RE: DS Job Sequencing

    Posted Jun 22, 2009 04:33 PM
    To my knowledge, it has worked every time from the DS Console, the only area I've not seen it work is from the DSWEB console.

    Timinator, out of curiosity, how many clients/jobs do you manage this way.  It seems like it could be an administrative nightmare!  But that's just me, I'm a visual person and like to see what gets scheduled by looking at a folder of jobs.  I use conditionals mainly when I am trying distinguish between different hardware sets (i.e. if it is a Dell Latitude E6400 it should kick of this type of install of the wireless software, as opposed to if it's a desktop it shouldn't install the wireless software).

    Definitely not saying what you are doing is wrong (if it works for you, then it's right for your environment and that's great!).


  • 5.  RE: DS Job Sequencing

    Posted Jun 23, 2009 02:28 PM

    bhawver, we have a bit north of 24,000 clients. 10 DS and 3 NS forwarding info to one additional reporting NS.


  • 6.  RE: DS Job Sequencing

    Posted Jul 02, 2009 02:36 PM
    Thanks for the suggestions. Just following up here. I decided on going with a two fold approach. First I create following job structure:

    Job Structure
    Base Build
     --01. Job
     --02. Job
     --xx. etc
     --99. Conditional Sequence Job
    IIS Build
    --00. Conditional Catch Job
    --01. Job
    --xx. etc
    SQL Build
    --00. Conditional Catch Job
    --01. Job
    --xx. etc

    ...Then I create the following computer group structure:

    Computer Group Structure
    SQL Servers
    IIS Servers
    etc

    ...In Job #99, I use the following conditions:

    Field: User Defined Token
    Operation: is Exactly
    Value: the name of the computer group folder (i.e. SQL Servers, IIS Servers, etc)
    Token: %#*"SELECT g.name FROM dbo.computer AS c JOIN dbo.computer_group AS g on c.group_id=g.group_id WHERE c.computer_id='%ID%'"%

    ...Still in Job #99, I put add a run script task to each condition that has the following line of code:
    REM Placer task to sequence jobs

    ...this will always exit with an Error code=0 which I then chain the job to the appropriate 00. Catch Sequence Job.

    ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
    Reflection on this Architecture
    Benefits:
    • I can visually see jobs completed (I'm with Bhawver on need to see a list of completed jobs and not getting confused with which jobs apply and which dont)
    • I can stop, start, pause and resume and job in the sequence (very helpful for hardware / network failures)
    • I can combo system roles (such as IIS + SQL) manually by completing one role and then kicking off the first job in the second system role
    • My jobs conditionally based on Hardware and Platform... This means its easier to manage condition statments instead of having a whole bunch for a single job
    • Management of jobs is easy to understand and configure
    • Systems management is pivoted on server role, so corporate policies are easier to write
    Cons:
    • I have to manually move the computer object into the proper group before execution
    • I have no feedback mechanism to provide to the user if they didn't add the machine to the proper computer group
    • I can not execute a single job without it attempting to continue to execute the rest of the jobs in the sequence
    There might be more I'm not considering, but overall it works. I think it's a shame that DS doesn't naturally have these capabilities. I'm still open to suggestions and comments.

    Thanks,
    jasbro