diff --git a/website/content/en/_index.html b/website/content/en/_index.html index f942ac85..ba83748d 100644 --- a/website/content/en/_index.html +++ b/website/content/en/_index.html @@ -34,7 +34,7 @@ AWS EBS volume attach/detach issue when using PVC {{% blocks/feature icon="fas fa-cogs" title="Better configuration as code" %}} -Use groovy scripts or casc to configure your Jenkins instance +Use groovy scripts or JCasC to configure your Jenkins instance {{% /blocks/feature %}} diff --git a/website/content/en/docs/Developer Guide/_index.md b/website/content/en/docs/Developer Guide/_index.md index 518fb855..251ef7e9 100644 --- a/website/content/en/docs/Developer Guide/_index.md +++ b/website/content/en/docs/Developer Guide/_index.md @@ -94,12 +94,12 @@ $ make minikube-start $ eval $(minikube docker-env) ``` -Build Docker image inside provided Linux container by: +Build a Docker image inside the provided Linux container by: ```bash $ make indocker ``` -Build **Jenkins Operator** inside container using: +Build **Jenkins Operator** inside a container using: ```bash @@ -129,7 +129,7 @@ Run: make deepcopy-gen ``` -### Getting Jenkins URL and basic credentials +### Getting the Jenkins URL and basic credentials ```bash minikube service jenkins-operator-http- --url diff --git a/website/content/en/docs/Getting Started/v0.1.1/aks.md b/website/content/en/docs/Getting Started/v0.1.1/aks.md index ebc9a3f8..5f3712f0 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/aks.md +++ b/website/content/en/docs/Getting Started/v0.1.1/aks.md @@ -7,7 +7,7 @@ description: > Additional configuration for Azure Kubernetes Service --- -Azure AKS managed Kubernetes service adds to every pod the following envs: +Azure AKS managed Kubernetes service adds to every pod the following environment variables: ```yaml - name: KUBERNETES_PORT_443_TCP_ADDR @@ -20,5 +20,5 @@ Azure AKS managed Kubernetes service adds to every pod the following envs: value: ``` -The operator is aware of it and omits these envs when checking if Jenkins pod envs have been changed. It prevents -restart Jenkins pod over and over again. +The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents +the restart of a Jenkins pod over and over again. diff --git a/website/content/en/docs/Getting Started/v0.1.1/configuration.md b/website/content/en/docs/Getting Started/v0.1.1/configuration.md index 23824347..dd91c6b2 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/configuration.md +++ b/website/content/en/docs/Getting Started/v0.1.1/configuration.md @@ -47,7 +47,7 @@ pipelineJob('build-jenkins-operator') { } ``` -**cicd/jobs/build.jenkins** it's an actual Jenkins pipeline: +**cicd/jobs/build.jenkins** is an actual Jenkins pipeline: ``` #!/usr/bin/env groovy @@ -118,13 +118,13 @@ spec: repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git ``` -**Jenkins Operator** will automatically discover and configure all seed jobs. +**Jenkins Operator** will automatically discover and configure all the seed jobs. -You can verify if deploy keys were successfully configured in Jenkins **Credentials** tab. +You can verify if deploy keys were successfully configured in the Jenkins **Credentials** tab. ![jenkins](/kubernetes-operator/img/jenkins-credentials.png) -You can verify if your pipelines were successfully configured in Jenkins Seed Job console output. +You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output. ![jenkins](/kubernetes-operator/img/jenkins-seed.png) @@ -163,7 +163,7 @@ If key was generated by `ssh-keygen` the public key content is located in ` in namespace where Jenkins CR has been deployed. +The operator automatically generates a Jenkins username and password and stores it in Kubernetes secret named +`jenkins-operator-credentials-` in the namespace where Jenkins CR has been deployed. If you want change it you can override the secret: @@ -263,7 +263,7 @@ data: password: ``` -If needed **Jenkins Operator** will restart Jenkins master pod and then you can login with the new user and password +If needed **Jenkins Operator** will restart the Jenkins master pod and then you can login with the new username and password credentials. ## Override default Jenkins container command @@ -277,7 +277,7 @@ command: - /var/jenkins/scripts/init.sh && /sbin/tini -s -- /usr/local/bin/jenkins.sh ``` -The script`/var/jenkins/scripts/init.sh` is provided be the operator and configures init.groovy.d(creates Jenkins user) +The script`/var/jenkins/scripts/init.sh` is provided by the operator and configures init.groovy.d (creates the Jenkins user) and installs plugins. The `/sbin/tini -s -- /usr/local/bin/jenkins.sh` command runs the Jenkins master main process. diff --git a/website/content/en/docs/Getting Started/v0.1.1/configure-backup-and-restore.md b/website/content/en/docs/Getting Started/v0.1.1/configure-backup-and-restore.md index 87740176..086df451 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/configure-backup-and-restore.md +++ b/website/content/en/docs/Getting Started/v0.1.1/configure-backup-and-restore.md @@ -7,11 +7,11 @@ description: > Prevent loss of job history --- -Backup and restore is done by container sidecar. +Backup and restore is done by a container sidecar. #### Create PVC -Save to file pvc.yaml: +Save to the file named pvc.yaml: ```yaml apiVersion: v1 kind: PersistentVolumeClaim @@ -26,7 +26,7 @@ spec: storage: 500Gi ``` -Run command: +Run the following command: ```bash $ kubectl -n create -f pvc.yaml ``` @@ -47,7 +47,7 @@ spec: containers: - name: jenkins-master image: jenkins/jenkins:lts - - name: backup # container responsible for backup and restore + - name: backup # container responsible for the backup and restore env: - name: BACKUP_DIR value: /backup @@ -72,13 +72,13 @@ spec: exec: command: - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh , is passed by operator - interval: 30 # how often make backup in seconds - makeBackupBeforePodDeletion: true # make backup before pod deletion + interval: 30 # how often to make a backup, in seconds + makeBackupBeforePodDeletion: true # make a backup before pod deletion restore: - containerName: backup # container name is responsible for restore backup + containerName: backup # container name is responsible to restore the backup action: exec: command: - - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh , is passed by operator + - /home/user/bin/restore.sh # this command is invoked on "backup" container to restore the backup, for example /home/user/bin/restore.sh , is passed by operator #recoveryOnce: # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored ``` diff --git a/website/content/en/docs/Getting Started/v0.1.1/customization.md b/website/content/en/docs/Getting Started/v0.1.1/customization.md index 6bc896be..611d7361 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/customization.md +++ b/website/content/en/docs/Getting Started/v0.1.1/customization.md @@ -7,12 +7,12 @@ description: > How to customize Jenkins --- -Jenkins can be customized using groovy scripts or the configuration as code plugin. All custom configuration is stored in -the **jenkins-operator-user-configuration-** ConfigMap which is automatically created by the **Jenkins Operator**. +Jenkins can be customized using by groovy scripts or the Jenkins Configuration as Code Plugin. All custom configuration is stored in +the **jenkins-operator-user-configuration-** ConfigMap, which is automatically created by the **Jenkins Operator**. The **Jenkins Operator** creates a **jenkins-operator-user-configuration-** secret where the user can store sensitive information used for custom configuration. If you have an entry in the secret named `PASSWORD` then you can use it in the -Configuration as Plugin as `adminAddress: "${PASSWORD}"`. +Jenkins Configuration as Code Plugin as `adminAddress: "${PASSWORD}"`. ``` kubectl get secret jenkins-operator-user-configuration- -o yaml @@ -63,8 +63,8 @@ metadata: namespace: default ``` -When the **jenkins-operator-user-configuration-** ConfigMap is updated Jenkins automatically -runs the **jenkins-operator-user-configuration** Jenkins Job which executes all scripts then +When the **jenkins-operator-user-configuration-** ConfigMap is updated, Jenkins automatically +runs the **jenkins-operator-user-configuration** Jenkins Job which executes all scripts, and then runs the **jenkins-operator-user-configuration-casc** Jenkins Job which applies the Configuration as Code configuration. ## Install Plugins @@ -104,13 +104,11 @@ spec: - name: job-dsl version: "1.76" - name: configuration-as-code - version: "1.29" - - name: configuration-as-code-support - version: "1.19" + version: "1.31" - name: kubernetes-credentials-provider version: 0.12.1 ``` You can change their versions. -Then the **Jenkins Operator** will automatically install those plugins after the Jenkins master pod restart. +The **Jenkins Operator** will then automatically install those plugins after the Jenkins master pod restart. diff --git a/website/content/en/docs/Getting Started/v0.1.1/deploy-jenkins.md b/website/content/en/docs/Getting Started/v0.1.1/deploy-jenkins.md index 11ece335..ae23a603 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/deploy-jenkins.md +++ b/website/content/en/docs/Getting Started/v0.1.1/deploy-jenkins.md @@ -9,8 +9,8 @@ description: > ## Deploy Jenkins -Once jenkins-operator is up and running let's deploy actual Jenkins instance. -Create manifest ie. **jenkins_instance.yaml** with following data and save it on drive. +Once the **Jenkins Operator** is up and running let's deploy an actual Jenkins instance. +Create a manifest ie. **jenkins_instance.yaml** with following data and save it on drive. ```bash apiVersion: jenkins.io/v1alpha2 @@ -58,31 +58,31 @@ spec: repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git ``` -Deploy Jenkins to K8s: +Deploy a Jenkins to K8s: ```bash kubectl create -f jenkins_instance.yaml ``` -Watch Jenkins instance being created: +Watch the Jenkins instance being created: ```bash kubectl get pods -w ``` -Get Jenkins credentials: +Get the Jenkins credentials: ```bash kubectl get secret jenkins-operator-credentials- -o 'jsonpath={.data.user}' | base64 -d kubectl get secret jenkins-operator-credentials- -o 'jsonpath={.data.password}' | base64 -d ``` -Connect to Jenkins (minikube): +Connect to the Jenkins Operator (minikube): ```bash minikube service jenkins-operator-http- --url ``` -Connect to Jenkins (actual Kubernetes cluster): +Connect to the Jenkins intance (actual Kubernetes cluster): ```bash kubectl port-forward jenkins- 8080:8080 diff --git a/website/content/en/docs/Getting Started/v0.1.1/diagnostics.md b/website/content/en/docs/Getting Started/v0.1.1/diagnostics.md index 8282cae2..1d2ec29f 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/diagnostics.md +++ b/website/content/en/docs/Getting Started/v0.1.1/diagnostics.md @@ -35,7 +35,7 @@ kubectl logs deployment/jenkins-operator ## Troubleshooting -Delete Jenkins master pod and wait for the new one to come up: +Delete the Jenkins master pod and wait for the new one to come up: ```bash kubectl delete pod jenkins- diff --git a/website/content/en/docs/Getting Started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2.md b/website/content/en/docs/Getting Started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2.md index 5bae084b..f89d55a9 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2.md +++ b/website/content/en/docs/Getting Started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2.md @@ -7,10 +7,10 @@ description: > How to migrate to new CRD manifest --- -Please not that **CRD manifests are global**, not namespaced, so every jenkins operator running on the cluster +Please note that **CRD manifests are global**, not namespaced, so every **Jenkins operator** running on the cluster will be impacted by the new CRD manifest. Multiple operator instances with different versions *should* continue to work. -## Stop jenkins-operator pod +## Stop the jenkins-operator pod Run command: ```bash @@ -18,13 +18,13 @@ $ kubectl -n scale deployment.apps/jenkins-operator --replicas=0 deployment.apps/jenkins-operator scaled ``` -Desired state: +Verify the desired state, by running this command: ```bash $ kubectl -n get po No resources found. ``` -## Stop Jenkins master pod +## Stop the Jenkins master pod Run command: ```bash @@ -35,7 +35,7 @@ $ kubectl -n get delete po jenkins-operator- pod "jenkins-operator-" deleted ``` -Desired state: +Verify the desired state, by running this command: ```bash $ kubectl -n get po No resources found. @@ -91,7 +91,7 @@ spec: ... ``` -See also the examples bellow for more details. For even more details please look at the source code. +See also the examples below for more details. For even more details please look at the source code. Code that defines the data structures can be found [here](v0.1.1/jenkins-v1alpha2-scheme.md) ### Examples @@ -305,21 +305,21 @@ spec: version: 2.24 ``` -## Update CRD to new version +## Update CRD to a new version -New version of the Custom Resource definition for the operator needs to be applied: +A new version of the Custom Resource Definition for the operator needs to be applied: -[Jenkins CRD v1alpha2](https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml) -To use default CRD file: +To use the default CRD file: ``` kubectl -n apply -f https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml ``` -## Update RBAC to new version +## Update RBAC to a new version -New operator version requires updated RBAC permissions: +A new operator version requires updated RBAC permissions: -To use default Role file: +To use the default Role file: ``` $ kubectl -n apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/role.yaml ``` diff --git a/website/content/en/docs/Getting Started/v0.1.1/scheme.md b/website/content/en/docs/Getting Started/v0.1.1/scheme.md index 4bf11afd..fc5c3591 100644 --- a/website/content/en/docs/Getting Started/v0.1.1/scheme.md +++ b/website/content/en/docs/Getting Started/v0.1.1/scheme.md @@ -19,7 +19,7 @@ This document contains API scheme for `jenkins-operator` manifest

