Skip to content

Instantly share code, notes, and snippets.

@xarses
Created November 23, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xarses/d2c8c76b2c39d1a34628 to your computer and use it in GitHub Desktop.
Save xarses/d2c8c76b2c39d1a34628 to your computer and use it in GitHub Desktop.
fuel node --help
usage: fuel node [-h] [--env ENV]
[--list | --set | --delete | --network | --disk | --deploy | --hostname HOSTNAME | --delete-from-db | --provision]
[--default | --download | --upload] [--dir DIR]
[--node NODE [NODE ...]] [--force] [--all] [--role ROLE]
[--skip TASK [TASK ...] | --tasks TASK [TASK ...]]
[--end TASK] [--start TASK]
optional arguments:
-h, --help show this help message and exit
--env ENV, --env-id ENV
environment id
--list, -l List all nodes.
--set, -s Set role for specific node.
--delete Delete specific node from environment.
--network, --net Node network configuration.
--disk Node disk configuration.
--deploy Deploy specific nodes.
--hostname HOSTNAME Set node hostname.
--delete-from-db Delete specific nodes only from fuel db.
User should still delete node from cobbler
--provision Provision specific nodes.
--default Get default configuration of some node
--download, -d Download configuration of specific node
--upload, -u Upload configuration to specific node
--dir DIR Select directory to which download node attributes
--node NODE [NODE ...], --node-id NODE [NODE ...]
Node id.
--force, -f Bypassing parameter validation.
--all Select all nodes.
--role ROLE, -r ROLE Role to assign for node.
--skip TASK [TASK ...]
Get list of tasks to be skipped.
--tasks TASK [TASK ...]
Get list of tasks to be executed.
--end TASK Specify endpoint for the graph traversal.
--start TASK Specify start point for the graph traversal.
Examples:
To delete nodes from fuel db:
fuel node --node-id 1 --delete-from-db
fuel node --node-id 1 2 --delete-from-db
(this works only for offline nodes)
fuel node --node-id 1 --delete-from-db --force
(this forces deletion of nodes regardless of their state)
Assign some nodes to environment with with specific roles:
fuel --env 1 node set --node 1 --role controller
fuel --env 1 node set --node 2,3,4 --role compute,cinder
Download current or default disk, network,
configuration for some node:
fuel node --node-id 2 --disk --default
fuel node --node-id 2 --network --download \
--dir path/to/directory
Upload disk, network, configuration for some node:
fuel node --node-id 2 --network --upload
fuel node --node-id 2 --disk --upload --dir path/to/directory
Execute deployment tasks
fuel node --node 2 --tasks hiera netconfig
fuel node --node 2 --skip hiera netconfig
fuel node --node 2 --skip rsync --end pre_deployment
fuel node --node 2 --end netconfig
fuel node --node 2 --start hiera --end neutron
fuel node --node 2 --start post_deployment
Remove some nodes from environment:
fuel --env 1 node remove --node 2,3
Remove nodes no matter to which environment they were assigned:
fuel node remove --node 2,3,6,7
Remove all nodes from some environment:
fuel --env 1 node remove --all
To set node hostname:
fuel node --node-id 1 --hostname ctrl-01
To list all available nodes:
fuel node
To filter them by environment:
fuel --env-id 1 node
It's Possible to manipulate nodes with their short mac addresses:
fuel node --node-id 80:ac
fuel node remove --node-id 80:ac,5d:a2
Deploy/Provision some node:
fuel node --node-id 2 --provision
fuel node --node-id 2 --deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment