Raspberry Pi Cluster
Flash OS
- Set the
Disable eMMC BootJumper on the Raspberry Pi - Mount the eMMC storage on another linux PC
sudo apt install git libusb-1.0-0-dev pkg-config
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
make
sudo ./rpiboot
Download the Raspberry Pi Os Image from here
Unpack the image
unxz 2022-09-22-raspios-bullseye-arm64-lite.img.xz
- Copy the image
sudo dd bs=1M if=2022-09-22-raspios-bullseye-arm64-lite.img of=/dev/sda
To see dd's progress
sudo kill -USR1 $(pgrep ^dd$)
- Setup
SSH Serverand create a user
sudo mkdir -p /mount/boot
sudo mount /dev/sda1 /mount/boot
sudo touch /mount/boot/ssh
sudo nano /mount/boot/userconf
# put into this file: <user>:<encrypted_password>
# encrypted_password you get by running:
echo 'mypassword' | openssl passwd -6 -stdin
sudo umount /mount/boot
Docker
From here.
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Test it with
sudo docker run hello-world
Gitlab
Setup A Gitlab instance:
docker run \
--rm \
-it \
--name gitlab-ce \
--privileged \
--memory 4096M \
--publish 23:22 \
--publish 80:80 \
--publish 443:443 \
--hostname gitlab.example.com \
--env GITLAB_OMNIBUS_CONFIG=" \
nginx['redirect_http_to_https'] = true; "\
--volume $HOME/gitlab/conf:/etc/gitlab:z \
--volume $HOME/gitlab/logs:/var/log/gitlab:z \
--volume $HOME/gitlab/data:/var/opt/gitlab:z \
yrzr/gitlab-ce-arm64v8:latest
Change admin password
sudo docker exec -it <container-id> gitlab-rake "gitlab:password:reset[root]"
Gitlab Runner
Official Installation Instructions
- Configure
docker run \
--rm \
--network=host \
-it \
-v $HOME/gitlab-runner/etc:/etc/gitlab-runner \
gitlab/gitlab-runner register
- Run
docker run --name gitlab-runner -d \
--network=host \
-v $HOME/gitlab-runner/etc:/etc/gitlab-runner \
-v $HOME/gitlab-runner/srv:/srv/gitlab-runner/config \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest