6 Replies Latest reply on Apr 26, 2012 11:37 AM by Rohit Nayyar

    Populating values during runtime

    Siddu angadi



      I need to deploy one config file, which has 5 variables and values will be different from Server to Server.


      I need to popluate these vales during runtine through any file.


      I am aware how to do it through property file, I  do not want this approach. 


      Is it possible to pass file path, so that bladelogic should pick suitable value?





        • 1. Re: Populating values during runtime
          Bill Robinson

          Do you know the values beforehand ?


          You could set the values as a server property (or component property and deploy to components) and the package can read from that.

          • 2. Populating values during runtime
            Siddu angadi

            Hi Bill,


            Yes I know the values before hand.


            Since there is complexity of values, I am not going with the approach of defining values in property.


            Is it possible in below way?


            1. Read from file   ( file is csv file and content format is :    TargetServer, Value1, Value2)
            2. Pick the value from file based on target server hostname
            3. Populate these values during runtime.




            • 3. Populating values during runtime
              Bill Robinson

              the problem is that you have to get the values into blade some how before the job runs if you want to push it into the config file.


              so if you can write a wrapper nsh job you could read the values, set it on the job, push to one server, then loop through the rest of the servers.  in 8.2 i think you can reference the deploy properties in an ET so you could loop through the servers and create and run an ET for each deploy.

              1 of 1 people found this helpful
              • 4. Populating values during runtime

                In the past, I have seen thing like

                a config file deploy using a deploy job and in the post command , run somethng like sed to set the values at run time.

                Not saying this is the best way, but works if the config file is not too complex for a simple substiution.

                • 5. Populating values during runtime
                  Siddu angadi

                  Thanks Bill and Rohit.


                  I have one question, I have created one custom property class say APP_CONFIG. which has two properties such NAME and LOC.


                  We usualy call ??TARGET.NAME?? in blpackge to parameterize TARGET Name in blpackage. Similarly, How to populate property values of APP_CONFIG property class into blpackage?


                  Is it this way APP_CONFIG.NAME?




                  • 6. Populating values during runtime

                    Define local property APP_INST  in your blpackage of the TYPE property class  APP_CONFIG

                    Create a instance of this APP_CONFIG class, and set the values to NAME and LOC.

                    Set the property of blpackage to the instance.

                    and then use ??APP_INST.NAME?? and ??APP_INST.LOC??