9.1. add

9.1.1. add appliance

rocks add appliance {appliance} [distribution=string] [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

[distribution=string]

The rocks distribution that this appliance will use. The distribution must be already present in the database (see rocks add distribution). Defaults to 'rocks-dist'

[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 sunos, 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

9.1.2. add appliance attr

rocks add appliance attr {appliance} {attr} {value} [attr=string] [value=string]

Adds an attribute to an appliance and sets the associated values

arguments

appliance

Name of appliance

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks add appliance attr compute sge False

Sets the sge attribution to False for compute appliances

# rocks add appliance attr compute sge attr=cpus value=2

same as above

9.1.3. add appliance route

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

Add a route for an appliance type in the cluster

arguments

appliance

The appliance name (e.g., 'compute', 'nas', etc.). This argument is required.

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

9.1.4. add attr

rocks add attr {attr} {value} [attr=string] [value=string]

Adds a global attribute for all nodes

arguments

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks add attr sge False

Adds the sge attribution and sets it to False.

related commands

list attr

remove attr

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

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

9.1.7. add firewall

rocks add firewall {category=index} [action=string] [chain=string] [network=string] [output-network=string] [protocol=string] [rulename=string] [rulesrc=string] [service=string]

Add a firewall rule to the a category in cluster.

arguments

category=index

[global,os,appliance,host]=index. Must precede all other a=b parameters Apply rule to index (member) of category. e.g. os=linux, appliance=login, or host=compute-0-0. global, global=, and global=global all refer to the global category

parameters

[action=string]

The iptables 'action' this rule should be applied to (e.g., ACCEPT, REJECT, DROP).

[chain=string]

The iptables 'chain' this rule should be applied to (e.g., INPUT, OUTPUT, FORWARD).

[network=string]

The network this rule should be applied to. This is a named network (e.g., 'private') and must be one listed by the command 'rocks list network'. To have this firewall rule apply to all networks, specify the keyword 'all'.

[output-network=string]

The output network this rule should be applied to. This is a named network (e.g., 'private') and must be one listed by the command 'rocks list network'.

[protocol=string]

The protocol associated with the rule. For example, "tcp" or "udp". To have this firewall rule apply to all protocols, specify the keyword 'all'.

[rulename=string]

User-defined name of rule. Required. Firewall rules are ordered lexicographically.

[rulesrc=string]

system or custom. Default is 'custom'. Rules defined as 'system' are not dumped with rocks dump firewall.

[service=string]

The service identifier, port number or port range. For example "www", 8080 or 0:1024. To have this firewall rule apply to all services, specify the keyword 'all'.

examples

# rocks add firewall appliance=login rulename=ACCEPT-SSH network=public service="ssh" protocol="tcp" action="ACCEPT" chain="INPUT" flags="-m state --state NEW"

Accept TCP packets for the ssh service on the public network on the INPUT chain and apply the "-m state --state NEW" flags to the rule. Apply the rule to login appliances (appliance=login) Name the rule ACCEPT-SSH If 'eth1' is associated with the public network, this will be translated as the following iptables rule: "-A INPUT -i eth1 -p tcp --dport ssh -m state --state NEW -j ACCEPT"

# rocks add firewall global rulename=ACCEPT-PRIVATE network=private service="all" protocol="all" action="ACCEPT" chain="INPUT"

Accept all protocols and all services on the private network on the INPUT chain. Apply this rule to all nodes in the cluster (global) If 'eth0' is the private network, then this will be translated as the following iptables rule: "-A INPUT -i eth0 -j ACCEPT"

# rocks add firewall host=compute-0-0 rulename=ZZDRACONIAN network="all" service="all" protocol="all" action="DROP" chain="INPUT"

DROP all non-matched packets Apply this rule to host compute-0-0 (host=compute-0-0) rule will be named ZZDRACONIAN This will drop all non-matched packets that have not been previously accepted Known as a draconian firewall rule.

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

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

9.1.10. add host attr

rocks add host attr {host} {attr} {value} [attr=string] [value=string]

Adds an attribute to a host and sets the associated values

arguments

host

Host name of machine

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks add host attr compute-0-0 cpus 2

Sets the number of cpus of compute-0-0 to 2

# rocks add host attr compute-0-0 attr=cpus value=2

same as above

9.1.11. add host bonded

rocks add host bonded {host} [channel=string] [interfaces=string] [ip=string] [name=string] [network=string]

Add a channel bonded interface for a host

arguments

host

Host name of machine

parameters

[channel=string]

The channel name (e.g., "bond0").

[interfaces=string]

The physical interfaces that will be bonded. The interfaces can be a comma-separated list (e.g., "eth0,eth1") or a space-separated list (e.g., "eth0 eth1").

[ip=string]

The IP address to assign to the bonded interface.

[name=string]

The host name associated with the bonded interface. If name is not specified, then the interface get the internal host name (e.g., compute-0-0).

[network=string]

The network to be assigned to this interface. This is a named network (e.g., 'private') and must be listable by the command 'rocks list network'.

examples

# rocks add host bonded compute-0-0 channel=bond0 interfaces=eth0,eth1 ip=10.1.255.254 network=private

Adds a bonded interface named "bond0" to compute-0-0 by bonding the physical interfaces eth0 and eth1, it assigns the IP address 10.1.255.254 to bond0 and it associates this interface to the private network.

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

9.1.13. add host key

rocks add host key {host} [description=string] [key=string]

Add a public key for a host. One use of this public key is to authenticate messages sent from remote services. Now it supports ssh-rsa public keys.

arguments

host

Host name of machine

parameters

[description=string]

A textual description of this key (default to empty string).

[key=string]

A public key. This can be the actual key or it can be a path name to a file that contains a public key (e.g., /tmp/public.key).

9.1.14. add host route

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

Add a route for a host

arguments

host

Host name of machine

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

9.1.15. add host sec_attr

rocks add host sec_attr {host} [attr=string] [crypted=boolean] [enc=string] [value=string]

Add a secure attribute to the database. The user also has the option of not supplying the value on the command line. The command will prompt the user to enter the secure attribute value, and will not echo this value on screen. If the user chooses to enter the value for the secure attribute by prompt, then the value entered must be in an unencrypted form.

arguments

host

Host name of machine

parameters

[attr=string]

Name of the attribute

[crypted=boolean]

Is "value" already crypted or not

[enc=string]

Encryption scheme to use to crypt the value. Currently supported values are "sha", "crypt", "portable".

[value=string]

Value of the attribute. If this is a file name, then read value file

examples

# rocks add host sec_attr compute-0-0 attr=db_pw value=DatabasePassword crypted=false enc=sha

Sets a secure attribute called db_pw to the crypted value of "DatabasePassword" using the sha1 encoding schema.

# rocks add host sec_attr compute-0-0 attr=db_pw value=77e6674e6d71f898d5fc79424117c86731ca7498 crypted=true

Same as above

9.1.16. add network

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

[dnszone=string]

The Domain name or the DNS Zone name to use for all hosts of this particular subnet. Default is set to the name of the subnet

[mtu=string]

The MTU for the new network. Default is 1500.

[netmask=string]

Can be used in place of the netmask argument.

[servedns=boolean]

Parameter to decide whether this zone will be served by the nameserver on the frontend.

[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 dnszone="optiputer.net" servedns=true

Same as above, but set the MTU to 9000.

9.1.17. add os attr

rocks add os attr {os} {attr} {value} [attr=string] [value=string]

Adds an attribute to an os and sets the associated values

arguments

os

Name of os

attr

Name of the attribute

value

Value of the attribute

parameters

[attr=string]

same as attr argument

[value=string]

same as value argument

examples

# rocks add os attr linux sge False

Sets the sge attribution to False for linux nodes

9.1.18. add os route

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

Add a route for an OS type

arguments

os

The OS type (e.g., 'linux', 'sunos', etc.). This argument is required.

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

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

9.1.20. add route

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

Add a route for all hosts in the cluster

arguments

address

Host or network address

gateway

Network (e.g., IP address), subnet name (e.g., 'private', 'public'), or a device gateway (e.g., 'eth0').

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

9.1.21. add sec_attr

rocks add sec_attr {attr} [crypted=boolean] [enc=string] [value=string]

Add a secure attribute to the database. The user also has the option of not supplying the value on the command line. The command will prompt the user to enter the secure attribute value, and will not echo this value on screen. If the user chooses to enter the value for the secure attribute by prompt, then the value entered must be in an unencrypted form.

arguments

attr

Name of the attribute

parameters

[crypted=boolean]

Is "value" already crypted or not

[enc=string]

Encryption scheme to use to crypt the value. Currently supported values are "sha", "crypt", "portable".

[value=string]

Value of the attribute. If this is a file name, then value is read from the file

examples

# rocks add sec_attr db_pw value=DatabasePassword crypted=false enc=sha

Sets a secure attribute called db_pw to the crypted value of "DatabasePassword" using the sha1 encoding schema.

# rocks add sec_attr db_pw value=77e6674e6d71f898d5fc79424117c86731ca7498 crypted=true

Same as above