Automated Server Unlicensing and Decommissioning

Version 3
    Share:|

    I know this topic has been discussed before, but it seems that it is still an open issue for most people. I figured I would offer a solution that I developed for us here.

     

    Here is a suite of scripts I wrote to batch decommission and unlicense servers. It is written for the Linux app server, but I am sure it could be easily adapted for a Windows app server.

     

    This script has been tested with BladeLogic Operations Manager 7.5.0.

     

    Included Files

    ---------------------

    unlicenseServer.pl - unlicenses servers on the BladeLogic Support site (primary script)

    decommissionServer.jy - decommissions servers from the BladeLogic Operation Manager console

    decommission_servers.txt - default file containing list of servers to decommission/reclaim licenses

     

     

    Script Requirements

    ------------------------------

    Python 2.3/Jython

    Perl 5.8.5 with the most current versions of the following libraries:

         English
         CGI

         LWP::UserAgent
         HTTP::Request::Common

         HTTP::Cookies
         FindBin

     

     

    Execution Method

    --------------------------

    Command Line Script

         Menu Driven or unattended

     

     

    Usage

    ----------

    The script is designed to use a cached credentials file generated by blcred. In the file decommissionServer.jy, there are four options (starting on line 54) that need to be set to match your environment and the location of the credentials file:

         userInfoFile

         userName

         userRole

         authType

     

    The script expects input from a file (default is decommission_servers.txt). Servers should be listed one server per line.

     

    Begin by running unlicenseServer.pl. Executed with no command-line arguments starts the script in menu-driven mode. To get a list off command-line switches, run the script with the -h option.

     

    In the menu-driven mode, the script will prompt you for all the information you need to provide. Once all information is provided, the script will perform the chosen task.

     

    This script has been updated to work with the latest version of the BladeLogic licensing site (as of 01/07/2010).