3 Replies Latest reply on Mar 12, 2008 6:18 PM by John van Ommen

    Best Practice for Automatic Packaging

      I'm interested to find out if anyone has come up with a method for automatically creating BLPackages.


      Here's the situation I'm in.


      I have a group of developers who are uploading their completed files to a network share. When these files are promoted to production status, they are put in a different network share. Once deployed to a target server, they wind up in a different location.


      Based on this description, it's clear that parameterization could be used extensively. For instance, a property instance could be defined for three network locations mentioned in the previous paragraph.


      The problem is that these files are uploaded frequently, and there are hundreds of them. So recreating the BLPackages would be too time consuming. Soft linking the files would be a possibility if it weren't for the fact that the source directories may change, and the source names are incremented based on the version number.


      Many customers have comparable packaging requirements. What's a good way to automate this?


      Some ideas off the top of my head:


      - Soft link the files, but strictly enfore the source location and names so nothing breaks?

      - Use BLCLI to automatically package up anything that's dropped in the network share. This option isn't very good because parameterization must be done manually.

        • 1. Re: Best Practice for Automatic Packaging

          Which sorts of things are you parameterizing that needs to be done manually?

          Why are they packaging such a massive amount of files so frequently?


          Try pushing for them to transform their process and technical requirements to be more efficient and, beyond that, to be more in alignment with what our software can do best for them given their business requirements.

          • 2. Re: Best Practice for Automatic Packaging
            Bill Robinson

            do they keep these files in cvs or svn, something we could check the files out of for a particular version?


            i'd agree w/ brad - moving this stuff around on network shares isn't ideal, when then can load it into bladelogic once, promote it w/ acls, and push it out..


            but you could still automate getting it into bladelogic from one of the dirs (i don't think you can use network deploy w/ blpackages yet can you?). w/ some properties, naming conventions and blcli you could package up the directory where they drop the code if there's not already a package for it in a folder in the depot...

            • 3. Re: Best Practice for Automatic Packaging

              According to the 7.4.1 documentation you can soft link files in a BLPackage via two methods. The first is via a URL. I don't see a way to do this in the GUI, which leaves us method two. Method two is via a soft link to a file in the depot.


              If anyone knows of a way to soft link to a URL, post it here.


              At this point, I've created a BLPackage that deploys a zip file to the target host.

              Using an external command I'm expanding the zip file.

              Once the zip file is expanded, you can use all your favorite BladeLogic methods on the files, including parameterization, config files, compliance, etc...


              The lynchpin to this deployment method is that you must load the file into the depot periodically. For instance, if my client's developers update their code, we must zip up the file on their CVS server, then load it into the depot.


              The following BLCLI command is the best way I could find to do this:


              +D:\apps\someapp.zip>blcli -v ADK ImportExport importObject /d/apps/someapp.zip /d/apps/someapp.zip/mapping.xml




              The command above loads our file into the depot.

              Of course, we have to export the file before we can import it via BLCLI. Exporting the file in the GUI is very simple.


              Additional details on the BLCLI command can be found in the docs.