5 Replies Latest reply on Oct 8, 2013 12:31 PM by Steffen Kreis

    Deploy Region specific Hosts file using a BLPackage

    Steffen Kreis

      Hi,

       

      we are currently looking for an nice way to deploy a region specific Hosts file to our Windows Server using a BLpackage.

      The goal is to do that using just a BLPacakage (No Compliance/Remediation).

      So when a server is in Frankfurt this content needs to be in the Hosts file, when its in Lodnon another content needs to be in place.

       

      The location/region of a serer is defined within a property on the target.

       

      I can't get my head around this on how to do this in a good and efficient way.

       

      Any help is much appreciated.

       

      Cheers

      Steffen

        • 1. Re: Deploy Region specific Hosts file using a BLPackage
          Upendra P

          Hi Steffen,

           

          Is there any restriction that you want to use BLpackage only?

          Because, I can think of creating an NSH script which will take targets (or servers) as argument, get its location from its server property and then copy the required content based on the location. Run this script using NSH script job.

           

          Thanks

          • 2. Re: Deploy Region specific Hosts file using a BLPackage
            Steffen Kreis

            The there is not really such a restriction.

            However running that through NSH it's not really a deployable content that appears as deployed under PackageTracking.

             

            Also when included in a Compliance Remediation scenario an NSH script isn't of any help.

             

            Ideally I have a single rule that checks if the correct file is in place and if not deploys it with a single package.

            But as we talk about Windows here, doing that with a single package isn't straight forward.

             

             

            • 3. Re: Deploy Region specific Hosts file using a BLPackage
              Mike Jones

              The remediation package could be an NSH script reads the server location property, or does some other calculation to determine the location and then executes the correct BLPackage deploy job. (location1_deploy or location2_deploy)

               

              That way you still have the benefits of a blpackage to update the entries correctly in something like a host file.

               

              If the configuration is more static say something like different static routes per location and you have a server location property you can include all the configuration files in the blpackage and execute/copy the correct one as part of the package.

               

              So the blpackage contains location1routes.cmd and location2routes.cmd, and a custom action can be defined to run ??TARGET.LOCATION??routes.txt and it will execute the correct one - similar approach to copy the correct file to the final location

              • 4. Re: Deploy Region specific Hosts file using a BLPackage
                Bill Robinson

                set some server properties that contain the correct hosts entries (maybe in a a custom psi) and then in the blpackage reference that property...

                • 5. Re: Deploy Region specific Hosts file using a BLPackage
                  Steffen Kreis
                  Sure but we want to avoid this as the DMZ build topic only affects 1% of our server environment.


                  I was hoping to store the content in a local property of a blpackage and then have some nice logic that puts the correct content in place based on some target properties.


                  I know it can be done with external commands, but doing that with dos cmd is soooo clumsy.

                  But on the other hand, having to tell my Windows Engineering team that we need a NSH script for that also seems less than ideal.


                  I guess it comes down to the two ideas i've alraedy raised about "condition in a blpackage" and a layer higher the "conditional deploy job"


                  Steffen