Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

GitLab Continuous Integration Runner Installation on SLES 12

At work we are using GitLab Comunity Edition hosted on our servers. GitLab includes Git repository management, code reviews, issue tracking, wikis, plus GitLab CI, a continuous integration and deployment tool similar to Jenkins or TeamCity.

Being responsible with architecting and implementing the infrastructure for our web application, I spent the last days implementing the continuous integration/deployment pipeline. Here is just a short tutorial about how to install GitLab Runner, an application which processes builds. It can be deployed separately and works with GitLab CI through an API. In order to run tests, you need at least one GitLab instance and one GitLab Runner. The installation is done on SUSE Linux Enterprise Server 12 but should work on openSUSE, as well.

Even if on their website, SUSE is not mentioned, the binary, writen in GO, is working perfectly fine.

  • download the binary and save it in /usr/local/bin/
# wget -O /usr/local/bin/gitlab-ci-multi-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-linux-amd64
  • let's make it executable
# chmod +x /usr/local/bin/gitlab-ci-multi-runner
  • check to see if is working
# gitlab-ci-multi-runner --version
Version:      1.3.2
Git revision: 0323456
Git branch:   stable-1-3
GO version:   go1.6.2
Built:        Tue, 28 Jun 2016 14:03:09 +0000
OS/Arch:      linux/amd64
  • create a GitLab CI user which will be responsible for our automatic builds and automatic deployments
# useradd -m deploy
# passwd deploy
New password: ...
  • now we have to register the Runner. But before to do that we need a specific token and a "coordinator" URL which is generated by GitLab. In order to get them go to: Your GitLab Project -> Settings -> Runners, see the screenshot below.

runners-gitlab

# gitlab-ci-multi-runner register
Running in system-mode.

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
https://your-server-where-gitlab-is-installed/ci
Please enter the gitlab-ci token for this runner:
[your-unique-token]
Please enter the gitlab-ci description for this runner:
[our-little-gitlab-runner]:
Please enter the gitlab-ci tags for this runner (comma separated):
Registering runner... succeeded                     runner=fD_qnhkt
Please enter the executor: docker+machine, docker-ssh+machine, docker, docker-ssh, parallels, shell, ssh, virtualbox:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
  • run the runner as a service
# gitlab-ci-multi-runner install --user=deploy --working-directory=/home/deploy/gitlab-runner
  • start the service
# gitlab-ci-multi-runner start
  • check if the runner is running
# ps aux | grep gitlab
root     25687  1.5  0.1  64192 14584 ?        Ssl  20:10   0:00 /usr/local/bin/gitlab-ci-multi-runner run --working-directory /home/deploy/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user deploy
  • check if build started (after a few seconds)
# ls -ltr /home/deploy/gitlab-runner/builds/
total 4
drwxr-xr-x 3 deploy users 4096 Jul  6 20:10 baf1e27f

I didn't mentioned until now but you also need a .gitlab-ci.yml in your repository. Check the available documentation.

a silhouette of a person's head and shoulders, used as a default avatar

Third day of the conference

tI am going to start showing you some of the pictures with Geeko that we took during the day  😉

Apart from taking pictures with Geeko, in the morning we had a GSoC meeting with all the students and mentors that were at the conference. In the meeting we talked about the importance of blogging, what students and mentors use to talk or have meetings, how every team review pull requests, why students chose openSUSE for GSoC, etc.

GSoC meeting

After having lunch I attended the How to bring SUSE/Linux to school! talk, by Emiel Brok. He gave 11 tips to bring Linux to school which you can see in his slides:  OpenSUSEconf2016. When the talk finished, I went to the Getting started with Docker workshop, but it had almost finished.

And then it was time to enjoy openSUSE swimming pool and to eat some barbecue:

barbecue

Yes, it is a very small swimming pool, but it was reeeeally hot that day, so it didn’t matter.   😉

It was also taken the group picture:

group-picture

Lastly, we went to see/listen SUSE Band:

SUSE band

 

It was a really fun day! I’ll write one more post about the last two days of the conference.   🙂

 

a silhouette of a person's head and shoulders, used as a default avatar

Is my OpenStack ready for Cloud Foundry?

This year's first Cloud Foundry Summit took place in Santa Clara at the end of May. Beyhan Veli from SAP and I gave a presentation about the Cloud Foundry OpenStack Validator, a new tool we developed as one of the results of our collaboration with SAP on the BOSH OpenStack Cloud Provider Interface project.




