5 Replies Latest reply on Nov 25, 2008 8:10 AM by Bill Robinson

    Creating BlPackage and deployJob using blcli

      I’m new to BladeLogic and looking for helps, comments, and suggestions on how to solve this situation that I’m in.


      We have a lot of files transferred type of deployment. The problem is that each deployment is different from each other’s; Deployed source files may be different and may reside on different directories; target server may be different; and deployed target directories may be different. To automate this process, I intend to use blcli to create BlPackage and deployJob on the fly to complete the deployment.


      Deployed files are zip into single zip file; create file BlPackage for the zip file, create deployJob for the package and deploy it. Using post commands to move deployed files where need to be moved


      Does this method work?

      Are there any other suggestions for this situation?

      Does anybody have any sample of using blcli to create BlPackage and deployJob?


      Thanks for your help



        • 1. Re: Creating BlPackage and deployJob using blcli
          Bill Robinson

          this method should work.


          another option, if this is more of a one time thing (where you don't need the files stored in bladelogic) would be to write an nsh script that takes parameters and they uses dsync or just cp to copy the files from one server to another based on the parameters.


          then you could have some blcli that just creates new nsh script jobs w/ the right parameters and runs them.


          there should be some examples of package creation in the blcli help docs if you look in the BlPackage name space area.

          • 2. Re: Creating BlPackage and deployJob using blcli

            Thanks for you comments Bill.


            I thought about using nsh script for these scenarios but if we use nsh script; how can we rollback if we need to? One of the reasons that I intend to use BlPackage is for rollback if we need to.


            Do you have any example or tell me how to create BlPackage from Live Server objects using blcli scripts.




            • 3. Re: Creating BlPackage and deployJob using blcli
              Bill Robinson

              yeah - if you need rollback use a blpackage, but in that case, you probably don't want to use the zip, you want to add all the files directly into the package.



              for the blcli you need something like


              BlPackage createPackageFromAsset - do you have access to the blcli help docs? you really just need to dig though there to figure out the commands - the naming is pretty good in most cases.


              using that command, you'd need a component template created first that lists all of the files or directories you'd want in your package, kind of like a shopping list...

              • 4. Re: Creating BlPackage and deployJob using blcli



                I will have to remember to add all files to the package instead of a zip file.


                I do have access to blcli help docs and will dig into it.


                If I'm using post-commands to move files where they need to be moved on target server. Does this effect the rollback process? If so, what is the alternative method?



                • 5. Re: Creating BlPackage and deployJob using blcli
                  Bill Robinson

                  if you define post undo commands that will really undo your changes, then rollback will work.