Skip to content
Matt Simerson edited this page Nov 9, 2021 · 8 revisions

The following instructions permit testing on bare metal (painful) or VMs (awesome, if they have snapshot support) via GitLab's runner and the SSH executor. The GitLab config is already defined in the main repo.

Synopsis

  1. Fork the GitHub repo to your GitHub account
  2. Import your GitHub fork to your GitLab account
  3. Create a pipeline
  4. Install gitlab-runner
  5. Build a test VM
  6. Push to a gitlab branch

Install gitlab-runner

Install GitLab's runner on a host with network access to the test VM. The runner will get registered with GitLab and periodically poll to see if there are new jobs to run.

  1. Install GitLab Runner
  2. Register the runner with the SSH executor and identify_file property

Build a Test VM

  1. Using your Hypervisor of choice (or bare metal, you masochist), create a FreeBSD VM with 4GB RAM and at least 10GB of disk. During the FreeBSD install, choose no distributions and Auto ZFS partitioning.
  2. Configure SSH key based auth by installing a public key to /root/.ssh/authorized_keys
  3. Enable root logins to the VM: sed -i'' 's/^#PermitRoot.*/PermitRootLogin without-password/' /etc/ssh/sshd_config service sshd restart
  4. Install a few useful packages: pkg update && pkg install -y sudo git-lite open-vm-tools-nox11 vim-lite bash-static
  5. Change root's shell to bash: sudo chpass -s bash root
  6. freebsd-update fetch install
  7. portsnap fetch extract
  8. service sendmail stop; sysrc sendmail_enable=NONE
  9. poweroff
  10. snapshot the VM