Groups¶
A Group can be attached to every Node, in order to put them in categories.
Typically, you have group names like alpha, beta and production.
The interactive shell will show the nodes in other colours, depending on the
group they’re in.
For instance.
from deployer.groups import production, staging
class N(Node):
@production
class Child(Node):
pass
-
class
deployer.groups.Group¶ Group to which a node belongs.
-
color= None¶ Colour for this service/action in the shell. Right now, only the colours from the
termcolorlibrary are supported:grey, red, green, yellow, blue, magenta, cyan, white
-
-
deployer.groups.set_group(group)¶ Set the group for this node.
@set_group(Staging) class MyNode(Node): pass