GREASE Cluster Management Commands

Monitoring Prototype (monitor)

This command prototype is installed on all servers by default. It ensures the cluster remains healthy and that nodes that are no longer responding are culled from the environment

class tgt_grease.management.Commands.monitor.ClusterMonitor

Bases: tgt_grease.core.Types.Command.Command

Cluster Monitor to ensure nodes are alive

execute(context)

This method monitors the environment

An [in]finite loop monitoring the cluster nodes for unhealthy ones

Parameters:context (dict) – context for the command to use
Returns:Command Success
Return type:bool
help = '\n Ensures health of GREASE cluster by providing a Prototype to\n scan the active nodes and disable those that are unhealthy\n \n Args:\n --loop:<int>\n How many scans you would like to perform of cluster\n --foreground\n If set will print log messages to the commandline\n \n '
purpose = 'Control cluster health'

Administrative CLI (bridge)

This command gives users a place to interact with their cluster on the CLI

class tgt_grease.management.Commands.bridge.Bridge

Bases: tgt_grease.core.Types.Command.Command

CLI tool for cluster administration

The command palate is listed here:

Args:
    register
        register this node with a GREASE Cluster as provided in the configuration file
    info
        --node:<ObjectID>
            !Optional! parameter to observe a remote node. Defaults to look at self
        --jobs
            !Optional! if set will list jobs executed
        --pJobs
            !Optional! include Prototype Jobs in list of jobs
    assign
        --prototype:<string>
            !mandatory if assigning a prototype! prototype to assign
            !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN
        --role:<string>
            !mandatory if assigning a role! role to assign
            !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN
        --node:<ObjectID>
            !Optional! remote node to assign job to
    unassign
        --prototype:<string>
            !mandatory if unassigning a prototype! prototype to unassign
            !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN
        --role:<string>
            !mandatory if unassigning a role! role to unassign
            !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN
        --node:<ObjectID>
            !Optional! remote node to unassign job to
    cull
        --node:<ObjectID>
            !Optional! parameter to cull a remote node. Defaults to look at self
    activate
        --node:<ObjectID>
            !Optional! parameter to activate a remote node. Defaults to look at self
    --foreground
        If set will print log messages to the commandline

Note

This tool is ever evolving! If you need something more feel free to create an issue!

bridge

Model Instance

Type:BridgeCommand
execute(context)

This method monitors the environment

An [in]finite loop monitoring the cluster nodes for unhealthy ones

Parameters:context (dict) – context for the command to use
Returns:Command Success
Return type:bool
help = '\n CLI for administrators to manage GREASE Clusters\n \n Args:\n register\n register this node with a GREASE Cluster as provided in the configuration file\n info\n --node:<ObjectID>\n !Optional! parameter to observe a remote node. Defaults to look at self\n --jobs\n !Optional! if set will list jobs executed\n --pJobs\n !Optional! include Prototype Jobs in list of jobs\n assign\n --prototype:<string>\n !mandatory if assigning a prototype! prototype to assign\n !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN\n --role:<string>\n !mandatory if assigning a role! role to assign\n !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN\n --node:<ObjectID>\n !Optional! remote node to assign job to\n unassign\n --prototype:<string>\n !mandatory if unassigning a prototype! prototype to unassign\n !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN\n --role:<string>\n !mandatory if unassigning a role! role to unassign\n !NOTE! THIS MUST BE SEPARATED BY COLON OR EQUAL SIGN\n --node:<ObjectID>\n !Optional! remote node to unassign job to\n cull\n --node:<ObjectID>\n !Optional! parameter to cull a remote node. Defaults to look at self\n activate\n --node:<ObjectID>\n !Optional! parameter to activate a remote node. Defaults to look at self\n --foreground\n If set will print log messages to the commandline\n \n '
purpose = 'Control node/cluster operations'