-
Notifications
You must be signed in to change notification settings - Fork 3
NLB Node Module
The NLB node module will allow you to add, stop or start nodes within an NLB cluster.
Key | Type | Description | Values |
---|---|---|---|
ensure | string | Specifies the operation this module should do | add, remove, start, stop, resume, suspend |
drain | boolean | [Optional] Only needed when stopping a node, will drain the node first before stopping | [Default] false |
timeout | integer | [Optional] Only needed when stopping a node, specifies how long the drain will take place (in seconds) before stopping the node anyway | [Default] 30 |
cluster | string | Only needed when adding a new node, this is the name of the cluster the new node should be added to | - |
interface | string | Only needed when adding a new node, this is the name of the interface the new node should have | - |
nodes | string array | Array of node names to perform actions against | - |
The following is an example of using the NLB node type to start nodes in a paint section:
{
"paint": [
{
"type": "nlb-node",
"ensure": "start",
"nodes": [
"NODE_NAME_1",
"NODE_NAME_2"
]
}
]
}
The above will start the NODE_NAME_1
and NODE_NAME_2
nodes, on the local cluster of the machine that the palette is run against.
The following is an example of how to stop nodes:
{
"paint": [
{
"type": "nlb-node",
"ensure": "stop",
"drain": true,
"timeout": 60,
"nodes": [
"NODE_NAME_3"
]
}
]
}
The above will stop the NODE_NAME_3
node on the local cluster of the machine that the palette is run against. The stop will first drain the node for 60 seconds, if it fails to stop before 60 seconds, it will be stopped anyway.
The following is an example of how to add a node:
{
"paint": [
{
"type": "nlb-node",
"ensure": "add",
"cluster": "NODE_CLUSER_NAME",
"interface": "vlan-3",
"nodes": [
"NODE_NAME_4"
]
}
]
}
The above will add the NODE_NAME_4
node to the NODE_CLUSER_NAME
cluster, with an interface type of vlan-3
.
The following is an example of how to remove a node in the erase section:
{
"erase": [
{
"type": "nlb-node",
"ensure": "remove",
"nodes": [
"NODE_NAME_2"
]
}
]
}
The above will remove the NODE_NAME_2
node from the local cluster of the machine the palette is run against.