Release Automation

Expand all | Collapse all

Most efficient way to set step dependencies during predeployment?

  • 1.  Most efficient way to set step dependencies during predeployment?

    Posted 08-04-2017 10:59 AM

    Hi everyone,

     

    I have a scenario where I use the predeployment to create a bunch of steps (I think the largest deployment had like ~70 steps) and of course I also need to handle the dependencies between those steps.

     

    And here comes my questions, so far I only know of the action

     

    - ROC - Add Step Dependency

     

    where I enter the step name and an array of the preceding steps as parameters.

     

    The problem I'm facing is, that I can't create the steps already in the order they are supposed to be executed, as this would be an absolute nightmare of a flow to implement with the given possibilites in CA RA.

     

    Let's use a small example to visualize my issue:

     

    1) DeployStepA

    2) DeployStepB

    3) DeployStepC

     

    I now want to create another DeployStepD that should be executed between DeployStepA and DeployStepB, so that in the end my deployment would like this

     

    1) DeployStepA

    2) DeployStepD

    3) DeployStepB

    4) DeployStepC

     

    To achieve this I'm currently doing the following:

    Calling the "Add Step Dependency" action once where I define that DeployStepA is a predecessor of DeployStepD and then I do a loop that goes through DeployStepB and DeployStepC to set DeployStepD as their predecessor.

     

    I have the feeling that the loop costs a lot of time, it looks very slow in the UI. Although I'm not sure if it really takes that long in the backend to set up all dependencies or if the visiualization in the UI is the bottleneck here.

     

    Anyway if the loop would be the issue, is there a way to fasten this up or would it be more the opener for an idea to have a second "Add Step Dependency" action, but where you could define the steps that should be executed after the given step?

     

    That being said, looking forward to a discussion about this question. Maybe someone from CA has more details about this stuff and could even tell me, if really the UI might be a factor here as well that slows down this dependency handling, as in the UI steps get moved around the list and dependency numbers are being changed and added too.

     

    Thanks,

    Michael



  • 2.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-04-2017 11:13 AM

    Hey Michael,

     

    Is there any way to "reverse" your logic?  What I mean by that - can you include ALL the potential deployment steps within your template, then use PreDeploy to remove the ones you don't need?  We use this idea (though we have nowhere near 70 steps) and the nice thing is you can define the dependencies ahead of time, and they get automatically adjusted by CA RA when steps are removed.  



  • 3.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-04-2017 11:24 AM

    Hi Timothy,

     

    yes and no. we have both scenarios, one where I set up all steps in the preplan and just kick out unneeded steps in the predeployment and the case I have mentioned above. The one I have mentioned above can not be "reversed"

     

    But both require the setting of the dependencies, so basically I would move the slow process from the predeployment to the preplan. which is of course a bit more efficient as I only need to run the preplan once compared to the predeployment, which is executed for every deployment.

     

    By the way, the large number of steps comes from the fact, that the deployment I'm setting up there is basically a master for several subdeployments and the master is used for shutting down the applications, start and monitor the subdeployments and starting everything back up again, plus some prechecks and healthstatechecks before and after 

     

    best regards

    Michael



  • 4.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-08-2017 04:42 PM

    Melanie_Giuliani -- Might need your help in finding the right resource to answer this one for Michael. This is a pretty advanced design question that's a bit outside the ballpark of my expertise in Support, but I bet our Services team would have some ideas to share on this. 



  • 5.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-09-2017 01:01 PM

    Hi JamesPanetti - thanks for looping me in. Let me reach out to the Services team and see if there's anyone who can help MichaelGebhardt on this.



  • 6.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-09-2017 08:17 AM

    Just a thought: if steps A, B and C are already in sequence and you insert step D between A and B, you only need to add a dependency from D to A and B to D, no need to loop through B and C if C is already dependent on B, right?



  • 7.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-09-2017 08:37 AM

    Hi Leo,

     

    you're correct.

     

     

    But in my example I left out, that every deployment step is optional, as I thought I didn't want to overcomplicate it right from the start

     

    So yeah, keeping track of everything is a real issue here for me, which is why I went the way to simply set all dependencies and don't look if the depedency is required or not, because of a following step depedency, that would already cover it.

     

    If I would think as a programmer, I would probably resolve all dependencies first and then add only the required ones. But I don't see a "lightweight" way to do that in CA-RA without multipleying instances of some flows and so probably making the process itself not as manageable.

     

    best regards

    Michael



  • 8.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-18-2017 11:45 AM

    I read original posting. You can do it in two ways.

     

    1. Using Action "ROC - Assign Multiple Servers To Server Types"
    2. Using A flow which loops to assign one servers to one step at a time using two Actions.
      • First Action "ROC - Create Step"
      • Second Action "ROC - Add Step Dependencies"

     

    This is personal preference.

    1. Assigning Multiple servers to server types needs JSON string as an input in specific format.
      • Assign multiple servers across different server types and different steps.
        The Json object doesn't have to be in array shape, it can be in a regular JSON object shape.
        If its a JSON obect (and not a file) make sure it doesn't contains any 'new lines' in it.
        JSON format is: (this is an array example)
        [{"Step Name":"example of step", "Server Type Name":"server type 1", "Server Identifiers":["192.168.0.56","server-name-example"], "Overwrite Existing Servers":"true", "Step's stage":"Deployment"},
        {"Step Name":"example of step", "Server Type Name":"server type 2", "Server Identifiers":["192.168.0.196","localhost"], "Overwrite Existing Servers":"true", "Step's stage":"Post_Deployment"}].
      • Note: the RED part.
    2. Second method is easier to manage with name value pairs but you need to have these actions in loop to set one step at a time..

     

    Hope this helps

    Thanks

    Ram



  • 9.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 08-21-2017 02:29 AM

    Hi Ram,

     

    can you explain how server assignment helps with the handling of step dependencies? I mean, I know steps will be blocked if they use the same server and it isn't allowed to run in parallel, but the order in which it is executed is random, if I don't specify dependencies.

     

    I'm having trouble understanding your (1)

     

    thanks,

    Michael



  • 10.  Re: Most efficient way to set step dependencies during predeployment?

    Posted 10-16-2017 08:17 AM

    HI Michael , 

     

    I converted this one to a discussion so it stay available as topic.

     

    Regards Dirk