Roles: Continuous integration - HolgerHees/smartserver GitHub Wiki

Continuous integration testing

In the past, I checked several continuous integration services like Appveyor or TravisCI.

Both services are providing an easy way to connect your git repository with their continuous integration service where we can trigger build and testing jobs to verify that everything runs fine.

With both services I had no success with this deployment project.

Appveyor was failing because it was providing just ~2GB of memory which is not enough. The deployment needs at least 7GB memory to run vagrant and virtualbox.

TravisCI was almost successful. They provide 7GB memory for free for open sources projects but the runtime was limited to 50 minutes. After I described my project, they increased the runtime limit to 180 minutes. With that, the suse deployment was done after 170 minutes, but every time when there was a network delay, it was crashing too. The almalinux (rhel) deployment which needs 10 minutes more time was never done successful.

The reason for this extreme long runtime on TravisCI is the very slow hardware. On my atom based hardware it needs 50 minutes for a full deployment in a virtual machine.

Custom solution

After this evaluation experiments, I decided to develop an continuous integration services by my self. The result can be found in the role ci_service

It is running permanently on my production machine and checks every 5 minutes the git repository. For a new commit it starts a job in background which deploys the whole setup with vagrant in a virtual machine.

Features

It provides the following features

  • Github status integration
  • Email notifications
  • Multiple deployments (e.g. demo setup on suse, almalinux (rhel) and ubuntu)
    • Custom deployments coming soon
  • Deployment retries on temporary network issues
  • Command line tool to maintain deployment (start,restart,stop,status,cleanup)
  • Web ui to inspect deployment jobs with colorized log files

The pending, success and failure state reported to github and visualized in their UI.

Github

In the integrated web ui, you can explore running and older deployments, including analyzing the log file.

Overview

Details 1

Details 2