ods-core
ods-core copied to clipboard
Investigate Tekton
OpenShift seems to adopt pipelines (Tekton) as "Dev Preview" soon (in 4.1) with the goal to have it GA in Q4 2019. From what I can tell so far is that this is a direct competitor to Jenkins - super exciting! :)
We should think about what this means for OpenShift, and what this means to the planned quickstarter restructure and/or meta-orchestration.
FYI @clemensutschig @metmajer @rattermeyer @tjaeschke @hugowschneider
See also https://github.com/openshift/pipelines-tutorial
@oalyman and I investigated Tekton a little, mostly following the below resources:
- https://blog.openshift.com/pipelines_with_tekton/
- https://github.com/openshift/pipelines-tutorial
- https://github.com/tektoncd/pipeline
We created a sample repo resembling a QS with a simple Nginx config (https://github.com/michaelsauter/tekton-hello-world) and deployed that to a local Minishift instance (3.11) via Tekton pipelines. We used 3.11 because we did not have a 4.1 cluster available and https://github.com/code-ready/crc did not work out-of-the-box.
Because we used 3.11, there was no UI to see pipelines and builds within them. A lot will depend on what kind of UI RedHat is going to build ....
Our impressions:
Pros:
- Based on CustomResources
- No long-running deployment needed (no Jenkins master equivalent), therefore well suited to run within the namespace to which deployment happens
- OpenShift by itself is enough to get started with it, no other tools / tech required
- Individual tasks are reusable (they refer only to inputs, and pipelines are assembling tasks - and are themselves also reusable because they only refer to pipeline resources)
- Interaction via
oc
andtkn
CLI tools possible
Cons:
- YAML was difficult to author, and no validation seemed to happen in OpenShift (e.g. input was valid YAML but structure was not correct ...)
- Error messages were hard to decipher (e.g. we made a mistake with specifying inputs, and the message just mentioned that some input was incorrect, but not which one)
- Passing artefacts between tasks (e.g. files) was cumbersome (in comparison to Jenkins)
- Every task/step is its own container, which results in some performance loss
- Since input/output runtime validation was very strict, it was sometimes not possible to reuse the exact same task even though 90% was identical
- Log output of the pipeline run only captured stdout, operations that were silent (e,g.
mkdir
) did not appear in the log - Built-in functionality like cloning a git repository felt a bit magic - where is it happening, how it is done, ...
- Resource constraints of the used containers was not really clear - e.g. how to adjust available memory, cpu, ...
- Handling of failures (e.g. sending an email when pipeline fails) is not clear
- Needs more documentation/examples to be usable in production. Also some inconsistencies with existing tutorials/videos
Open Questions:
- How will build results/artefacts such as test reports be handled?
- How can pipelines be triggered via webhook?
- Support for things like build trends, build times, number of tests, etc. that Jenkins provides?
- Conditional execution of steps, and adjustment of executed steps e.g. based on the Git branch being built. In general, e.g. Gitlab and Travis have one pipeline per Git branch so that history of builds for one branch can be tracked ... how would that work with Tekton?
Summary:
Some parts look promising and technically you can built and run pipelines. However, it really is a developer preview and in our opinion not suited yet to be used in a wider context or to rely heavily upon it. Therefore, we agree with the summary from https://blog.openshift.com/cloud-native-ci-cd-with-openshift-pipelines/:
OpenShift Pipelines, although functional, is not yet full-featured and is released as Developer Preview in order for users to get experience with Tekton.
We plan to continue to work with the Tekton community to push the project forward and to create a user experience around it with a rich user interface, additional integrations, extensions, and developer tooling to simplify creating and using CI/CD pipelines across existing and new projects.
See https://github.com/opendevstack/ods-pipeline.