Skip to main content

Server Installation

BeetleboxCI server is an on-premises CI solution for customers who have large scale computational needs for their CI applications. BeetleboxCI is capable on running on bare metal or on a virtual machine, it operates on an on-premises Kubernetes cluster.

Mininum requirements for installing BeetleboxCI::

  • An x64/x86_64/AMD64/Intel 64 system
  • At least 4 CPUs
  • At least 16GB RAM

Recommended:

  • An x64/x86_64/AMD64/Intel 64 system
  • At least 12 CPUs
  • At least 32GB RAM

Introduction

BeetleboxCI exposes a number of services:

Frontend web application accessed through a browser. (Port 32767)

A local container registry to store images to run jobs. (Port 5000)

An NFS server to allow other nodes to access shared files (Port 2049)

The application exposes a number of ports:

32767 - TCP - Web app traffic

443 - TCP - Metrics server

5432 - TCP - Postgresql

6379 - TCP - Redis

179 - TCP - Calico CNI

2049 - TCP - NFS

BeetleboxCI uses kubernetes to schedule user-defined jobs

Services

beetleboxci-db beetleboxci-redis-server beetleboxci-redis-worker beetleboxci-redis-scheduler - handles cron jobs beetleboxci-nginx beetleboxci-web metrics-server registry

Platform

BeetleboxCI is designed to be deployed onto an on-premises Kubernetes cluster. It may work on self-managed cloud instances too, but it has not been extensively tested for this purpose.

Scripted Installation

BeetleboxCI provides a set of scripts through which you can install the application on a server from scratch if your server is running Ubuntu Server 22.04.1. These scripts set up kubernetes for you as well as installing BeetleboxCI using a helm chart.

It is likely that many server setups will require manual installation.

You can download the latest version of the server installer from https://userportal.beetleboxci.com/download/latest.

Installing BeetleboxCI

  1. Extract the tarball using a terminal and enter the folder that gets extracted:

    tar -xzvf BeetleboxCIv*.tar.gz
    cd BeetleboxCIv*
  2. Run the init_node.sh script. This script installs the Kubernetes software and sets up a single-node cluster on your machine. This node is known as the control plane of the cluster.

    ./init_node.sh
  3. Once the script has finished, we must check to ensure that any swap files present on the machine are permanently disabled. The following command can be used to check:

    sudo nano /etc/fstab 

    You may see one or more lines mentioning swap, that looks something like this:

    #/swap.img       none    swap    sw      0       0

    The '#' in front of the line shows that the line has been commented out and that the swap file has been disabled. If the line has NOT been commented out, it is necessary to manually comment it out to disable swap space. Once you comment out the line, press Ctrl+X to exit. When prompted, press Y followed by Enter to save the file.

  4. Now you can restart your machine. Restarting is required for the containerisation backend to function correctly, otherwise the second script will fail.

  5. Open a terminal and run install_ci.sh. This script downloads the necessary images for BeetleboxCI and deploys the BeetleboxCI on the newly created Kubernetes cluster.

    cd BeetleboxCIv*
    ./install_ci.sh
  6. Once the script has finished running, run the following command to check that all the modules are running correctly — they may take a few minutes to stabilise, so you may need to run this command again:

    kubectl get po --all-namespaces
  7. To access the application within the (virtual) machine where you installed BeetleboxCI, open a web browser and navigate to http://127.0.0.1:32767. If you need to access the BeetleboxCI web application from another machine (on the same local network) other than the control plane node, then you will need to replace 127.0.0.1 with the IP address or hostname of the control plane node.

  8. If you are accessing the app for the first time, you will be prompted to create a superuser account. You can log in once you create the superuser account.

Upgrading BeetleboxCI

The tarball contains a script (upgrade_ci.sh) that need to be run in order to upgrade the software, and the steps to upgrade are below:

  1. Extract the tarball using a terminal and enter the folder that gets extracted:

    tar -xzvf BeetleboxCIv*.tar.gz
    cd BeetleboxCIv*
  2. Run the upgrade_ci.sh script. This script installs the latest version of the BeetleboxCI software.

    ./upgrade_ci.sh
  3. Run the following command to check that all the modules are running correctly — they may take a few minutes to stabilise, so you may need to run this command again:

    kubectl get po --all-namespaces
  4. You are now ready to use the latest version of BeetleboxCI.

Manual Installation

In some cases, you may already have a server with Kubernetes installed on it, and in other cases, the exact dependencies required by the automated scripts may not be available.

Create Kubernetes Cluster

For the time being, BeetleboxCI has been tested exclusively on single-node Kubernetes clusters and it is mandatory for worker nodes to exist on the cluster.

BeetleboxCI currently supports Kubernetes 1.24.

Install BeetleboxCI packages using Helm

Once you have Kubernetes up and running, you can deploy BeetleboxCI onto the cluster.