Viridis Commands

From CDOT Wiki
Jump to: navigation, search

This page summarizes commonly-used commands for our Calxeda / Boston Limited Viridis server.

Controlling Host

The computer controlling the Viridis system is Iraq, which is a dual-homed host: it has a connection to Seneca's network as well as a separate connection to a private LAN which houses the Viridis and RaspberryPi (AC power control) systems. All connections to the Viridis, including SSH, SOL, and IPMI connections, must be initiated from Iraq.

Iraq also supplies DHCP data to the Viridis system, handles DNS queries, and NATs communication with the outside world.

AC Power Control

AC to the Viridis chassis is controlled by a the PDUs in the EHL cabinet #1. Be sure to shut down the individual nodes before removing power, and remember to remove power from each of the redundant power supplies (via the left and right PDUs).

IP Addresses of Nodes

The Viridis nodes each have three IP addresses, configured via DHCP from Iraq. The first two interfaces are used by the application processor (Linux) on each node, and the third interface is used by the Energy Core Management Engine (ECME). These are recorded in the /etc/hosts file on Iraq as:

  • senecaX - first interface (Linux)
  • senecaXa - second interface (Linux)
  • senecaXb - third interface (ECME)

X currently ranges from 0 to 11.

ipmitool

The ipmitool program is used to send IPMI commands to a single host. This is a standard tool, but Calxeda-specific patches are required for some functionality. As of 2013-09-17 the Calxeda-modified version in review for inclusion in a successive version of Fedora (BZ 918296).

Common options:

-U user # IPMI username
-P pass # IPMI password
-H host # ECME hostname or IP address
-I lanplus # use the lanplus (encrypted) interface - Required for some commands (e.g., 'sol')

cxmanage

The cxmanage script allows multiple nodes to be controlled with a single command. Basically, it's a smart wrapper around ipmitool. This is a Calxeda-specific tool; as of 2013-09-17 it is in package review in Fedora (BZ 919592).

Common options:

-u user # IPMI username
-p pass # IPMI password
-a # process command for all nodes on the fabric

The last argument to cxmanage is the hostname or IP address of a ECME. If the -a option is not given, then only the specified node is affected by the cxmanage command; if -a is given, all nodes on the fabric are affected.

Serial-over-LAN (SOL)

Serial-over-LAN capability (SOL) is the equivalent of accessing serial output from a development board such as a PandaBoard, Rapsberry Pi, or TrimSlice. It is used to control pre-boot software (uBoot) and to view boot messages as well as Anaconda installer messages. It is also possible to login through this connection (though SSH is recommended/preferred).

To activate a SOL session:

sudo ipmitool -I lanplus -H host -U user -P pass sol activate

You can exit from the session by typing "~." -- note that if you're connected to Iraq via SSH, this will actually disconnect your SSH session instead, so use "~~." to disconnect the SOL session.

If another user/terminal has a SOL session active and you want to connect to the same node, deactivate the existing SOL session:

sudo ipmitool -I lanplus -H host -U user -P pass sol deactivate
Idea.png
Root access is only required for lanplus connections
Use a non-root account for all non-lanplus connections.

Node Power Control

To control power for one node with ipmitool:

ipmitool -H senecaXb -U user -P pass chassis power status # check status
ipmitool -H senecaXb -U user -P pass chassis power on     # turn on
ipmitool -H senecaXb -U user -P pass chassis power off    # turn off
ipmitool -H senecaXb -U user -P pass chassis power reset  # reset application processor

To control power for one node with cxmanage:

cxmanage -u user -p pass power status senecaXb # check status
cxmanage -u user -p pass power on     senecaXb # turn on
cxmanage -u user -p pass power off    senecaXb # turn off
cxmanage -u user -p pass power reset  senecaXb # check status

To control power for all nodes with cxmanage:

cxmanage -u user -p pass -a power status senecaXb # check status
cxmanage -u user -p pass -a power on     senecaXb # turn on
cxmanage -u user -p pass -a power off    senecaXb # turn off
cxmanage -u user -p pass -a power reset  senecaXb # check status

Node Information

You can get information about each node using the cxmanage command:

cxmanage -u user -p pass request senecaXb -a

