The nova.virt.baremetal.tilera Module

Tilera back-end for bare-metal compute node provisioning

The details of this implementation are specific to ISI’s testbed. This code is provided here as an example of how to implement a backend.

class BareMetalNodes(file_name='/tftpboot/tilera_boards')

Bases: object

This manages node information and implements singleton.

BareMetalNodes class handles machine architectures of interest to technical computing users have either poor or non-existent support for virtualization.

activate_node(node_id, node_ip, name, mac_address, ip_address, user_data)

Activates the given node using ID, IP, and MAC address.

check_activated(node_id, node_ip)

Checks whether the given node is activated or not.

deactivate_node(node_id)

Deactivates the given node by turnning it off.

/tftpboot/fs_x directory is a NFS of node#x and /tftpboot/root_x file is an file system image of node#x.

free_node(node_id)

Sets/frees status of the given node as 0 (IDLE).

get_console_output(console_log, node_id)

Gets console output of the given node.

get_hw_info(field)

Returns hardware information of bare-metal node by the given field.

Given field can be vcpus, memory_mb, local_gb, memory_mb_used, local_gb_used, hypervisor_type, hypervisor_version, and cpu_info.

get_idle_node()

Gets an idle node, sets the status as 1 (RUNNING) and Returns node ID.

get_image(bp)

Gets the bare-metal file system image into the instance path.

Noting to do for tilera nodes: actual image is used.

get_ip_by_id(id)

Returns default IP address of the given node.

get_status()

Gets status of the given node.

iptables_set(node_ip, user_data)

Sets security setting (iptables:port) if needed.

iptables -A INPUT -p tcp ! -s $IP –dport $PORT -j DROP /tftpboot/iptables_rule script sets iptables rule on the given node.

network_set(node_ip, mac_address, ip_address)

Sets network configuration based on the given ip and mac address.

User can access the bare-metal node using ssh.

power_mgr(node_id, mode)

Changes power state of the given node.

According to the mode (1-ON, 2-OFF, 3-REBOOT), power state can be changed. /tftpboot/pdu_mgr script handles power management of PDU (Power Distribution Unit).

set_image(bpath, node_id)

Sets the PXE bare-metal file system from the instance path.

This should be done after ssh key is injected. /tftpboot/fs_x directory is a NFS of node#x. /tftpboot/root_x file is an file system image of node#x.

set_status(node_id, status)

Sets status of the given node by the given status.

Returns 1 if the node is in the nodes list.

sleep_mgr(time_in_seconds)

Sleeps until the node is activated.

ssh_set(node_ip)

Sets and Runs sshd in the node.

vmlinux_set(node_id, mode)

Sets kernel into default path (/tftpboot) if needed.

From basepath to /tftpboot, kernel is set based on the given mode such as 0-NoSet, 1-SetVmlinux, or 9-RemoveVmlinux.

get_baremetal_nodes()

Previous topic

The nova.virt.baremetal.nodes Module

Next topic

The nova.virt.configdrive Module

This Page