Skip to main content

BeetleboxCI Enterprise Installation on WSL2

While BeetleboxCI is built to run on Linux, it is possible to run it in Windows using Windows Subsystem for Linux (WSL2) to experiment with its functionality. WSL2 is a lightweight VM that allows Linux applications to run on Windows. Please note that BeetleboxCI is only compatible with WSL2, not, WSL1.

Mininum requirements for installing BeetleboxCI Enterprise:

  • 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

This guide describes the process of installing the enterprise version of BeetleboxCI on WSL2 for experimentation purposes.

Services

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)

beetleboxci-db - Stores information about users, jobs etc.

beetleboxci-redis-server - Manages the queue of jobs to be run.

beetleboxci-redis-worker-main - Orchestrates user defined jobs.

beetleboxci-redis-worker-poll - Monitors pipelines for changes.

beetleboxci-redis-scheduler - Handles cron jobs.

beetleboxci-nginx - Proxy that handles web server requests.

beetleboxci-web - Backend web server.

metrics-server - Monitors performance of user-defined jobs.

registry - Docker registry for storing custom container images.

Ports

The application exposes a number of ports:

53 - TCP/UDP - Kubernetes DNS server

179 - TCP - Calico CNI

443 - TCP - Metrics server

2049 - TCP - Network File System

2379 - TCP - etcd API

2380 - TCP - etcd internal communication

5000 - TCP - Docker registry

5432 - TCP - PostgreSQL

6443 - TCP - Kubernetes API server

6379 - TCP - Redis

10250 - TCP - Kubelet API

10251 - TCP - Kube-scheduler API

10252 - TCP - Kube-controller-manager API

32767 - TCP - Web app traffic

Installing BeetleboxCI

You can download the latest version of the installer here: BeetleboxCI Enterprise.

  1. Run Windows Powershell as an administrator.

  2. Ensure that WSL Ubuntu is not currently installed by running the following commands. You may need to check the Windows settings too and uninstall from the Apps and features list.

    wsl --shutdown
    wsl --unregister Ubuntu
  3. Run the following commands to ensure that the latest version of WSL is installed and that WSL2 is set as the default version for creating Linux instances.

    wsl --update
    wsl --set-default-version 2
  4. Run the following commands to install Ubuntu on WSL2. This installs Ubuntu by default. For other operating systems, the name of the operating system must be explicitly specified. You will be prompted to create an Ubuntu user account.

    wsl --install 
  5. Test that networking and DNS are working correctly. If any errors are shown here, the networking is not working correctly and it will need to be resolved before proceeding.

    ping www.google.com
  6. Edit the wsl.conf file:

    sudo nano /etc/wsl.conf

    Add the following information. The hostname will be the same as your Windows machine, though if the hostname of your Windows machine has uppercase characters, you will need to change them to lowercase here.

    [network]
    hostname = lower-case-hostname
    generateHosts = false
  7. Exit the WSL2 instance using the following command:

    exit
  8. Shutdown and start the instance:

    wsl --shutdown
    wsl
  9. Install OpenSSH Server on the WSL2 instance, if it is not already present, as it will allow SSH access when needed later on:

    sudo apt-get install openssh-server -y 
  10. Copy the BeetleboxCI installer over to the WSL2 instance. If your distribution is called Ubuntu, then you can access the root of the WSL2 filesystem on the Windows file browser through \\wsl$\Ubuntu. We recommend placing the installer in \\wsl$\Ubuntu\home[username]. You can then proceed to install the BeetleboxCI application, though there are a few different steps compared to directly installing on Linux. To find out of the IP of the WSL2 instance, run:

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

    tar -xzvf BeetleboxCIv*.tar.gz
    cd dist/
    tar -xzvf BeetleboxCIv*.tar.gz # Extract the tarball inside this one too
    cd BeetleboxCIv*
  12. Run the 00_init_control_node.sh script. This script installs the Kubernetes software and sets up a Kubernetes cluster on your machine. You will be prompted for the path of the parameter file, and we recommend using 003_params_wsl2.sh in the BeetleboxCIv* folder.

    ./00_init_control_node.sh
  13. Now exit WSL, shutdown the WSL2 VM and start it again:

    exit
    wsl --shutdown
    wsl
  14. Run the following command to give permissions to Kubernetes to mount the WSL2 filesystem.

    sudo mount --make-shared /
  1. Run the 10_install_nfs.sh script. This installs the software needed for a network file system to run on the machine.

    ./10_install_nfs.sh
  2. Run the 11_create_nfs.sh script. You will be prompted to enter the path of the parameter file again. This sets up a network file system on your machine to allow communication between containers in BeetleboxCI.

    ./11_create_nfs.sh
  3. Run the 40_create_certs.sh script. You will be prompted to enter the path of the parameter file. This creates the SSL certificates needed to set up the local container registry.

    ./40_create_certs.sh
  4. 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
  5. Run the 41_create_registry.sh script. You will be prompted to enter the path of the parameter file.

    ./41_create_registry.sh
  6. Run the 60_install_app.sh script. You will be prompted to enter the path of the parameter file. This builds and starts the BeetleboxCI application on the Kubernetes cluster. During the installation, the parameter file will be copied to the Beetlebox install path (default: /mnt/beetleboxci)

    ./60_install_app.sh
  7. To access the application within the (virtual) machine where you installed BeetleboxCI, open a web browser and navigate to http://[WSL_IP_ADDRESS]:32767.

  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.