jenkins.io

-

Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group

+

Package v1alpha2 contains the API Schema definitions for the jenkins.io v1alpha2 API group

Resource Types:
  • @@ -108,7 +108,7 @@ Every single change here requires a pod restart.

    (Optional) -

    SeedJobs defines list of Jenkins Seed Job configurations +

    SeedJobs defines a list of Jenkins Seed Job configurations More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

    @@ -123,7 +123,7 @@ Service (Optional) -

    Service is Kubernetes service of Jenkins master HTTP pod +

    Service is the Kubernetes service of the Jenkins master HTTP pod Defaults to : port: 8080 type: ClusterIP

    @@ -140,7 +140,7 @@ Service (Optional) -

    Service is Kubernetes service of Jenkins slave pods +

    Service is the Kubernetes service of the Jenkins slave pods Defaults to : port: 50000 type: ClusterIP

    @@ -157,7 +157,7 @@ Backup (Optional) -

    Backup defines configuration of Jenkins backup +

    Backup defines the configuration of a Jenkins backup More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

    @@ -172,7 +172,7 @@ Restore (Optional) -

    Backup defines configuration of Jenkins backup restore +

    Backup defines the configuration of a Jenkins backup restore More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

    @@ -201,7 +201,7 @@ JenkinsStatus JenkinsSpec)

    -

    Backup defines configuration of Jenkins backup

    +

    Backup defines the configuration of Jenkins backup

    @@ -232,7 +232,7 @@ Handler @@ -243,7 +243,7 @@ uint64 @@ -255,7 +255,7 @@ bool @@ -267,7 +267,7 @@ bool JenkinsStatus)

    -

    Build defines Jenkins Build status with corresponding metadata

    +

    Build defines the Jenkins Build status with corresponding metadata

    -

    Action defines action which performs backup in backup container sidecar

    +

    Action defines the action which performs the backup in the backup container sidecar

    -

    Interval tells how often make backup in seconds +

    Interval tells you how often the backup is made in seconds Defaults to 30.

    -

    MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion

    +

    MakeBackupBeforePodDeletion tells the operator to make a backup before Jenkins master pod deletion

    @@ -320,7 +320,7 @@ BuildStatus @@ -331,7 +331,7 @@ int @@ -369,7 +369,7 @@ Kubernetes meta/v1.Time Build)

    -

    BuildStatus defines type of Jenkins build job status

    +

    BuildStatus defines the type of Jenkins build job status

    Container

    @@ -378,7 +378,7 @@ Kubernetes meta/v1.Time JenkinsMaster)

    -

    Container defines Kubernetes container attributes

    +

    Container defines the Kubernetes container attributes

    -

    Status is the status of Jenkins build

    +

    Status is the status of a Jenkins build

    -

    Retires is the amount of Jenkins job build retries

    +

    Retires is the amount of times a Jenkins job build retries

    @@ -568,7 +568,7 @@ Kubernetes core/v1.Probe @@ -583,7 +583,7 @@ Kubernetes core/v1.Probe @@ -658,7 +658,7 @@ Kubernetes core/v1.ExecAction SeedJob)

    -

    JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism

    +

    JenkinsCredentialType defines type of Jenkins credential used in the seed job mechanism

    JenkinsMaster

    @@ -860,7 +860,7 @@ JenkinsMaster @@ -890,7 +890,7 @@ Service @@ -939,7 +939,7 @@ Restore @@ -985,7 +985,7 @@ Kubernetes meta/v1.Time @@ -1027,7 +1027,7 @@ Kubernetes meta/v1.Time @@ -1039,7 +1039,7 @@ uint64 @@ -1075,7 +1075,7 @@ bool @@ -1087,7 +1087,7 @@ string @@ -1099,7 +1099,7 @@ string @@ -1129,7 +1129,7 @@ string @@ -1140,7 +1140,7 @@ string @@ -1152,7 +1152,7 @@ string JenkinsSpec)

    -

    Restore defines configuration of Jenkins backup restore operation

    +

    Restore defines the configuration of a Jenkins backup restore operation

    (Optional)

    Periodic probe of container liveness. -Container will be restarted if the probe fails.

    +The container will be restarted if the probe fails.

    (Optional)

    Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

    +The container will be removed from service endpoints if the probe fails.

    -

    Master represents Jenkins master pod properties and Jenkins plugins. +

    Master represents the Jenkins master pod properties and Jenkins plugins. Every single change here requires a pod restart.

    (Optional) -

    Service is Kubernetes service of Jenkins master HTTP pod +

    Service is the Kubernetes service of the Jenkins master HTTP pod Defaults to : port: 8080 type: ClusterIP

    @@ -907,7 +907,7 @@ Service
    (Optional) -

    Service is Kubernetes service of Jenkins slave pods +

    Service is the Kubernetes service of the Jenkins slave pods Defaults to : port: 50000 type: ClusterIP

    @@ -924,7 +924,7 @@ Backup
    (Optional) -

    Backup defines configuration of Jenkins backup +

    Backup defines the configuration of the Jenkins backup More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

    (Optional) -

    Backup defines configuration of Jenkins backup restore +

    Backup defines the configuration of the Jenkins backup restore More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

    (Optional) -

    ProvisionStartTime is a time when Jenkins master pod has been created

    +

    ProvisionStartTime is a time when the Jenkins master pod has been created

    (Optional) -

    Builds contains Jenkins builds statues

    +

    Builds contains the Jenkins builds statues

    (Optional) -

    RestoredBackup is the restored backup number after Jenkins master pod restart

    +

    RestoredBackup is the restored backup number after the Jenkins master pod restart

    (Optional) -

    BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

    +

    BackupDoneBeforePodDeletion tells if a backup before pod deletion has been made

    (Optional) -

    UserAndPasswordHash is a SHA256 hash made from user and password

    +

    UserAndPasswordHash is a SHA256 hash made from the username and password

    (Optional) -

    CreatedSeedJobs contains list of seed job id already created in Jenkins

    +

    CreatedSeedJobs contains list of seed job ids already created in Jenkins

    -

    Name is the name of Jenkins plugin

    +

    Name is the name of the Jenkins plugin

    -

    Version is the version of Jenkins plugin

    +

    Version is the version of the Jenkins plugin

    @@ -1170,7 +1170,7 @@ string @@ -1183,7 +1183,7 @@ Handler @@ -1195,7 +1195,7 @@ uint64 @@ -1260,7 +1260,7 @@ string @@ -1271,7 +1271,7 @@ string @@ -1308,7 +1308,7 @@ JenkinsCredentialType JenkinsSpec)

    -

    Service defines Kubernetes service attributes

    +

    Service defines the Kubernetes service attributes

    -

    ContainerName is the container name responsible for restore backup operation

    +

    ContainerName is the container name responsible for the restore backup operation

    -

    Action defines action which performs restore backup in restore container sidecar

    +

    Action defines action which performs the restore backup in a restore container sidecar

    (Optional) -

    RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

    +

    RecoveryOnce if you want to restore a specific backup, set this field, and then Jenkins will be restarted and the desired backup will be restored

    -

    Targets is the repository path where are seed job definitions

    +

    Targets is the repository path where the seed job definitions are

    -

    RepositoryBranch is the repository branch where are seed job definitions

    +

    RepositoryBranch is the repository branch where the seed job definitions are

    @@ -1384,7 +1384,7 @@ int32 @@ -1398,8 +1398,8 @@ int32 @@ -1413,8 +1413,8 @@ More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/

    -

    The port that are exposed by this service. +

    The port that is exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

    (Optional)

    The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. +Usually assigned by the system. If specified, it will be allocated to the service, +if unused, or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport