Jenkins + Docker on Atomic Host

215 views
Skip to first unread message

Rishabh Das

unread,
Feb 17, 2016, 6:49:53 AM2/17/16
to jenkins...@googlegroups.com
Hi,

I was trying to configure a Jenkins job to spin a docker container on the Atomic Host.  I configured Jenkins Docker plugin and added a Docker cloud and a Docker template for the image to be used. 
I attached a label to the docker image. While selecting 'Restrict where the project can be run' in the Jenkins job configuration, I specify the label. 
However it says 'Label is serviced by no nodes and 1 cloud'. Attached is a screenshot. While I build the job, the job status is Pending - waiting for next available executor.  Can anyone help ? 
 

--
Regards,
Rishabh Das
Jenkins-label.png
Jenkins-pending.png

Rishabh Das

unread,
Feb 19, 2016, 12:46:37 AM2/19/16
to jenkins...@googlegroups.com
Anyone facing similar issue ?

Baptiste Mathus

unread,
Feb 19, 2016, 1:13:46 AM2/19/16
to jenkins...@googlegroups.com

Which image did you use for the docker provisioned agents? Did you configure the authentication?

Also: nothing in the logs while waiting?

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAN%2BLNmprMXhP10hMDc_g1LWpvagNqxw7Wqw55tucNvYKfNd4%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Rishabh Das

unread,
Feb 19, 2016, 1:35:59 AM2/19/16
to jenkins...@googlegroups.com
I used the fedora base image. I created a docker file which uses the Fedora image, adds Jenkins public key to authorized_keys in the container.
I added the same in credentials in Jenkins.

test connection for the Atomic host is successful. It returns the version number. Attached are 2 screenshots of how the system is configured.


For more options, visit https://groups.google.com/d/optout.
Jenkins-pending1.png
Jenkins-pending2.png

Baptiste Mathus

unread,
Feb 19, 2016, 3:03:30 AM2/19/16
to jenkins...@googlegroups.com

Being able to connect to the docker host is one thing, but it's unrelated to the image you define for use. Did you did for example install and configure sshd in that image?

Rishabh Das

unread,
Feb 23, 2016, 12:15:20 AM2/23/16
to jenkins...@googlegroups.com
It returns the same with every image. I also tried following the Jenkins Docker plugin page documentation on creating a docker image and adding it to Jenkins. Jenkins still returns with 'Label serviced by no nodes and 1 cloud'.


For more options, visit https://groups.google.com/d/optout.

Rishabh Das

unread,
Feb 23, 2016, 1:22:46 AM2/23/16
to jenkins...@googlegroups.com
In jenkins logs I can see:

Feb 23, 2016 6:18:00 AM com.nirima.jenkins.plugins.docker.DockerCloud$1 call
SEVERE: Error in provisioning; template='DockerTemplate{configVersion=2, labelString='jenkins-git', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@3969d03c, remoteFsMapping='', remoteFs='/home/jenkins', instanceCap=5, mode=NORMAL, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@18864415, numExecutors=5, dockerTemplateBase=DockerTemplateBase{image=jenkins-git}, removeVolumes=false, pullStrategy=PULL_LATEST}' for cloud='Docker'
java.lang.NullPointerException
        at com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher.getAddressForSSHD(DockerComputerSSHLauncher.java:126)
        at com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:79)
        at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:393)
        at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:57)
        at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:242)
        at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:239)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Reply all
Reply to author
Forward
0 new messages