How do I manually install clusterctrl?

If you're using one of the provided ClusterCTRL images the cluserctrl tool will already be installed but those using the ClusterCTRL Stack or only want to manage power for a ClusterHAT for example may want to install it manually.

To install the tool manually you can normally run through the following steps as the root user (you can usually switch to the root user by using "sudo -i").

TMPINSTALL=/tmp/clusterhat
apt update
apt install git libusb-1.0-0-dev python3-usb python3-libusb1 python3-smbus python-is-python3 # When using Python3
# apt install git libusb-1.0-0-dev python-usb python-libusb1 python-smbus # When using older installs with Python2
git clone https://github.com/burtyb/clusterhat-image.git $TMPINSTALL
mkdir /usr/share/clusterctrl/
cp $TMPINSTALL/files/usr/sbin/cluster* /usr/sbin/
cp $TMPINSTALL/files/usr/share/clusterctrl/default-clusterctrl /etc/default/clusterctrl
cp $TMPINSTALL/files/etc/udev/rules.d/90-clusterctrl.rules /etc/udev/rules.d/
cp $TMPINSTALL/files/usr/lib/systemd/system/clusterctrl-init.service /usr/lib/systemd/system/
cp -r $TMPINSTALL/files/usr/share/clusterctrl/python/ /usr/share/clusterctrl/
echo 'TYPE=c' >> /etc/default/clusterctrl
udevadm control --reload-rules
systemctl enable clusterctrl-init
raspi-config nonint do_i2c 0 # Enable I2C
rm -rf $TMPINSTALL

If you see an error on any of these stages please create a new thread on the support forum or open a support ticket with details of the distribution you're using and the issue you're having.

Now disconnect and reconnect the USB cable (if using a ClusterCTRL device) and then check it's found the device.

clusterctrl status

This should then find and show the status of either a ClusterHAT and/or any ClusterCTRL devices you have connected.

You can comment on this FAQ