Allow for Jenkins to be used in the Taskotron stack
Closed, ResolvedPublic

Description

Make necessary changes throughout the whole Taskotron stack in order to be able to use Jenkins as a framework for running libtaskotron's runtask on client hosts; in addition to Buildbot which we currently use.

This will likely involve:

  1. Writing Jenkins runner for taskotron-trigger
  2. Writing jenkins-job-builder yaml file that creates a project in Jenkins that would run Taskotron tasks
  3. Making a change in libtaskotron where we currently send hardcoded buildbot's log_url into resultsdb
  4. Investigating whether we can use the current client hosts setup that we use with Buildbot; propose different approach otherwise
  5. Making changes in ansible playbooks to "glue" the above into existing Taskotron stack

Once those are done, it would be nice to find already running Jenkins deployment for testing.

ExecDB changes needed for that will be tracked in a different phab task.

mkrizek created this task.Feb 16 2017, 9:28 AM
mkrizek edited the task description. (Show Details)Feb 16 2017, 1:13 PM
mkrizek added a project: libtaskotron.
mkrizek moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Feb 20 2017, 8:43 AM
mkrizek removed mkrizek as the assignee of this task.Jul 13 2017, 9:04 AM
jskladan closed this task as "Resolved".Aug 1 2017, 1:10 PM
jskladan removed projects: libtaskotron, Restricted Project, taskotron-trigger.
jskladan claimed this task.

As we discussed lately, it is wise to try replacing buildbot with Jenkins - not only is it a pleasing decision, but it might be practical, as we might start using somebody else's infrastructure (CentosCI comes to mind), and get rid of some of the sysadmining.

Lucky for us, we designed and implemented the Taskoton in a modular way, so doing the switch was mostly about figuring out Jenkins-related issues, like notifying execdb per-step (we want that to be able to automagically re-run some of the failed jobs in the future), and setting up the whole beast in a way works.

I put together a working demo using our Docker containers. You can easily try it yourself (tm) by cloning the testjenkins branch of https://pagure.io/taskotron/task-taskotron-ci repo.

After that, just run docker-compose up --build in the cloned repo, and watch the magic happen. This spawns trigger, resultsdb, execdb, jenkins master and slave. The trigger runs rpmlint using some old data from datagrepper (so we don't need to wait for a fedmsg to arrive), and schedules a jenkins job.

You can watch the whole process happen in execdb ( http://localhost:5003 ), or Jenkins ( http://localhost:8080 user=admin password=admin).

There are some minor quirks - the most important one is that the link from resultsdb to artifacts is broken, as Taskotron's resultsdb directive fills that up with data relevant to our default setup, and since we will be replacing stuff with ansible modules real time soon now (tm), I deemed fixing it not important. Links from ExecDB's job detailed view all work, though.

Since we now have the most important bits for Jenkins integration done, we can start talking about whose Jenkins instance are we going to use, and so on. I'd rather not spin up our own, as the whole thing was heavily motivated by "Why don't you switch to Jenkins, we all do use it, and you would not need to manage it."

jskladan edited projects, added Restricted Project; removed infrastructure.Aug 1 2017, 1:11 PM