The following document contains information about the CI/CD system, including software versions, update instructions, and other information.
Server setup
- Server Operating System: Red Hat Enterprise Linux (RHEL), as of Oct. 6, 2018 was licensed
- Server architecture: x86_64 (same as amd64)
- Server Hostname:
microcart.ece.iastate.edu
note can only be ssh'd into when on the campus network, or using the ISU VPN - Server users:
-
vm-user
used for maintenance and manual login -
gitlab-runner
user that executes all of the automated CI/CD commands -
ci-user
use unknown -
ucart
use unknown -
xilinx
use unknown
-
- User passwords
-
vm-user
's password is stored in the hidden CI/CD variables (These are only visible to administrators of the GitLab project). The SSH credentials can be found under settings > CI/CD > Variables > Reveal values.
-
Current Software Versions
Software | Version | Version Check Command |
---|---|---|
Red Hat Enterprise Linux (RHEL) | 7.6 | cat /etc/redhat-release |
Linux Kernel | 3.10.0 | uname -r |
Docker Client | 20.10.12 | sudo docker version |
Docker Server | 20.10.12 | sudo docker version |
Docker containerd | 1.4.12 | sudo docker version |
Git | 1.8.3.1 | git --version |
GitLab Runner | 14.5.0 | sudo gitlab-runner --version |
Bitcraze Builder Docker Image | (latest) | docker pull bitcraze/builder:latest |
Cleanup
By default, docker doesn't clean up old images that are used to build the firmware and can easily fill up the storage space on the server. To manage this, a script is run periodically to prune old images. This script is stored at /etc/cron.daily/docker-prune
and is executed automatically every day by the corn daemon. The script logs all its output to /var/lib/docker/prune.log
#!/bin/bash
log=/var/lib/docker/prune.log
date +'=== %Y.%m.%d %H:%M ===' >> $log
#remove all dangling docker images that are older than 15 days
docker system prune -f --filter "until=$((15*24))h" >> $log
Software Update Notes
Docker
Docker does not support RHEL on the x86_64 architecture. It does however support CentOS on x86_64 arch. Because CentOS is a derivative to RHEL we can install the CentOS version instead.
- see https://docs.docker.com/engine/install/centos/ for additional details on installation
- To update docker, it should be as simple as running
sudo yum update docker-ce
- The repository to pull the CentOS version has already been setup, more details here
- A manual update can be preformed by uninstalling the current version and installing a newer version, more details here
GitLab Runner
Official update documentation can be found here https://docs.gitlab.com/runner/install/linux-manually.html#update
- Download latest version, for the
amd64
architecture
# Replace ${arch} with any of the supported architectures, e.g. amd64, arm, arm64
# A full list of architectures can be found here https://gitlab-runner-downloads.s3.amazonaws.com/latest/index.html
curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_${arch}.rpm"
- Update with the downloaded package
rpm -Uvh gitlab-runner_<arch>.rpm
Bitcraze Builder Docker Image
The latest builder image should be automatically pulled from docker hub every time the CI/CD job is triggered (if the local version is older). However the latest image can be pulled manually with the following command
docker pull bitcraze/builder:latest