Where request is one of:

  • info - display hardware, firmare, ECME, A9boot, Uboot, DTB, and other version numbers
  • macaddrs - display mac addresses
  • ipinfo - display ECME IP addresses
  • sensor - display node temperatures, voltages, and currents

Node Boot Source

The default boot source is "disk". It can be set to pxe or disk using ipmitool:

ipmitool -H senecaXb -U user -P pass chassis bootdev pxe  # configure PXE for next boot
ipmitool -H senecaXb -U user -P pass chassis bootdev disk # configure disk for next boot

Installation

Idea.png
SELinux and httpd
The kickstart file(s) do not have the correct context for being served by httpd -- fix this or put SELinux in permissive mode to temporarily work around this issue (2013-09-20).

To install a node:

  1. (Optional) Activate a SOL session so you can observe the installation.
  2. Specify a PXE boot for the node.
  3. Power the node ON.

The node will start a PXE/kickstart installation using the parameters in the Iraq dhcpd and pxeboot configuration files.

To change the installation parameters, edit the /var/lib/tftpboot/pxelinux.cfg/default file on Iraq, or create a file specifically for a particular MAC address. These are the current (2013-09-17) parameters:

menu title F18 HighBank Boot Options

default Highbank-Install
prompt 1
timeout 100

label Highbank-Install
    kernel f18-highbank/vmlinuz-highbank
    initrd f18-highbank/initrd-highbank.img
    append console=ttyAMA0 ip=eth0:dhcp ks=http://192.168.1.254/f18-highbank/F18-highbank.ks rd.shell

Note that you can list multiple installations in here for interactive selection (via SOL).

The current (2013-09-17) kickstart file looks like this:

# Perform a basic Fedora 18 ARM Hard-FP install for
#   Calxeda EnergyCore ECX-1000 - HighBank

lang en_US.UTF-8
keyboard us
timezone --utc US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled --service=mdns,ssh
network --bootproto=dhcp --device=eth0 --onboot=on --activate --hostname=localhost.localdomain
services --enabled=NetworkManager,sshd,chronyd --disabled=network

# Only use this with Anaconda for serial console installs, not with livemedia-creator.
#cmdline
text

# no GUI on this one
skipx

# Set a default root password for Fedora
rootpw --plaintext fedora

# Repositories
# apparently we must use 'url' for the install repo for livemedia-creator
url --url="http://dl.fedoraproject.org/pub/fedora-secondary/releases/18/Fedora/armhfp/os/"
repo --name=fedora --baseurl="http://dl.fedoraproject.org/pub/fedora-secondary/releases/18/Everything/armhfp/os/"

#
# Define how large you want your rootfs to be
#
bootloader --location=partition
zerombr
clearpart --all
part /boot --size 500 --fstype ext3 --label=boot
part swap --size 4000 --label=swap
part / --size 2000 --fstype ext4 --label=rootfs --grow

# Reboot after the installation is complete.
reboot


#
# Add all the packages after the base packages
#
%packages
@standard

# apparently none of the groups sets the clock.
chrony

# and ifconfig would be nice.
net-tools

%end

# more configuration
%post --erroronfail

# Install U-Boot boot.scr
pushd /boot

# get the root device from fstab, typically UUID=<string>
ROOTDEV=`grep -w / /etc/fstab | cut -d ' ' -f1`

# setup boot.scr
cat <<EOL > boot.cmd
setenv bootargs console=ttyAMA0 root=$ROOTDEV ro rootwait
ext2load scsi 0:1 \${ramdisk_addr_r} uInitrd
ext2load scsi 0:1 \${kernel_addr_r} uImage
bootm \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr}
EOL

/usr/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "HighBank F18" -d boot.cmd boot.scr

popd

%end

Firmware Update

To update the firmware, download the appropriate firmware package from Calxeda, and issue this cxmanage command:

cxmanage -a fwupdate package ECX-1000_update-production-VERSION.tar.gz seneca0b

Additional Commands and Options

There are additional ipmitool and cxmanage commands.

Refer to the appropriate documentation:

  • manpage for ipmitool
  • manpage for cxmanage
  • The Boston Limited and Calxeda wikis