Set up OpenStack on a Raspberry Pi cluster

Since Arm processors are "first-class citizens" in OpenStack, and Raspberry Pis are built on Arm, why not combine them?
103 readers like this.
Raspberries with pi symbol overlay

Dwight Sipler on Flickr

In the year since the Raspberry Pi 4 was released, I've seen many tutorials (like this and this) and articles on how well the 4GB model works with container platforms such as Kubernetes (K8s), Lightweight Kubernetes (K3s), and Docker Swarm. As I was doing research, I read that Arm processors are "first-class citizens" in OpenStack. Since Raspberry Pi is built on Arm, I decided to test this theory by installing OpenStack on a Raspberry Pi cluster.

Prerequisites

There are a few things I need to consider for this project:

  1. Whether to use Ubuntu 64-bit or CentOS 64-bit for Raspberry Pi to boot headless; Raspberry Pi OS will not suffice, even as a Debian derivative, because there are no OpenStack packages for it.
  2. I need the latest version of OpenStack that will run in my distribution because I don't think the latest versions have an AArch64 image.
  3. I doubt that there is any documentation for automating a ground-up installation, so I will use a step-by-step process.

Materials used:

  1. Four Raspberry Pi 4Bs, 4GB model (8GB recommended)
  2. Four 32GB MicroSD cards
  3. Four Raspberry Pi cases with fans and heatsinks (very important)
  4. Four Raspberry Official Power supply

Configure the base operating system

I used the CentOS AArch64 image; as I suspected, there is not a CentOS 8 image available for Raspberry Pi, so I used CentOS 7 AArch64 with this prebuilt image. It didn't work when I tried installing it with dd, but it worked like a charm when I used balenaEtcher.

After burning the images on the SD cards, I plugged the Raspberry Pis into my router to check their IP addresses so I could remotely access them using SSH. I configured their WiFi and hostnames using nmtui to access them without any cables attached (except for their power source, of course). The default user is root, and the default password is centos.

I updated the operating system:

[root@rpi4b4-0 ~]# yum update -y

I repeated this process on all my Raspberry Pis then rebooted them.

Install OpenStack

The latest OpenStack releases (Ussuri and Victoria) require CentOS 8, so I used Train, as it's the most recent version that uses CentOS 7.

I used the OpenStack Foundation's installation steps, but I encountered some issues with it. To make it easier for others to install OpenStack on CentOS 7, I compiled the following links and tips.

Prerequisites

  1. Network Time Protocol (NTP)
    1. Controller node installation
    2. Compute node installation
    3. Verify operation
  2. OpenStack packages: Run the Train version of the installation (this link includes all versions)
  3. SQL database: Controller node installation
  4. Message queue: Controller node installation
  5. Memcached: Controller node installation
  6. Etcd: Controller node installation

OpenStack services

  1. Identity service (Keystone)
    1. Controller node installation
    2. Verify operation

  2. Imaging service (Glance)
    1. Controller node installation
    2. Verify operation

      TIP: Instead of downloading the CirrOS image mentioned in the documents, make sure to use the AArch64 CirrOS image for Raspberry Pis.
  3. Placement service (Placement)
    1. Controller node installation
    2. Verify operation

  4. Compute service (Nova)
    1. Controller node installation
    2. Compute node installation
    3. Verify operation

      TIP: In the last part of the verify operation, nova-status upgrade check fails due to a packaging error. To fix it, edit the following file in the controller:
      [root@rpi4b4-0 ~]# vim /etc/httpd/conf.d/00-placement-api.conf
      (…)
      <Directory /usr/bin>
         <IfVersion >= 2.4>
            Require all granted
         </IfVersion>
         <IfVersion < 2.4>
            Order allow,deny
            Allow from all
         </IfVersion>
      </Directory>

      If you run nova-status upgrade check now, it will work.

  1. Networking service (Neutron)
    1. Controller node installation
    2. Controller for Option 2: Self-service network installation

      To enable the br_netfiler module:
      [root@rpi4b4-0 ~]# modprobe br_netfilter
      [root@rpi4b4-0 ~]# echo "br_netfilter" > /etc/modules-load.d/br_netfilter.conf
      [root@rpi4b4-0 ~]# lsmod|grep br_netfilter
    3. Compute node installation
    4. Compute for Option 2: Self-service network installation

      To enable the br_netfiler module:
      [root@rpi4b4-X ~]# modprobe br_netfilter
      [root@rpi4b4-X ~]# echo "br_netfilter" > /etc/modules-load.d/br_netfilter.conf
      [root@rpi4b4-X ~]# lsmod|grep br_netfilter
    5. Verify operation
    6. Verify operation for Option 2: Self-service network installation

  2. Dashboarding service (Horizon)
    1. Controller node installation

      TIP: Upon restarting the httpd service, you will get a 404 error. To resolve it, add this line to the end of the /etc/openstack-dashboard/local_settings:
      WEBROOT = '/dashboard'

      Then restart httpd as usual:

      [root@rpi4b4-X ~]# systemctl restart httpd.service
    2. Verify operation

How well does it work?

This was a fun and successful experiment. In terms of performance, it's quite slow considering that my controller only has four cores and 4GB RAM, but it's useful for managing multiple computers in one dashboard. My next step will be to try this with a TripleO deployment and a Ceph storage cluster to enable live migration. I might try using the Raspberry Pi's Ethernet if I have a larger cluster and workload in mind; for now, Grafana is working fine for internet monitoring.

What to read next
AJ Canlas
AJ Canlas is a Sr. Solutions Consulting Manager in Micro-D International based in the Philippines, He handles both Public and Private Cloud Infrastructure and Initiatives, His Main Strengths is in Linux, OpenStack, Ansible Automation, and Containerization.

Comments are closed.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.