Bug 1368916

Summary: Cannot find "sample-pipeline" item in jenkins webconsole
Product: OpenShift Container Platform Reporter: Dongbo Yan <dyan>
Component: ImageStreamsAssignee: Ben Parees <bparees>
Status: CLOSED NEXTRELEASE QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, bparees, dyan, jokerman, mmccomas, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
: 1374127 (view as bug list) Environment:
Last Closed: 2016-09-19 09:03:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1368888    
Bug Blocks:    

Description Dongbo Yan 2016-08-22 06:13:47 UTC
Description of problem:
After jenkins is deployed, cannot find "sample-pipeline" item in jenkins webconsole

Version-Release number of selected component (if applicable):
openshift3/jenkins-1-rhel7 (19bc08e9d803)

How reproducible:
Always

Steps to Reproduce:
1.Create a pipeline build
 $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
2.Login in jenkins, check item info
3.

Actual results:
Cannot find "sample-pipeline" item

Expected results:
"sample-pipeline" item exists

Additional info:
Could trigger pipeline build, build successfully, but cannot check buildlog

Comment 1 Ben Parees 2016-08-22 15:31:32 UTC
Does this occur with the pulp rhel jenkins image?  the public image is not yet up to date.

Also I don't see a step where you created the jenkins service/deployment, but since autoprovisioning is now disabled, I assume you did, right?

Comment 3 Dongbo Yan 2016-08-23 02:06:10 UTC
When I create a pipeline application, it still can auto deploy jenkins

openshift v3.3.0.23-dirty
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

Comment 4 Ben Parees 2016-08-23 02:22:23 UTC
You're saying you were able to start the pipeline build and it completed successfully, but there is no jenkins job definition in the jenkins console?

Comment 5 Dongbo Yan 2016-08-23 02:28:31 UTC
yes, only "Openshift Sample" item in the jenkins console, item "sample-pipeline" is not existing

Comment 6 Dongbo Yan 2016-08-23 02:31:15 UTC
And there is no jenkins job definition in the jenkins webconsole, but I can see the slave node

Comment 7 Ben Parees 2016-08-23 20:00:32 UTC
I can't recreate this using the latest pulp image that was built today, can you retry w/ that image and if you're still seeing an issue, please gather the logs from the jenkins pod?

Comment 8 Dongbo Yan 2016-08-24 10:46:35 UTC
Test with
brew-pulp...openshift3/jenkins-1-rhel7             latest     7e4706a0e228

openshift v3.3.0.24-dirty
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

step:
1.Create a pipeline build
 $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
2.Create a jenkins
 $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json

cannot reproduce this issue any more.

Due to Jenkins server is not automatically instantiated in ose3.3.0.24, I have tried to enable autoprovisioning in master-config.yaml, like:
kubernetesMasterConfig:
  jenkinsPipelineConfig:
    enabled: true
    templateNamespace: openshift
    templateName: jenkins-ephemeral
    serviceName: jenkins

But it does not work, how can I enable autoprovisioning.

Comment 9 Ben Parees 2016-08-24 14:54:54 UTC
Did you "oc create -f jenkins-ephemeral-template.json -n openshift" ?

What happens when you create a new pipeline buildconfig with the provisioner enabled?

Comment 10 Ben Parees 2016-08-24 15:02:56 UTC
I think the docs may be wrong, investigating.

Comment 11 Ben Parees 2016-08-24 15:47:22 UTC
ok so there are two issues:

1) the "enabled" field was named wrong and i'm fixing that here:
https://github.com/openshift/origin/pull/10612

2) the instructions weren't very good and i'm fixing that here:
https://github.com/openshift/openshift-docs/pull/2725

What you need to do is add the following to your master config:
jenkinsPipelineConfig:
  autoProvisionEnabled: true
  serviceName: jenkins
  templateName: jenkins-ephemeral
  templateNamespace: openshift


that goes at the top level of the file, it's not nested under anything.

and until 10612 merges, you will need to specify "enabled: true" instead of "autoProvisionEnabled: true"

Comment 12 Ben Parees 2016-08-24 15:49:19 UTC
Note that if you use the "openshift start --write-config" flag you can generate a proper config and then just edit that file, find the "jenkinsPipelineConfig" section, and change the "enabled" field from false to true (and change the templateName if needed)

Comment 13 Dongbo Yan 2016-08-25 02:28:50 UTC
Verified with
openshift v3.3.0.24-dirty
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

Add following into master config
jenkinsPipelineConfig:
  enabled: true
  serviceName: jenkins
  templateName: jenkins-ephemeral
  templateNamespace: openshift

It works, thanks