The validator gives operators of OpenStack systems a simple tool at hand to check if their OpenStack installation is ready to run Cloud Foundry. OpenStack comes with a lot of options and flexibility, and not all configurations are equally suitable to run Cloud Foundry. The requirements are documented and there are instructions how to manually check them, but it requires quite some expert knowledge to get everything right.

The validator is supposed to encapsulate the expert knowledge and instructions. It checks all requirements automatically and gives operators a report with the information if requirements are met or what they need to change. Cloud Foundry makes it simple for developers to deploy their applications. We try to capture the same spirit of simplicity for operators of Cloud Foundry on OpenStack.

We are running a test pipeline for the continuous integration of the BOSH Cloud Provider Interface for OpenStack which is used in Cloud Foundry. This runs on SUSE OpenStack Cloud. It works smoothly now, but while getting there it would have been great to have the validator to have a simple check of the setup without having to go through manual deployment and testing and finding issues with the setup late in the process. We captured some of this experience in code, and it is much easier with the validator now.

The architecture of the validator is quite simple. It uses the same interfaces as BOSH and Cloud Foundry to access the underlying cloud infrastructure, so it closely resembles what is happening in production. Most of this goes through the Cloud Provider Interface. Some lower level checks directly use the OpenStack APIs.

Tests are written in RSpec, which gives a nice concise way to describe and run the checks which are run by the validator. The validator is provided as a standalone tool, which can simply be run on the command line and will print out a report with what checks it has run, if they have succeeded, and what needs to be done if something is missing. In the end it will answer the question, if my OpenStack is ready to run Cloud Foundry, and this hopefully will be a big green yes.

There is ongoing work to improve the validator, to add more checks, and make it more complete in checking the requirements of the full stack, from OpenStack, through the Cloud Provider Interface, to Cloud Foundry. This will be a continuous improvement process with new checks being added as they are found to be relevant when setting up OpenStack based Cloud Foundry installations. To make this easier and also allow to add custom checks, there likely will be some kind of plugin interface to add new checks to the validator.

As it is using the abstract Cloud Provider Interface it might also be interesting to use the validator with other cloud infrastructures, and we need to evaluate how it plays with other approaches of validating cloud infrastructure. The project is open, the code is published as open source, and we are welcoming feedback and discussions about its future direction.

It was the first time I attended a Cloud Foundry Summit, and I really enjoyed the event. It covered a broad range of topics, inspiration, user experience, deep dive into the technical foundation, science fiction, and much more. Good information, great inspiration, and meeting lots of awesome people, it was an excellent event.

The next summit will be in Frankfurt, Germany, in September. I'm looking forward to see you there.

This blog entry was first published on the SUSE blog.

the avatar of Jigish Gohil

Future of Li-f-e: Linux for Education distribution

We have come a long way since the first Li-f-e live media based on openSUSE was created, the current release is based on openSUSE Leap 42.1. Deployments by Indonesia’s education system is a shining example of openSUSE Education project’s accomplishment.

The openSUSE project has stopped producing live medias for Leap and also live-installer is dropped from live medias created for the Tumbleweed distribution. As Li-f-e is primarily a live distribution we would not be able to create any more medias without live-installer. So unless this situation changes we may not have Li-f-e based on Leap 42.2.

In the meantime I’ve had a look at Ubuntu to create Li-f-e based on the latest LTS release of Ubuntu-Mate, check it out here. Software selection available is kept identical to the Li-f-e based on openSUSE, however there is always a room for improvement, suggestions to enhance it are always welcome.

the avatar of Aleksa Sarai

Adventures into ptrace(2) Hell

As part of my work on rootless containers, I found that many tools try to drop privileges. This makes those tools break inside rootless containers, so I spent a week or two working on a tool that allows users to shim out all of the "drop privileges" syscalls. Here is documented the pain that I went through while figuring out how ptrace(2) is meant to work.

a silhouette of a person's head and shoulders, used as a default avatar

Second day of the conference

The second day was for me the one with best talks and workshops. First, I attended the keynote from Frank Karlitschek, founder of Nextcloud. After that, I went to Ancor González Sosa workshop, openSUSE wants you: the software portal. I downloaded the software-o-o project and started seeing how it works. At lunch time I had some strange food.

