Continuous integration (CI) and continuous development (CD) offer developers the ability to put applications into production on a tight turnaround. With teams scattered across the globe, CI/CD becomes a necessity as code change commits can be added to a repository at any time of day — often multiple times a day.
Semaphore offers a CI platform that enables developers to deploy to production by offering not only CI services but CD as well. When coupled together, these two features enable teams to test, deploy, and push to production quickly.
Semaphore is a hosted CI and CD service based around LXC containers, the predecessor to Docker. Semaphore chose LXC for its ability to provide high performance as opposed to virtualization. The CPU performance used in virtualization is typically not an issue, as KVM has direct access to it. However, when running integration and acceptable tests, bottlenecks can occur when databases are running. Semaphore found that the performance difference between LXC and virtualization was an increase of 4 times in efficiency when working with LXC containers as opposed to virtual machines.
With the arrival of Docker into the technology ecosphere, the Semaphore team saw the need to support Docker so that users could build and run Docker on Semaphore while using KVM as its virtualization layer.
Semaphore originally began as a Rails consultancy shop, prior to entering the container ecosphere with its LXC offering. “When we were installing Jenkins and then needing to scale–this was a different experience from GitHub or Heroku. We wanted to model a service which was as easy for CI as those platforms,” said Darko Fabijan, co-founder and chief technology officer at Semaphore. Setting up and deploying to production in CI and CD must be a simple process as time is crucial when pushing multiple applications or microservices into production throughout a development cycle or sprint.
Fast and furious
Whether running unit or integration tests, companies have continued to scale up the size of the tests they are running on a daily basis. Through user feedback, Semaphore discovered that its customers wanted fast feedback loops to see if their code passed its test in order to be deployed to production. Waiting a matter of minutes for a test to compile has become a standard, rather than an exception to the rule in CI and CD.
Semaphore has some competition on CI/CD front. TravisCI and Buildbot both offer CI frameworks that offer extensive CI and CD tools such as release management, testing, and integration. TravisCI is one of the largest open source CI testing offerings available, with over 246,506 projects currently on its platform. Each of these solutions offers users the ability to manage and test their deployments, regardless of where their project is in development.
This is viewable on GitHub and GitLab, as users contributing to repositories will often see tests marked as passing or failing from their CI platform of choice. Semaphore offers a live log as the build progresses, detailing any conflicts and the results of the test run. To obtain shorter feedback loops, Semaphore splits this workload around servers.
“The test is about 45 minutes, split across 32 machines. This enables us to get results within 3-4 minutes, which is a huge advantage for our developers,” said Fabijan. With a CD pipeline, deploying dozens of times a day is common. Single-click deployment in a centralized dashboard becomes a critical part of this process, shaving time off of potentially running multiple software to push deployments through.
Semaphore is currently using Docker for running its services but has not fully transitioned to a microservice architecture yet. Currently in beta, users can register and request Docker features as they are required in their development workflow. Users can deploy Docker compose and spawn a number of containers in the Semaphore infrastructure, push them to the Docker hub, then deploy the changes made into production.
Managing and deploying containers at scale is something that there are a number of solutions for today. The usability and simplicity of workflow tools such as Docker compose allow for developers to quickly push projects into production from a wire frame or project outline. In the past, maintaining development and production environments to be the same has been a huge challenge; one which tools such as Docker and Semaphore aim to improve upon as container technology progresses.
Docker is a sponsor of The New Stack.
The New Stack Editor-in-Chief Alex Williams contributed to this story.
Feature Image via Pixabay.