Scroll to navigation

wwsh(1) General Commands Manual wwsh(1)

NAME

wwsh - Warewulf command line shell interface

SYNOPSIS

wwsh [wwsh options] [command] [object] [command options]

DESCRIPTION

Welcome to the Warewulf shell interface. This application allows you to interact with the Warewulf backend database and modules via a single interface.

OPTIONS

wwsh options:

-d, --debug

Enable debug output.

--help

Print short help.

-v, --verbose

Enable verbose output.

-q, --quiet

Enable quiet mode.

-y, --yes, --noask

Assume 'Yes' to all questions.

COMMANDS

bootstrap

Manage your bootstrap images.

dhcp

Manage DHCP service and configuration.

events

Control how events are handled.

exit

Exit/leave the Warewulf shell.

file

Manage files within the Warewulf data store.

help

Print command (module) help.

node

Node manipulation commands.

object

Generically manipulate all Warewulf data store entries.

output

Set the output verbosity level.

provision

Node provision manipulation commands.

pxe

Manage PXE configuration.

quit

Exit/leave the Warewulf shell.

ssh

Spawn parallel ssh connections to nodes.

vnfs

Manage your VNFS images.

bootstrap

Usage

wwsh bootstrap <command> [options] [targets]

Summary

This interface allows you to manage your bootstrap images within the Warewulf data store.

Commands

import

Import a bootstrap image into Warewulf.

export

Export a bootstrap image to the local file system.

delete

Delete a bootstrap image from Warewulf.

list

Show all of the currently imported bootstrap images.

(re)build

Build (or rebuild) the tftp bootable image(s) on this host.

help

Show usage information.

Options

-n, --name

When importing a bootstrap use this name instead of the file name.

-1

With list command, output bootstrap name only.

Examples

Warewulf> bootstrap import /path/to/name.wwbs --name=bootstrap
Warewulf> bootstrap export bootstrap1 bootstrap2 /tmp/exported_bootstrap/
Warewulf> bootstrap list

dhcp

Usage

wwsh dhcp <command>

Summary

The DHCP command configures/reconfigures the DHCP service.

Commands

update

Update the DHCP configuration, and restart the service.

restart

Restart the DHCP service.

help

Show usage information.

events

Usage

wwsh events [command]

Summary

Control how/if events are handled.

Commands

enable

Enable all events for this shell (default).

disable

Disable the event handler.

help

Show usage information.

file

Usage

wwsh file <command> [options] [targets]

Summary

The file command is used for manipulating file objects. It allows you to import, export, create, and modify files within the Warewulf data store. File objects may be used to supply files to nodes at provision time, dynamically create files or scripts based on Warewulf data and more.

Commands

import

Import a file into a file object.

export

Export file object(s).

edit

Edit the file in the data store directly.

new

Create a new file in the data store.

set

Set file attributes/metadata.

show

Show the contents of a file.

list

List a summary of imported file(s).

print

Print all file attributes.

(re)sync

Sync the data of a file object with its source(s).

delete

Remove a node configuration from the data store.

help

Show usage information.

Options

-l, --lookup

Identify files by specified property (default: "name").

-p, --program

What external program should be used (edit/show).

-D, --path

Set destination (i.e., output) path for this file.

-o, --origin

Set origin (i.e., input) path for this file.

-m, --mode

Set permission attribute for this file.

-u, --uid

Set the UID for this file.

-g, --gid

Set the GID for this file.

-n, --name

Set the reference name for this file (not path!).

--interpreter

Set the interpreter name to parse this file.

Note

Use "UNDEF" to erase the current contents of a given field.

Examples

Warewulf> file import /path/to/file/to/import --name=hosts-file
Warewulf> file import /path/to/file/to/import/with/given-name
Warewulf> file edit given-name
Warewulf> file set given-name --origin=UNDEF --mode=0700
Warewulf> file set hosts-file --path=/etc/hosts --mode=0644 --uid=0
Warewulf> file list
Warewulf> file delete name123 given-name

node

Usage

wwsh node <command> [options] [targets]

Summary

The node command is used for viewing and manipulating node objects.

Commands

new

