Skip to content

switch to generated password for jenkins service #10163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ Steps
6. Create the sample application configuration

$ oc new-app application-template.json

Note the generated password (JENKINS_PASSWORD) reported in the new-app output, you will need it to login to Jenkins. If you lose this value
you can retrieve it by looking at the environment variable values defined on the jenkins deployment configuration in the web console or by
running:

$ oc env dc/jenkins --list | grep JENKINS_PASSWORD

7. Open the Jenkins service ip:port from step 5 in your browser. Once it is available, login using username `admin` and password `password`.
7. Open the Jenkins service ip:port from step 5 in your browser. Once it is available, login using username `admin` and the password from the previous step.

8. Select the the `OpenShift Sample` job and click `Configure`. You'll see a series of Jenkins build steps defined. These build steps are from the Jenkins plugin for V3 Openshift. Read about the [OpenShift Jenkins plugin](https://github.com/openshift/jenkins-plugin) for details on the various functionality provided. The default values for each of the various build steps listed for the sample job should work as is. You can save your changes to the job, click `Build` and skip to step 11.

Expand Down
4 changes: 3 additions & 1 deletion examples/jenkins/jenkins-ephemeral-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"tags": "instant-app,jenkins"
}
},
"message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}.",
"objects": [
{
"kind": "Route",
Expand Down Expand Up @@ -172,7 +173,8 @@
"displayName": "Jenkins Password",
"description": "Password for the Jenkins 'admin' user.",
"generate": "expression",
"value": "password"
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MEMORY_LIMIT",
Expand Down
4 changes: 3 additions & 1 deletion examples/jenkins/jenkins-persistent-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"tags": "instant-app,jenkins"
}
},
"message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}.",
"objects": [
{
"kind": "Route",
Expand Down Expand Up @@ -189,7 +190,8 @@
"displayName": "Jenkins Password",
"description": "Password for the Jenkins 'admin' user.",
"generate": "expression",
"value": "password"
"from": "[a-zA-Z0-9]{16}",
"required": true
},
{
"name": "MEMORY_LIMIT",
Expand Down
10 changes: 9 additions & 1 deletion examples/jenkins/pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ jenkins template represented by jenkinstemplate.json by running these commands a
You should not need to access the jenkins console for anything, but if you want to configure settings or watch the execution,
here are the steps to do so:

First you must determine the jenkins password which was randomly generated for you:

$ oc env dc/jenkins --list | grep JENKINS_PASSWORD

The value will appear as:

JENKINS_PASSWORD=faUXMOFUhRYXO2Gx

If you have a router running (`oc cluster up` provides one), run:

$ oc get route
Expand All @@ -48,7 +56,7 @@ jenkins template represented by jenkinstemplate.json by running these commands a

If you do not have a router, you can access jenkins directly via the service ip. Determine the jenkins service ip ("oc get svc") and go to it in your browser on port 80. Do not confuse it with the jenkins-jnlp service.

The login/password are `admin/password`.
Login with the user name is `admin` and the password as determined above.

6. Launch a new build

Expand Down
8 changes: 5 additions & 3 deletions examples/jenkins/pipeline/jenkinstemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"tags": "instant-app,jenkins"
}
},
"message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}.",
"objects": [
{
"kind": "Route",
Expand Down Expand Up @@ -243,12 +244,13 @@
{
"name": "JENKINS_PASSWORD",
"displayName": "Jenkins Password",
"description": "Password for the Jenkins user.",
"description": "Password for the Jenkins 'admin' user.",
"generate": "expression",
"value": "password"
"from": "[a-zA-Z0-9]{16}",
"required": true
}
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, yes, sorry I was describing the dc and looking at the wrong field. Works for me.

"labels": {
"template": "jenkins-ephemeral-template"
"template": "jenkins-pipeline-template"
}
}
3 changes: 1 addition & 2 deletions examples/jenkins/pipeline/samplepipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "route-edge",
"name": "frontend",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"creationTimestamp": null
},
"spec": {
"host": "www.example.com",
"to": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"kind": "Service",
"name": "frontend"
Expand Down
11 changes: 6 additions & 5 deletions pkg/bootstrap/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.