Node Management Commands: node
List all nodes: ls
Entry:
lbg node ls
Overview:
usage: lbg node ls [-h] [-q] [-s] [-w] [-t] [-p] [--csv] [--json] [--yaml]
[--table] [--noheader]
options:
-h, --help show this help message and exit
-q, --quiet only show node id
-s, --started only show started node
-w, --waiting only show waiting node
-t, --pending only show pending node
-p, --paused only show paused node
--csv output with csv format
--json output with json format
--yaml output with yaml format
--table output with table format
--noheader does not print header information
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--quiet | -q | Display only node id | No |
--started | -s | Display only started nodes | No |
--waiting | -w | Display only waiting nodes | No |
--paused | -p | Display only paused nodes | No |
Example:
$ lbg node ls --yaml # View all nodes and output in yaml format
$ lbg node ls -paused -waiting # View all paused and waiting nodes
Create Node: create
Entry:
lbg node create -i IMAGE_ID -s SCASS_TYPE -d DISK_SIZE
Overview:
usage: lbg node create [-h] [-f] node_id [node_id ...]
positional arguments:
node_id id of the node
options:
-h, --help show this help message and exit
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--name | -n | Node name | No |
--image_id | -i | Image id to be used | Yes |
--scass_type | -s | Node configuration, for configuration information please refer to Machine Configuration | Yes |
--disk_size | -d | Node disk size | Yes |
Example:
$ lbg node create -n dpgen -s c4_m8_cpu -d 100 -i 501
# Create a node with the name dpgen, configuration 4 cores, 8GB memory, 100GB hard disk, and image id 501
Restart node: restart
Entrance:
lbg node restart [-h] node_id [node_id ...]
Summary:
usage: lbg node restart [-h] node_id [node_id ...]
positional arguments:
node_id id of the node
options:
-h, --help show this help message and exit
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
node_id | - | Node id | Yes |
Example:
$ lbg node restart 54889 11037
# Start nodes 54889 and 11037
Pause node: stop
Entrance:
lbg node stop [-h] node_id [node_id ...]
Summary:
usage: lbg node stop [-h] [-f] node_id [node_id ...]
positional arguments:
node_id id of the node
options:
-h, --help show this help message and exit
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
node_id | - | Node id | Yes |
--force | -f | Do not ask during pause process | No |
Example:
$ lbg node stop 54889 11037
# Pause nodes 54889 and 11037
Remove node: rm
Entrance:
lbg node rm [-h] node_id [node_id ...]
Summary:
usage: lbg node rm [-h] [-f] node_id [node_id ...]
positional arguments:
node_id id of the node
options:
-h, --help show this help message and exit
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
node_id | - | Node id | Yes |
--force | -f | Do not ask during removal process | No |
Example:
$ lbg node rm 54889 11037
# Remove nodes 54889 and 11037
Convert node to snapshot: tosnap
Entrance:
lbg node tosnap [-h] [-c COMMENT] -i IMAGE_NAME -m NODE_ID
Summary:
usage: lbg node tosnap [-h] [-c COMMENT] -i IMAGE_NAME -m NODE_ID
options:
-h, --help show this help message and exit
-c COMMENT, --comment COMMENT
comment of image
-i IMAGE_NAME, --image_name IMAGE_NAME
name of the development image
-m NODE_ID, --node_id NODE_ID
id of the node
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--comment | -c | Snapshot comment | No |
--image_name | -i | Snapshot name | Yes |
--node_id | -m | Node id | Yes |
Example:
$ lbg node tosnap -i "DPGEN-04" -m 11037 -c "dpgen backup in April"
# Convert node id 11037 to development image with comment "DPGEN-04" and name "dpgen backup in April"