Create a new node configuration.

set

Modify an existing node configuration.

list

List a summary of nodes.

print

Print the node configuration.

delete

Remove a node configuration from the data store.

clone

Clone a node configuration to another node.

help

Show usage information.

Targets

The target(s) specify which node(s) will be affected by the chosen action(s). By default, node(s) will be identified by their name(s). Use the --lookup option to specify another property (e.g., "hwaddr" or "groups").

All targets can be bracket expanded as follows:


n00[0-99] All nodes from n0000 through n0099 (inclusive).
n00[00,10-99] n0000 and all nodes from n0010 through n0099.

Options

-l, --lookup

Identify nodes by specified property (default: "name").

-1

With list command, output node name only.

-g, --groups

Specify all groups to which this node belongs.

--groupadd

Add node to specified group(s).

--groupdel

Remove node from specified group(s).

-D, --netdev

Specify network device to add or modify (defaults: eth0).

--netdel

Remove specified netdev from node.

--netrename

Rename a given network interface.

-I, --ipaddr

Set IP address of given netdev.

-M, --netmask

Set subnet mask of given netdev.

-N, --network

Set network address of netdev.

-G, --gateway

Set gateway of given netdev.

-H, --hwaddr

Set hardware/MAC address.

-f, --fqdn

Set FQDN of given netdev.

-m, --mtu

Set MTU of given netdev.

-p, --hwprefix

Specify a prefix for hardware/MAC address of a given netdev.

-c, --cluster

Specify cluster name for this node.

--domain

Specify domain name for this node.

-n, --name

Specify new name for this node.

-e, --enabled

Set whether the node is enabled (defaults: True).

Examples

Warewulf> node new n0000 --netdev=eth0 --hwaddr=xx:xx:xx:xx:xx:xx
Warewulf> node set n0000 -D eth0 -I 10.0.0.10 -G 10.0.0.1
Warewulf> node set n0000 --netdev=eth0 --netmask=255.255.255.0
Warewulf> node set --groupadd=mygroup,hello,bye --cluster=mycluster n0000
Warewulf> node set --groupdel=bye --set=vnfs=sl6.vnfs
Warewulf> node list xx:xx:xx:xx:xx:xx --lookup=hwaddr
Warewulf> node print --lookup=groups mygroup hello group123
Warewulf> node clone n0000 new0000
Warewulf> node set --enabled=false n0000

object

Usage

wwsh object <command> [options] [targets]

Summary

The object command provides an interface for generically manipulating all object types within the Warewulf data store.

Commands

modify

Add, delete, and/or set object member variables.

print

Display object(s) and their members.

delete

Completely remove object(s) from the data store.

dump

Recursively dump objects in internal format.

canonicalize

Check and update objects to current standard format.

help

Show usage information.

Options

-l, --lookup

Identify objects by specified property (default: "name").

-t, --type

Only operate on objects of the specified type.

-p, --print

Specify which fields are printed (":all" for all).

-s, --set

Set a member variable (or "field").

-a, --add

Add value(s) to specified member array variable.

-D, --del

Delete value(s) from specified member variable.

Examples

Warewulf> object print -p :all
Warewulf> object print -p _id,name,_type

Warning

This command is VERY POWERFUL. It is primarily intended for. developers and power users. Please use CAREFULLY, if at all Data. stores which are corrupted by misuse of this command may not be recoverable.

USE AT YOUR OWN RISK!

output

Usage

wwsh output [command]

Summary

This command sets the desired command output verbosity level.

Commands

normal

The standard (and default) output level intended for normal usage

quiet

Only print warning, error, or critical messages..

verbose

Increase verbosity over the normal output level.

debug

Show debugging messages (very verbose).

Examples

Warewulf> output verbose
Warewulf> output normal

provision

Usage

wwsh provision <command> [options] [targets]

Summary

The provision command is used for setting node provisioning attributes.

Commands

set

Modify an existing node configuration.

list

List a summary of the node(s) provision configuration.

print

Print the full node(s) provision configuration.

help

Show usage information.

Targets

The target is the specification for the node you wish to act on. All targets can be bracket expanded as follows:


