OpenShift CI/CD Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[OpenShift Operations#Subjects|OpenShift Operations]]
* [[OpenShift Operations#Subjects|OpenShift Operations]]
* [[Jenkins and OpenShift]]
* [[OpenShift CI/CD Concepts#Overview|OpenShift CI/CD Concepts]]


=Overview=
=End-to-End Procedures=
 
* [[OpenShift CI/CD Operations - Collocated Persistent Jenkins Set Up|Collocated Jenkins Deployment and Set Up]]
* [[CI/CD Infrastructure Setup]]
 
 
{{Error|ALL THIS MUST BE REFACTORED}}
 
=Resources=
 
This is the memory consumption based on a test installation:
* jenkins/jenkins-jnlp pod: 880 MB
* nexus pod: 1.5 GB
* gogs pod: 140 MB
* gogs postgresql pod: 42 MB
* sonar pod: 2.0 GB
* sonar postgresql pod: 77 MB


=Set Up a CI/CD Pipeline=
=Set Up a CI/CD Pipeline=


{{Internal|OpenShift Set Up a Project-Collocated jenkins-persistent-Based Jenkins|Set Up a Project-Collocated  jenkins-persistent-Based Jenkins}}


{{Internal|OpenShift Set Up a Standalone, cicd-template.yaml-Based Jenkins|Set Up a Standalone, cicd-template.yaml-Based Jenkins}}
 


=Configure the Jenkins Pipeline with Pipeline Plug-In=
=Configure the Jenkins Pipeline with Pipeline Plug-In=
Line 17: Line 32:


Pipeline -> Definition -> Pipeline script:
Pipeline -> Definition -> Pipeline script:
<syntaxhighlight lang='groovy'>
node {
  stage ("Build") {
    echo '*** Build Starting ***'
    openshiftBuild apiURL: 'https://openshift.default.svc.cluster.local', authToken: '', bldCfg: 'hello-nodejs', buildName: '', checkForTriggeredDeployments: 'false', commitID: '', namespace: '', showBuildLogs: 'false', verbose: 'false', waitTime: ''
    openshiftVerifyBuild apiURL: 'https://openshift.default.svc.cluster.local', authToken: '', bldCfg: 'hello-nodejs', checkForTriggeredDeployments: 'false', namespace: '', verbose: 'false'
    echo '*** Build Complete ***'
  }
  stage ("Deploy") {
    echo '*** Deployment Starting ***'
    openshiftDeploy apiURL: 'https://openshift.default.svc.cluster.local', authToken: '', depCfg: 'hello-nodejs', namespace: '', verbose: 'false', waitTime: ''
    openshiftVerifyDeployment apiURL: 'https://openshift.default.svc.cluster.local', authToken: '', depCfg: 'hello-nodejs', namespace: '', replicaCount: '1', verbose: 'false', verifyReplicaCount: 'false', waitTime: ''
    echo '*** Deployment Complete ***'
  }
  stage ("Verify") {
    echo '*** Service Verification Starting ***'
    openshiftVerifyService apiURL: 'https://openshift.default.svc.cluster.local', authToken: '', namespace: '', svcName: 'hello-nodejs', verbose: 'false'
    echo '*** Service Verification Complete ***'
  }
}
</syntaxhighlight>


=Set up Continuous Delivery=
=Set up Continuous Delivery=

Latest revision as of 23:53, 8 December 2017

Internal

End-to-End Procedures



ALL THIS MUST BE REFACTORED

Resources

This is the memory consumption based on a test installation:

  • jenkins/jenkins-jnlp pod: 880 MB
  • nexus pod: 1.5 GB
  • gogs pod: 140 MB
  • gogs postgresql pod: 42 MB
  • sonar pod: 2.0 GB
  • sonar postgresql pod: 77 MB

Set Up a CI/CD Pipeline

Configure the Jenkins Pipeline with Pipeline Plug-In

New Item -> "hello-nodejs-pipeline" -> Pipeline -> OK

Pipeline -> Definition -> Pipeline script:

Set up Continuous Delivery

Set up a development, QA and production project.

TODO: Example: "Continuous Delivery Using OpenShift and Jenkins Pipeline Plug-in" 07 1 CD JEE Lab, Advanced Development on-line class.

Troubleshooting