Then, I attended the Teaching opensource talk, by Craig Gardner. It was mainly focused on how to turn students into contributors, but Craig also talked about the benefits to schools, the fact that most big companies loves open source and why it is important to teach open source. I really recommend you to see the slides he used, specially if you do not agree that teaching open source in schools and universities is that important, as I think the slides will make that you change your opinion.You can find them here: Teaching open source 2016.

After that, it was Henne Vogelsang talk about openSUSE 101, the openSUSE mentoring program which has been used in GSoC. I found the slides and the presentation really fun. I would like you to see it but unfortunately there is no video of the talk. Although you can see the video that he played when talking about the fact that variety is needed in open source. I had seen it before Henne talk but it was still funny:

Lastly, I went to the end of the Ruby on Rails 101 workshop and to the 20.000 Leagues Under SUSE Studio workshop, both of them by Christian Bruckmayer. I liked a lot the slides of the second workshop which you can find here: 20.000 Leagues Under SUSE Studio

Cellar tour

In the evening I went to the cellar tour, which lasted around 75 minutes (the same of the city tour more or less) and where I also learnt a lot of things. It is astonishing that Beer used to be healthier than water in Nuremberg hahaha.

After the cellar tour we went to eat Schnitzel, a huge steak with a strange cover. As you should have already noticed in my previous post all dishes are tooo big in Germany. But not only dishes, drinks and even ketchup packets are too big. The German ketchup packet has 20ml, while in Spain it usually has only 10g. That means that you have to open around 4 ketchup packet in Spain to get the amount of ketchup that you get in Germany in only one packet.   😉

Schnitzel

 

And that is most of what I did the second day of the conference. I have a lot of nice pictures with Geeko of the third day which I will include in the next post.   😉

 

a silhouette of a person's head and shoulders, used as a default avatar

Going to Nuremberg to attend oSC16

After taking two planes I arrived to Nuremberg on Tuesday 21 to attend openSUSE Conference 2016, which took place from June 22 to June 26.

Travelling to Nuremberg

 

Pre-conference party

That night it was the pre-conference party, where I had the chance to try openSUSE beer and to meet a lot of people. I met some openSUSE workers from Canarias, such as Moises, entertainment manager Senior Rails Web Developer at SUSE, the GSoC students Joaquín and Rishabh, my mentor Chris and some others that I won’t mention to avoid doing the post too long.

At the pre-conference party

 

First day of the conference – Wednesday 22


In the morning I helped in the registration desk. After that I attended the last part of the SaltStack is more than just configuration management talk, by Thomas Hatch, and the Introduction to the Linux Block I/O Layer and Hawk 2.0 and Beyond talks, by Johannes Thumshin and Kristoffer Grönlund respectively. I found interesting the Hawk talk. You can see the video of these talks and some other in the openSUSE youtube channel. I also met Matheus, the last GSoC student that was coming to the conference.

At the registration desk

 

After that, I had a pulled pork bbq sandwich for lunch taken from Ribwich Food Truck. Ñaam.

A picture next to the selfie lovers message in the RibWich truck Beef sandwich

In the afternoon, I attended the The type C connector and USB 3.1 talk, by Oliver Neukum, while being in charge of giving the people who wanted to ask questions the microphone. It is funny because I appear in the last part of video of this talk hahaha.

Lastly, I went to the How to Contribute to an Open Source Project workshop, by Lasse Schuirmann. I found the workshop really useful: I learnt some things about Python data structures and git that I didn’t know, I learnt what Coala is and I made my first contribution to the coala-bears project. What Lasse told us about Coala in the workshop was similar to what he said in his Static Code Analysis for All Languages – coala! talk. I couldn’t go to that talk, but I’ve seen the video and I recommend you to see it. I think that Lasse is a really good speaker and the talk lasts only 15 minutes. You can find it here: Lasse Schuirmann: Static Code Analysis for All Languages – coala!

 

City tour

On Wednesday 22 evening I also went to the city tour organized for the conference. The tour lasted around 75 minutes and I learnt many things. I had already seen pictures of Nuremberg in Google, but I was really impressed by how beautiful the city is! Here there are some of the picture I took:

Click to view slideshow.

And my favourite one, which I prefer to include separately:

Group picture after the city tour

After that, we went to have dinner to a Thai restaurant where I ate a delicious duck and to the Nuremberg “beach”.

 

That’s all from now, I’ll continue writing about the conference in the next post.   🙂

 

a silhouette of a person's head and shoulders, used as a default avatar

HackWeek XIV @SUSE: Thursday