n00[0-99] inclusively all nodes from n0000 to n0099.
n00[00,10-99] n0000 and inclusively all nodes from n0010 to n0099.

Options

-l, --lookup

How should we reference this node? (default is name).

-b, --bootstrap

Define the bootstrap image that this node should use.

-V, --vnfs

Define the VNFS that this node should use.

--validate

Enable checksum validation of VNFS on boot.

--master

Specifically set the Warewulf master(s) for this node.

--files

Define the files that should be provisioned to this node.

--fileadd

Add a file to be provisioned to this node.

--filedel

Remove a file to be provisioned to this node.

--preshell

Start a shell on the node before provisioning (boolean).

--postshell

Start a shell on the node after provisioning (boolean).

--postnetdown

Shutdown the network after provisioning (boolean).

--bootlocal

Boot the node from the local disk ("exit" or "normal").

--console

Set a specific console for the kernel command line.

--kargs

Define the kernel arguments (assumes "net.ifnames=0 biosdevname=0 quiet" if UNDEF).

--pxelinux

Define a custom PXELINUX/boot image to use.

--selinux

Boot node with SELinux support? (valid options are: UNDEF, ENABLED, and ENFORCED).

--dformat

Partitions to format during bootstrap phase.

--dpartition

Disk to partition during bootstrap phase.

-f, --filesys

Value of FILESYSTEMS variable.

--bootloader

Disk to install bootloader to (STATEFUL).

Examples

Warewulf> provision set n000[0-4] --bootstrap=2.6.30-12.x86_64
Warewulf> provision set n00[00-99] --fileadd=ifcfg-eth0
Warewulf> provision set -l=cluster mycluster --vnfs=rhel-6.0
Warewulf> provision set -l=group mygroup hello group123
Warewulf> provision set n00[0-4] --console=ttyS1,57600 --kargs="noacpi"
Warewulf> provision list n00[00-99]

pxe

Usage

wwsh pxe <command> [options] [targets]

Summary

Manage PXE configuration.

Commands

update

Update the PXE configuration.

help

Show usage information.

Targets

The target is the specification for the node you wish to act on. All targets can be bracket expanded as follows:


n00[0-99] inclusively all nodes from n0000 to n0099.
n00[00,10-99] n0000 and inclusively all nodes from n0010 to n0099.

Options

-l, --lookup

How should we reference this node? (default is name).

Examples

Warewulf> pxe update
Warewulf> pxe update n000[0-4]

ssh

Usage

wwsh ssh [nodes/targets] [command]

Summary

Run ssh connections to node(s) in parallel by either node names, group or any other known lookup.

Targets

The target(s) specify which node(s) will be affected by the chosen action(s). By default, node(s) will be identified by their name(s).. Use the --lookup option to specify another property (e.g., "hwaddr" or "groups").

All targets can be bracket expanded as follows:


n00[0-99] All nodes from n0000 through n0099 (inclusive).
n00[00,10-99] n0000 and all nodes from n0010 through n0099.

Options

-l, --lookup

Identify nodes by specified property (default: "name").

-a, --allnodes

Send command to all configured nodes.

Examples

Warewulf> ssh n00[00-49] hostname
Warewulf> ssh -l groups compute,interactive hostname

vnfs

Usage

wwsh vnfs <command> [options] [targets]

Summary

This interface allows you to manage your VNFS images within the Warewulf data store.

Commands

import

Import a VNFS image into Warewulf.

export

Export a VNFS image to the local file system.

delete

Delete a VNFS image from Warewulf.

list

Show all of the currently imported VNFS images.

set

Set any VNFS attributes.

help

Show usage information.

Targets

The target is the specification for the VNFS you wish to operate on.

Options

-n, --name

When importing a VNFS use this name instead of the file name.

-c, --chroot

Define the location of the template chroot.

-1

With list command, output VNFS name only.

Examples

Warewulf> vnfs import /path/to/name.vnfs --name=vnfs1
Warewulf> vnfs export vnfs1 vnfs2 /tmp/exported_vnfs/
Warewulf> vnfs list
Dec 21 2017 Warewulf 3.8