7.1. add

7.1.1. add appliance

rocks add appliance {appliance} [compute=bool] [graph=string] [membership=string] [node=string] [public=bool] [short-name=string]

Add an appliance specification to the database.

arguments

appliance

The appliance name (e.g., 'compute', 'frontend', 'nas').

parameters

[compute=bool]

True means jobs can be scheduled on these types of appliances. The default is 'yes'.

[graph=string]

The directory name of the graph XML files. The default is 'default'.

[membership=string]

The full membership name of the appliance. This name will be displayed in the appliances menu by insert-ethers (e.g., 'NAS Appliance'). If not supplied, the membership name is set to the appliance name.

[node=string]

The name of the root XML node (e.g., 'compute', 'nas', 'viz-tile'). If not supplied, the node name is set to the appliance name.

[public=bool]

True means this appliance will be displayed by 'insert-ethers' in the Appliance menu. The default is 'yes'.

[short-name=string]

The basename for the short host name (e.g., 'c', 'f', 'n').

examples

# rocks add appliance nas membership="NAS Appliance" node=nas graph=default compute=no public=yes

# rocks add appliance tile membership=Tile node=viz-tile graph=default compute=yes public=yes

7.1.2. add distribution

rocks add distribution {distribution}

Add a distribution specification to the database.

arguments

distribution

Name of the new distribution.

examples

# rocks add distribution rocks-dist

Adds the distribution named "rocks-dist" into the database.

7.1.3. add host

rocks add host {host} [cpus=int] [membership=string] [rack=int] [rank=int]

Add an new host to the cluster.

arguments

host

A single host name. If the hostname is of the standard form of basename-rack-rank the default values for the membership, rack, and rank parameters are taken from the hostname.

parameters

[cpus=int]

Number of CPUs (cores) in the given host. If not provided the default of 1 CPU is inserted into the database.

[membership=string]

Appliance membership name. If not provided and the host name is of the standard form the membership is taken from the basename of the host.

[rack=int]

The number of the rack where the machine is located. The convention in Rocks is to start numbering at 0. If not provided and the host name is of the standard form the rack number is taken from the host name.

[rank=int]

The position of the machine in the rack. The convention in Rocks is to number from the bottom of the rack to the top starting at 0. If not provided and the host name is of the standard form the rank number is taken from the host name.

examples

# rocks add host compute-0-1

Adds the host "compute-0-0" to the database with 1 CPU, a membership name of "compute", a rack number of 0, and rank of 1.

# rocks add host frontend rack=0 rank=0 membership=Frontend

Adds the host "frontend" to the database whit 1 CPU, a membership name of "Frontend", a rack number of 0, and rank of 1.

related commands

add host interface

7.1.4. add host interface

rocks add host interface {host} {iface} [gateway=string] [iface=string] [ip=string] [mac=string] [module=string] [name=string] [subnet=string]

Adds an interface to a host and sets the associated values

arguments

host

Host name of machine

iface

The interface name on the host (e.g., 'eth0', 'eth1')

parameters

[gateway=string]

The gateway to assign to the interface (e.g., '192.168.1.1')

[iface=string]

Can be used in place of the iface argument.

[ip=string]

The IP address to assign to the interface (e.g., '192.168.1.254')

[mac=string]

The MAC address of the interface (e.g., '00:11:22:33:44:55')

[module=string]

The device driver name (or module) of the interface (e.g., 'e1000')

[name=string]

The name to assign to the interface

[subnet=string]

The name of the subnet to assign to the interface (e.g., 'private')

examples

# rocks add host interface compute-0-0 eth1 ip=192.168.1.2 subnet=private gateway=192.168.1.1 name=fast-0-0

# rocks add host interface compute-0-0 iface=eth1 ip=192.168.1.2 subnet=private gateway=192.168.1.1 name=fast-0-0

same as above

7.1.5. add host pxeaction

rocks add host pxeaction [host...] [action=string] [args=string] [command=string]

Add a pxeaction specification for a host.

arguments

[host]

List of hosts to add pxeaction definitions. If no hosts are listed, then the global definition for 'action=name' is added.

parameters

[action=string]

Label name for the pxeaction. You can see the pxeaction label names by executing: 'rocks list host pxeaction [host(s)]'.

[args=string]

The second line for a pxelinux definition (e.g., append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount pxe kssendmac selinux=0)

[command=string]

The first line for a pxelinux definition (e.g., 'kernel vmlinuz' or 'localboot 0').

examples

# rocks add pxeaction action=os command="localboot 0"

Add the global 'os' pxeaction

# rocks add pxeaction compute-0-0 action=memtest command="kernel memtest"

Add the 'memtest' pxeaction for compute-0-0

7.1.6. add network

rocks add network {name} {subnet} {netmask} [netmask=string] [subnet=string]

Add a network to the database. By default both the "public" and "private" networks are already defined by Rocks.

arguments

name

Name of the new network.

subnet

The IP network address for the new network.

netmask

The IP network mask for the new network.

parameters

[netmask=string]

Can be used in place of the netmask argument.

[subnet=string]

Can be used in place of the subnet argument.

examples

# rocks add network optiputer 192.168.1.0 255.255.255.0

Adds the optiputer network address of 192.168.1.0/255.255.255.0.

# rocks add network optiputer subnet=192.168.1.0 netmask=255.255.255.0

Same as above.

7.1.7. add roll

rocks add roll [roll...] [clean=bool]

Add Roll ISO images to this machine's roll directory. This command copies all files in the ISOs to a directory under /home/install/rolls.

arguments

[roll]

A list of Roll ISO images to add to /home/install/rolls. If no list is supplied, then if a roll is mounted on /mnt/cdrom, it will be copied into /home/install/rolls.

parameters

[clean=bool]

If set, then remove all files from any existing rolls of the same name, version, and architecture before copying the contents of the Rolls onto the local disk. This parameter should not be set when adding multi-CD Rolls such as the OS Roll, but should be set when adding single Roll CDs such as the Grid Roll.

examples

# rocks add roll clean=1 kernel*iso

Adds the Kernel Roll to local Roll directory. Before the Roll is added the old Kernel Roll packages are removed from the Roll directory.

# rocks add roll kernel*iso pvfs2*iso ganglia*iso

Added the Kernel, PVFS, and Ganglia Rolls to the local Roll directory.

7.1.8. add var

rocks add var {service} {component} {value} [appliance=string] [component=string] [service=string] [value=string]

Add variables to the Rocks key/value database. Variables are defined as quad of (Appliance, Service, Component, Value). Within a node XML file, values can be retrieved as <var name="Service_Component"/>.

arguments

service

Defines the service name. e.g., service=Kickstart.

component

Defines the component name. e.g. component=PublicDNS.

value

Defines the value for the variable.

parameters

[appliance=string]

If supplied, restricts to the named appliance. See 'rocks list appliance' for a listing of appliances.

[component=string]

Can be used in place of component argument.

[service=string]

Can be used in place of service argument.

[value=string]

Can be used in place of value argument.

examples

# rocks add var service=Condor component=Master value=localhost

Add the variable name <var name="Condor_Master"/> to 'localhost'.

# rocks add var Condor Master localhost

Same as above.

# rocks add var service=Condor component=Master value=localhost appliance=compute

Add the variable name <var name="Condor_Master"/> to 'localhost' and associate it with only compute appliances.