The Taste of Avocado

Mr. Viktor Avocado
Viktor and Zdenek have been trying the Avocado Framework to be used for our automatic regression tests instead of Autotest. They were quite successful in breaking the stuff first to actually succeed at the end. They have also subscribed for giving the presentation about the project on Friday.

Avocado provides the framework for running tests written in any programming language, but it additionally provides useful API for tests written in Python. For those, who want to try Avocado themselves, there is an RPM built for openSUSE at our build service.

Windows 10 in openQA

Happy Jozef and his Windows
Jozef's project was to install and use Windows 10 in openQA because we, of course, support dual-boot openSUSE/Windows scenario and want to make sure that we don't break it in the future.

Jozef was mainly struggling with the fact that openQA (KVM) uses SCSI disks, but Windows did not support them by default. There are several ways how to overcome this issue. Some solutions can be found either here or there.

At the end, Jozef has succeeded and this new automated regression test will be added to our openQA - a great continuous integration framework. Well done!

Jenkins Dashboard - Putting The Pieces Together

Tomas doing a small talk with Slenkins
Tomas worked on a Dashboard for showing the current state of our Jenkins/Slenkins instance used for running package regression tests. The UI should be similar to what we are getting from openQA nowadays.

The project itself already has a working prototype and uses as much as possible from other libraries and frameworks (Pharo, Seaside, Bootstrap) and also uses the Jenkins XML API for getting the data to show.

a silhouette of a person's head and shoulders, used as a default avatar

HackWeek XIV @SUSE: Wednesday

Gordon: Automagic Testsuite for Crowbar

Evgeny making Gordon green
What does not need to be done manually, should not be done manually. If you have a set of tests that you always need to run before you release a maintenance update, automate it. This saves you time for the cool stuff.

Evgeny's HackWeek project is to automate various crowbar tests using Splinter - a powerful, easy-to-use library, written in Python, for testing web-based applications. There is an animation demonstrating how it flies in action at the GitHub project page.

The plan is to integrate this project into the official QA Maintenance testsuite and speed-up the process of releasing updates while still being sure that everything works as expected.

Deploying Testing HA Cluster in VMs Easily

Screenshot from the video
Another great example of saving a lot of time is Antoine's project for deploying a testing HA cluster using several virtual machines. All is written in Bash and it's easy to understand thanks to a well-commented code and help.

You can find an extensive documentation and explanation at the respective GitHub project. Including three YouTube videos [video #1], [video #2], [video #3] showing the beast in action!

If you ever wanted to explore how HA works, this is the right project to start with. Antoine is looking for your feedback.

a silhouette of a person's head and shoulders, used as a default avatar

HackWeek XIV @SUSE: Tuesday

YaST Code Closer to the Ruby World

Yast team brainstorming
There is a long-running YaST project, driven by Imobach, that should bring YaST code (which is written in Ruby) closer to expectations and conventions of any common Ruby project. There are several reasons for that. For instance, we'd like to enable Yast classes to be packaged as Ruby Gems and to lower the entry barrier for any Ruby developer in general. So, files should be in directories where you expect them and their names and class names should match.

Fragments of the project output
As there is a HackWeek at SUSE and Imo, Knut and Ancor were visiting the Prague office, we took the chance to discuss this in person and we have a plan how this should look like in the future. During our discussion, we have found out that we might need yet another course in handwriting (after leaving the primary school years ago).

Let's have some beer now :)
Now it's time to document our plan and start working on the proof of concept, but the ship has already started moving to the right direction. This will be particularly challenging with the number of Yast libraries we currently maintain.

Static Ruby Code Analysis with ruby-lint

Martin works on an interesting project that should help Yast to identify unused and misused variables and methods (and more). See an example of badly-used code and the output of ruby-lint in the project itself.

Orca: an Intelligent Ceph Testing

SUSE has already released a version 3 of SUSE Enterprise Storage based on Ceph which is highly-scalable, fault-tolerant and self-healing by definition, but we'd like to enhance it even more by finding the bottlenecks, by being as mean and cruel as possible to find it's limits. Then we'd like to focus on what we will find and make it even more robust in the future.

This all needs an intelligent creature (or even a herd of creatures attacking together and having fun of that). A creature that is able to inspect, learn and attack and also learn from its failure. All this (and even more) should be the result of five brave developers lead by Lars working on project Orca: Hunting Cephalopods for Fun and Dinner.