CI/CD pipeline on a Raspberry Pi – Part 2

by | 23.02.2019 | Software development | 0 comments

After we mainly took care of the setup and configuration in part 1, I would like to describe the installation of a build server on the Raspberry Pi in part 2 of the experiment. I chose Jenkins because Jenkins is open source and free, and the installation is relatively easy.

The installation of Jenkins

Please connect your Raspberry Pi via SSH and update the basic packages at the beginning. Simply enter the following commands into the console:

Confirm the respective requests with Enter.

Install Java

Next, you need a Java installation, because Jenkins is based on it. I recommend you install OpenJDK – also due to current licensing problems with Oracle:

To test it, simply call up the appropriate version:

If you encounter a problem with the error message “Error: missing `server’ JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/’.”, the following thread has helped me:

I executed the following commands, then it ran:

Now the call of “java -version” should provide a successful version information and you can install Jenkins. To do this, provide another package source of Jenkins and install the server via the package manager:

Now Jenkins should be installed and running. Please check this:

This command will output the status of the Jenkins service; the following should be in that order:

If this is the case, you can already open the Jenkins web interface from your computer via a browser: http://[ip-adresse-des-pi]:8080. If necessary, you may need a few seconds of patience until everything is loaded initially.

Getting Jenkins started

Next, you may unlock the Jenkins instance. To do this, select a special key and insert it in the input field accordingly:

Unlock Jenkins

You can get the contents of the file directly from the Raspberry Pi via SSH:

Simply copy the issued key from the terminal into the input field and click on “Continue”.

The installation of the plugins

In the following screen please choose “install suggested plugins”. Jenkins will automatically install all plugins one after the other. This may take a few minutes.

Getting Started

Note: During my installation the installation of some plugins was highlighted as faulty. In Jenkins itself I couldn’t identify any problems, so don’t be confused: missing plugins can be installed later.

The initial user

Now enter the data for the initial user:

Create First Admin User

Now you should already see the main page of Jenkins, which is now completely set up:

Welcome to Jenkins!

And you’re done.

Part 3 of the experiment describes how to use the build server and create a build job. Will you be back as a part of it? Here it goes to part 3.

Peter Friedland
Peter Friedland

Software Consultant at t2informatik GmbH

Peter Friedland works at t2informatik GmbH as a software consultant. In various customer projects he develops innovative solutions in close cooperation with partners and local contact persons. And from time to time he also blogs.

Share This