How to run jobs on oraclelinux container.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to run jobs on oraclelinux container.

pbasanta2002
Hi ,

We have a problem on Jenkins on which container the job will run.

By default jenkins job is using jnlp container to run the Jobs.

inorder to run the jobs on the oraclelinux image.

1. We Successfully created docker-jnlp-slave image with oraclelinux image.
2. Able to pull docker-jnlp-slave image and create container.
3. Jnlp and docker-jnlp-slave(oraclelinux ) 2 containers created.
Test job console output shows that , By default jenkins job is using jnlp container (jenkins/jnlp-slave:alpine)

is there a way to run jobs on oraclelinux container.

Regards,
Basanta

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34b309e6-2bd6-4c57-9e5a-5b3696f247d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

How to run jobs on oraclelinux container.

kuisathaverat
You can build your own docker image based in this https://github.com/jenkinsci/docker-jnlp-slave but extending this one https://hub.docker.com/_/oraclelinux/ , you only need to be sure that Java is in it

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/17ef0c77-872c-4d11-8e5f-7909edcca7a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to run jobs on oraclelinux container.

Jacob Larsen-2
In reply to this post by pbasanta2002

There are 3 ways I know of that allows you to avoid having the Jenkins slave dependency in the container:

1. Use Docker Slaves Plugin

    - Has some limitations, but works for the most part. Supports pipeline at least partially, and can run on dockerized slaves. Will not run directly on existing slaves but will provision on the fly from docker. Only supports one docker host and a single global limit on number of containers.

2. Use Cloudbees Docker Custom build environment plugin

    - A bit old codebase, that does not support newer docker features. Does not support running as a sibling container to a jenkins slave container. No pipeline support. Uses existing slaves that must have docker support, so multiple docker hosts are possible. Someone requested to adopt this plugin some time ago, so this can change over time.

3. Use the Docker Pipeline plugin, specifically the .inside syntax

    - This only supports pipeline, nothing else. Very mature and is the new way to do this. Uses existing slaves that must have docker support, so multiple docker hosts are possible. Supports running as a sibling container to a Jenkins slave container (with docker socket bind mounted).

All 3 have the property that you can use any oracle linux image that you have without worrying about installing the correct JRE version for Jenkins. The actual Jenkins node can be any slave with Docker running.

Note that this has the added bonus that a new container is created for every build, so anything your builds can do to your build environment will not affect future builds.

IMO, your best bet is option 3 if you can, i.e. you have everything running in pipeline.

/Jacob

On 2018-01-16 10:36, [hidden email] wrote:
Hi ,

We have a problem on Jenkins on which container the job will run.

By default jenkins job is using jnlp container to run the Jobs.

inorder to run the jobs on the oraclelinux image.

1. We Successfully created docker-jnlp-slave image with oraclelinux image.
2. Able to pull docker-jnlp-slave image and create container.
3. Jnlp and docker-jnlp-slave(oraclelinux ) 2 containers created.
Test job console output shows that , By default jenkins job is using jnlp container (jenkins/jnlp-slave:alpine)

is there a way to run jobs on oraclelinux container.

Regards,
Basanta
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34b309e6-2bd6-4c57-9e5a-5b3696f247d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f51558b6-912a-e936-db50-15606c5b070e%40larsen.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to run jobs on oraclelinux container.

Dirk Heinrichs-3
Am 17.01.2018 um 20:57 schrieb Jacob Larsen:

1. Use Docker Slaves Plugin

2. Use Cloudbees Docker Custom build environment plugin

3. Use the Docker Pipeline plugin, specifically the .inside syntax


4. Use Docker plugin: Multiple Docker hosts, Container templates must be defined either globally or in job configs (which will then add them to each defined Docker host in the global config). Support SSH and JNLP slaves.

HTH...

    Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenTextTM Discovery | Recommind
Email: [hidden email]
Website: www.recommind.de

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 10646

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/191ddd71-5f8f-aab7-dc3c-5bd5f10815d5%40opentext.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to run jobs on oraclelinux container.

Jacob Larsen-2

Yes. Docker plugin isn't able to separate the build environment from the Jenkins slave though. The images used are more traditional slaves with the jenkins slave daemon running inside the same container, which means that the jenkins slave dependencies must be mixed with the build environment. The one property shared with the 3 first solutions is that they only need the build environments themselves, as the slave daemon runs outside this container.

/Jacob


On 2018-01-18 07:41, Dirk Heinrichs wrote:
Am 17.01.2018 um 20:57 schrieb Jacob Larsen:

1. Use Docker Slaves Plugin

2. Use Cloudbees Docker Custom build environment plugin

3. Use the Docker Pipeline plugin, specifically the .inside syntax


4. Use Docker plugin: Multiple Docker hosts, Container templates must be defined either globally or in job configs (which will then add them to each defined Docker host in the global config). Support SSH and JNLP slaves.

HTH...

    Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenTextTM Discovery | Recommind
Email: [hidden email]
Website: www.recommind.de

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 10646

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/191ddd71-5f8f-aab7-dc3c-5bd5f10815d5%40opentext.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/583f73cb-6d4f-44e8-1e1b-aa7042c43d29%40larsen.net.
For more options, visit https://groups.google.com/d/optout.