none
Set NodeGroup by Powershell

    Question

  • Hello,

    its quite annoying to set each and every group by hand through the GUI. Is there a better way to do it by powershell or cmd script?
    C# would be ok too, however the wrong tool in my opinion.

    For motivation, we choose separate Groups for the deployed Software and for setup status. So during redeployment we move nodes quite often to SW Groups and so on.

    It would be great to have an option to apply more than one NodeGroup at a time in the gui

    Regards,

    Johannes


    JH
    Tuesday, March 16, 2010 3:20 PM

Answers

  • Hi Johannes
    Whether this is a better way depends on how you operate, but you can use Get-HpcNode in conjunction with Add-HpcGroup using something like

    Get-HpcNode|where {$_.<attribute> -eq "softwarename"}|Add-HpcGroup -name <nodegroupname>

    so for example if you populate the node description with the software it has installed (softwarepackage2):

    Get-HpcNode|where {$_.description -eq "softwarepackage2"}|Add-HpcGroup -name SoftwarePackage2Group

    Or if you want to add a node to a group based on it's config e.g. installed memory

    Get-HpcNode|where {$_.Memory -ge "8000"}|Add-HpcGroup -name Over8GBGroup

    How do you select which nodes should go into which groups?

    I agree that being able to choose more than one group at a time via the GUI would be  nice.

    Cheers
    Dan
    Tuesday, March 16, 2010 5:05 PM