[kontinuity-dev-public] Type of Jenkins setup for summit

Ben Parees bparees at redhat.com
Tue May 3 00:55:49 UTC 2016


I would expect some combination of option 2 and option 3.. that is, some
part of the pipeline should include running an s2i build on openshift, and
some other part should include launching a temporary jenkins slave pod in
the cluster.  That demonstrates the flexibility of the system and the power
of temporary slaves.


On Mon, May 2, 2016 at 2:09 PM, Tomas Nozicka <tnozicka at redhat.com> wrote:

> I have started to write Jenkinsfile for helloworld project [1] and soon
> found out that they will be completely dependent on how we will run
> Jenkins pipelines on OpenShift for summit (or in general). Here is a
> few relevant ways I could think of:
>
> 1) Kubernetes/OpenShift-plugin - on-demand slaves with 1-N
> Kubernetes/Openshift clusters with corresponding build images
> = example =
> node('docker-centos-7-java') {
>   stage 'Build'
>   bash 'mvn package && docker build .'
> }
>
> 2) Master with/without slaves running sub-job builds on
> Kubernetes/Openshift cluster
> = example =
> node {
>   kubernetes.pod('buildpod').withImage('docker-centos-7-java').inside{
>   bash 'mvn package && docker build .' }
> }
>
> 3) Master with/without slaves running running simple jobs and only
> calling OpenShift API to do the work
> = example =
> node {
>   // oc.createNamespace(dev)
>   // oc.setupS2I(buildConfig)
>   // oc.startBuild()
>   input "Is http://dev.openshift.rh.com/ OK?
>   // oc deploy it to production namespace
> }
>
> Which approach are we going to use?
>
> Also since we are targeting multiple languages (at least OpenShift
> does) there is a question of the build images. This is mostly for
> option 1 and 2 because in option 3 user can easily switch them for
> their own. With option 1 and 2 adding another build image requires to
> be Jenkins administrator to setup a new docker cloud pool with the
> image and label (AFAIK). The only generic way is to use image like
> 'centos-7' and have your pipelines install dependencies on their own:
> node('docker-centos-7') {
>   stage 'Build'
>   bash 'yum install -y maven
> docker  # and other stuff'
>   bash 'mvn package && docker build .'
> }
>
> Also in case of option 1 and 2 if we setup the on-demand slave
> provisioning to last only for one job we will always have clean image
> and dependencies and we can install whatever we want there. Option 3 is
> one shot by default.
>
> I like option 2 or 3 depending on if we use S2I or docker build.
> (I am going to open a debate on S2I vs. docker build in a separate
> thread.)
>
>
> Regards,
> Tomas
>
> [1] - https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.0
> .x-develop/helloworld
>
> _______________________________________________
> kontinuity-dev-public mailing list
> kontinuity-dev-public at redhat.com
> https://www.redhat.com/mailman/listinfo/kontinuity-dev-public
>



-- 
Ben Parees | OpenShift
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kontinuity-dev-public/attachments/20160502/7e3ed948/attachment.htm>


More information about the kontinuity-dev-public mailing list