8.1. add

8.1.1. add appliance

rocks add appliance {appliance} [graph=string] [membership=string] [node=string] [os=string] [public=bool]

Add an appliance specification to the database.

arguments

appliance

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

parameters

[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.

[os=string]

The OS that the appliance type can support. Some appliances can support both linux and solaris, where as others can support only one of the two. Acceptable values are 'linux' or 'sunos'. Defaults to 'linux'

[public=bool]

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

examples

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

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

8.1.2. add appliance route

rocks add appliance route {address} {gateway} [netmask=string]

Add a route for all machine in the cluster

arguments

address

Host or network address

gateway

Network or device gateway

parameters

[netmask=string]

Specifies the netmask for a network route. For a host route this is not required and assumed to be 255.255.255.255

8.1.3. add bootaction

rocks add bootaction [action=string] [args=string] [kernel=string] [ramdisk=string]

Add a bootaction specification to the system.

parameters

[action=string]

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

[args=string]

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

[kernel=string]

The name of the kernel that is associated with this boot action.

[ramdisk=string]

The name of the ramdisk that is associated with this boot action.

examples

# rocks add bootaction action=os kernel="localboot 0"

Add the 'os' bootaction.

# rocks add bootaction action=memtest command="memtest"

Add the 'memtest' bootaction.

8.1.4. 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.

8.1.5. add host

rocks add host {host} [cpus=int] [membership=string] [os=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.

[os=string]

The operating system name. The default is: linux.

[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 with 1 CPU, a membership name of "Frontend", a rack number of 0, and rank of 1.

related commands

add host interface

8.1.6. add host alias

rocks add host alias {host} {name} [name=string]

Adds an alias to a host

arguments

host

Host name of machine

name

The alias name for the host.

parameters

[name=string]

Can be used in place of the name argument.

examples

# rocks add host alias compute-0-0 c-0-0

Adds the alias 'c-0-0' to the host 'compute-0-0'.

# rocks add host alias compute-0-0 name=c-0-0

Same as above.

8.1.7. add host interface

rocks add host interface {host} {iface} [iface=string] [ip=string] [mac=string] [module=string] [name=string] [subnet=string] [vlan=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

[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')

[vlan=string]

The VLAN ID to assign the interface

examples

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

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

same as above

8.1.8. add host route

rocks add host route {address} {gateway} [netmask=string]

Add a route for all machine in the cluster

arguments

address

Host or network address

gateway

Network or device gateway

parameters

[netmask=string]

Specifies the netmask for a network route. For a host route this is not required and assumed to be 255.255.255.255

8.1.9. add network

rocks add network {name} {subnet} {netmask} [mtu=string] [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

[mtu=string]

The MTU for the new network. Default is 1500.

[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 mtu=9000

Same as above, but set the MTU to 9000.

8.1.10. add os route

rocks add os route {address} {gateway} [netmask=string]

Add a route for all machine in the cluster

arguments

address

Host or network address

gateway

Network or device gateway

parameters

[netmask=string]

Specifies the netmask for a network route. For a host route this is not required and assumed to be 255.255.255.255

8.1.11. 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 /export/rocks/install/rolls.

arguments

[roll]

A list of Roll ISO images to add to /export/rocks/install/rolls. If no list is supplied, then if a roll is mounted on /mnt/cdrom, it will be copied into /export/rocks/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.

8.1.12. add route

rocks add route {address} {gateway} [netmask=string]

Add a route for all machine in the cluster

arguments

address

Host or network address

gateway

Network or device gateway

parameters

[netmask=string]

Specifies the netmask for a network route. For a host route this is not required and assumed to be 255.255.255.255

8.1.13. 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.