Skip to content

Commit

Permalink
switch to generated password for jenkins service
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Aug 2, 2016
1 parent 074e084 commit 47fc874
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 12 deletions.
8 changes: 7 additions & 1 deletion examples/jenkins/README.md
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
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
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
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
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
}
],
"labels": {
"template": "jenkins-ephemeral-template"
"template": "jenkins-pipeline-template"
}
}
3 changes: 1 addition & 2 deletions examples/jenkins/pipeline/samplepipeline.json
Expand Up @@ -82,11 +82,10 @@
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "route-edge",
"name": "frontend",
"creationTimestamp": null
},
"spec": {
"host": "www.example.com",
"to": {
"kind": "Service",
"name": "frontend"
Expand Down
8 changes: 5 additions & 3 deletions pkg/bootstrap/bindata.go

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

0 comments on commit 47fc874

Please sign in to comment.