13 Replies Latest reply on Nov 3, 2016 3:28 PM by Bill Robinson

    NBU Installation(Advanced Mode)

    Venudhar Reddy

           Hello All,

      I have requirement as below and NSH ready as below for step 1

       

      1) Identify the free space and set as "can_be_used=true" ,  in various places as below

       

      BASEDIR=/usr/openv

      TEMP_VAR=/var/tmp

      TEMP_CRASH=/var/crash

      TEMP_SWAP=/tmp

       

      if space is available(min 2GB in atleast 2 individual mount points) in any of the directories mentioned above, then keep the mounts as usable mounts.

       

      2) Now that I identified the mount points which has enough free space, I want to push a "live server object" to the above identified one of the mount points (which is passed space check).

      I have a challenge here, as when I create live server object or BL package, we pre-define the PATH to be pushed/deployed. I am wondering how can I pass the identified free mount point to the live server object, as a destination directory

      NBU_1.png

       

      In the above screen shot, NBU_Clien_Push NSH script will identify the mount points which are free and assign to respective variable, as usable.

       

      I want the output(s) of the "NBU_Client_Push" to be feeded to "live_obj" as a input.

      example if "TEMP_VAR=/var/tmp" had 3 GB free space, then the "live_obj" target "path = /var/tmp".

       

      Is there any "local property" value which can take the inputs of the NSH output and feed back to "live_obj" dynamically.

      Please advise as I am struck here.

      Thanks,

        • 1. Re: NBU Installation(Advanced Mode)
          Bill Robinson

          one way to do this would be to create a local property in the blpackage for the install path, change the actual path in the blpackage to include the property - like ??INSTALL_PATH??/blah, and then w/ your nsh script create a deploy job w/ the blpackage and specify the value of the local property you want to pass through to the blpackage and then run the deploy job from the nsh script.

           

          you should also be able to do this w/ compliance.

          • 2. Re: NBU Installation(Advanced Mode)
            Venudhar Reddy

            Hi Bill,

             

            Could you please help me the local property how to set it, specific to my requirement.

             

            I never tried ( honestly I don't know ) a NSH job passing as an argument to BLpackage.

             

            Thank you

            • 3. Re: NBU Installation(Advanced Mode)
              Venudhar Reddy

              This is my sample NSH Script...

               

              PUSHPATH=""

              REQUIREMINSPACE=3145728

               

              (assuming I already identified the space of var/tmp /tmp /var/crash and assigned to variables accordingly)

               

              if [ $TMP_FREESPACE -gt $REQUIREMINSPACE ]; then

                PUSHPATH=/tmp

                elif [ $TMP_FREESPACE -gt $REQUIREMINSPACE ]; then

                PUSHPATH=/var/tmp

                elif [ $CRASH_FREESPACE -gt $REQUIREMINSPACE ]; then

                PUSHPATH=/var/crash

                else

                echo "ERROR: No Free space"

              fi

               

              let me take 2 nodes -- Client_1 and Client_2

               

              Client_1 has enough space at /var/tmp and Client_2 has /var/crash.

               

              How can I push the tarball of size 650MB to /var/tmp on Client_1 and to /var/crash on Client_2 how can I acomplish for this 2 hosts and 1000+ clients.

               

              How can I assign  ??PUSHPATH?? in NSH from host to host as per the above NSH script and assign it blpackage as the target directory variable.

              Please advise the local property.

               

              I have working  NSH and blpackage ready but was struck now at this point.

               

              Appreciate you quick response.

               

              Thank you..

              • 4. Re: NBU Installation(Advanced Mode)
                Bill Robinson

                in the blpackage you can create a local property and then use that in the path.  for the blcli you can use the DeployJob.setOverriddenParameterValue to set the value the property should have.

                • 5. Re: NBU Installation(Advanced Mode)
                  Venudhar Reddy

                  I have created local property as below

                  I also assigned the property to BLPackage path

                   

                  I have to append the blcli command to my NSH script.. isn't it?

                   

                  example as per BMC docs

                  DeployJob setOverriddenParameterValue /Applications/Apache/Deploy DeployApache install_dir "/opt/apache"

                   

                  my job is in location -- "[MYCOMPANY]--> Content Distribution --> UPGRADES  --> myblpackage"

                   

                  Could you please correct  the command if I'm wrong.

                   

                  as per NSH script

                   

                  if [ $TMP_FREESPACE -gt $REQUIREMINSPACE ]; then

                    PUSHPATH=/tmp

                    elif [ $TMP_FREESPACE -gt $REQUIREMINSPACE ]; then

                    PUSHPATH=/var/tmp

                    elif [ $CRASH_FREESPACE -gt $REQUIREMINSPACE ]; then

                    PUSHPATH=/var/crash

                    else

                    echo "ERROR: No Free space"

                  fi

                   

                  blcli "/MYCOMPANY/Content Distribution/UPGRADES/myblpackages"  setOverriddenParameterValue Path "$PUSHPATH"

                  • 6. Re: NBU Installation(Advanced Mode)
                    Venudhar Reddy

                    or

                    blcli_execute DeployJob setOverriddenParameterValue /MYCOMPANY/Content Distribution/UPGRADES myblpackage Stage_Path "$PUSHPATH"

                    • 7. Re: NBU Installation(Advanced Mode)
                      Venudhar Reddy

                      I have tried as below but getting below error

                       

                      WSASxxxxxx% blcred cred -acquire -profile "PUMA Bladelogic"

                      Authentication succeeded: acquired session credential

                      WSASxxxxxx%

                      WSASxxxxxx% blcli_setoption roleName XXXDevelopers

                      WSASxxxxxx% blcli_setoption serviceProfileName "PUMA Bladelogic"

                      WSASxxxxxx% blcli_connect

                      WSASxxxxxx% blcli_execute DeployJob setOverriddenParameterValue "/XXX/NBU_Upgrade" "live_obj" Stage_Path "$PUSHPATH"

                      Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find group with name : /XXX/NBU_Upgrade and type : 5005: com.b

                      ladelogic.om.infra.mfw.util.NotFoundException: Could not find child group by name : NBU_Upgrade with parent of type : 4 and id : 2044212

                      • 8. Re: NBU Installation(Advanced Mode)
                        Bill Robinson

                        what path is /XXX ?

                        • 9. Re: NBU Installation(Advanced Mode)
                          Venudhar Reddy

                          Just masked as it my company name.

                           

                          full tree goes like this,  Jobs--->MYCOMPANY-->NBU_Upgrade-->Location of my BLPackage

                          and for NSH script ,    Jobs--->MYCOMPANY-->NBU_Upgrade-->Location of myNSH Script

                           

                           

                          • 10. Re: NBU Installation(Advanced Mode)
                            Venudhar Reddy

                            And respective Depot paths are

                             

                            Depot --> MyCompany --> NBU_Upgrade --> blpackage

                            Depot --> MyCompany --> NBU_Upgrade --> NSH_script

                            • 11. Re: NBU Installation(Advanced Mode)
                              Bill Robinson

                              I’m not sure why ‘jobs’ would be in the DEPOT path.  also – unless you have a folder named “Jobs” at the root of the workspace, “Jobs” (the workspace name” is not part of the path.

                              • 12. Re: NBU Installation(Advanced Mode)
                                Venudhar Reddy
                                Hi Bill,   1. Jobs are in "JOBS " workspace not in Depot.  2. Workspace name is not used.  just giving the relative path of the actual job for reference .   WSASxxxxxx% blcli_connect WSASxxxxxx% blcli_execute DeployJob setOverriddenParameterValue "/XXX/NBU_Upgrade" "live_obj" Stage_Path "$PUSHPATH" Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find group with name : /XXX/NBU_Upgrade and type : 5005: com.b ladelogic.om.infra.mfw.util.NotFoundException: Could not find child group by name : NBU_Upgrade with parent of type : 4 and id : 2044212  XXX -- used to mask the actual name for privacy purpose ,like company name or host name etc.  Thanks ,
                                • 13. Re: NBU Installation(Advanced Mode)
                                  Bill Robinson

                                  if you are running this:

                                  blcli_execute DeployJob setOverriddenParameterValue "/XXX/NBU_Upgrade" "live_obj" Stage_Path "$PUSHPATH"

                                  and getting this:

                                  Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find group with name : /XXX/NBU_Upgrade and type : 5005:

                                  that means you have not given the correct path to the job.  since you are obfuscating it i can't tell you if it's correct or not.