Ever put your Raspberry Pi inside a robot and wanted to be able to still develop without plugging it into a monitor? Have you had more than one raspberry pi that you wanted to update at once? Have two developers wanted access to one raspberry pi at the same time? If any of these situations are familiar to you or your team, you could benefit from DevOps for Raspberry Pi. In this tutorial series, we will be exploring how to automate Raspberry Pis through a software development technique called continuous integration.
We will be looking at how to get quickly started with setting up an automation server, how to communicate with a Raspberry Pi, how to successfully monitor them and update software.
All code used in these tutorials can be found in the following GitHub repository.
DevOps is a set of practises that get an engineering idea from the whiteboard, through to development, testing and finally deployed into the real world. It has become ubiquitous in the software engineering world, but it can have profound impacts on small devices, such as the Raspberry Pi.
The landscape of devices is changing. Today’s users expect devices that are not only smart, but also fast, safe and secure. Developing these devices on schedule and bug free are two of the greatest challenges facing engineers today.
The ugly truth about development, especially when it comes to teams, is that involves a lot of boring manual tasks. We want to be able to work on delivering new features to our next project, but just doing the exciting parts is a sure way for things to break quickly.
Let’s take for example, two developers working on a product. They both develop two different features. After a few months the deadline is approaching, but they finish their sections. They then try to combine their code and find that all their changes clash. Merging this code causes a huge amount of bugs to occur and on top of this the deadline is almost on top of them.
The best way for them to solve this problem is through what is known as Continuous Integration. Continuous integration is a DevOps practise that has developers regularly commit their code to a central codebase. This codebase is held in a Version Control System, such as GitHub or GitLab, and developers will push their code changes through at least once a day.
This avoids the merging problems previously, but a new challenge arises. How do we make sure that this codebase that is rapidly changing, functions as it should? This is where automation comes in. We can take that codebase and run builds and tests throughout the entire development process.
By adopting continuous integration teams and even individual developers can benefit from the following:
Continuous Integration has been revolutionary in general-purpose software engineering. It is rare to find a company that does not do it, but it is still not common practise for embedded software. In fact, a quick search on Google for ‘ci raspberry pi’ will mostly show how to setup web servers on a Raspberry Pi.
The reason for this is that continuous integration on Raspberry Pis and embedded software is far more complex than the average continuous integration flow. In a more standard setup a developer will work on a laptop and then push their code to work on a large web server. With Raspberry Pis there are a lot more challenges:
In this tutorial, we will show you how we can overcome many of these challenges and get the benefits of continuous integration.
This tutorial will focus on solving the problems that many developers have when trying to setup continuous integrationn for their Raspberry Pis. We will show practical methods for overcoming hardware limitations and how to setup entire infrastructures automatically.
To do this we will be using BeetleboxCI, a continuous integration tool specifically designed to overcome the challenges faced when using Raspberry Pis. It is designed to:
The next section of the tutorial will focus on the initial setup and getting our Raspberry Pi to say Hello World to BeetleboxCI.
Beetlebox Limited is a
company registered in
England & Wales with
Company Number 11215854
and VAT no. GB328268288
Leave a Comment