Sign inSign up

beedemo/cje-mm

By beedemo

•Updated about 8 years ago

Customized version of CloudBees Jenkins Enterprise Managed Master Docker image.

Image
5

6.5K

beedemo/cje-mm repository overview

⁠CloudBees Jenkins Enterprise

⁠Custom Managed Master Docker Image

This repository provides an example for creating a custom Docker image to use as a Managed Master⁠ Docker image template to be provisioned by CloudBees Jenkions Operations Center running on the CloudBees Jenkins Enterprise cluster.

The image is configured to skip Jenkins 2 Setup Wizard, install all of the CloudBees recommended plugins and some additional plugins typically used by CloudBees SAs in demos and workshops, and auto-configure Jenkins. This config-as-code results in a streamlined CJE Cluster Managed Master provisioning process.

⁠Dockerfile
  • The Dockerfile starts with a FROM value of the CloudBees Managed Master Docker image: cloudbees/cje-mm.
  • The RUN /usr/local/bin/install-plugins.sh $(cat plugins.txt) command installs all the plugins.
  • The quickstart scripts modifies the Master configuration as specified below
⁠Plugins installed:

See the plugins.txt⁠ file to see all the plugins that get installed - some non-CJE standard plugins highlights include:

  • Blue Ocean with the Blue Ocean Pipeline Editor
  • HipChat plugin
  • Slack plugin

Note, the install-plugins.sh script will download the specified plugins and their dependencies at build time and include them in the image; it also inspects the Jenkins WAR and skips any plugins already included by CloudBees (embedded in the WAR).

⁠initilization scripts (Groovy init scripts that run on Jenkins post initialization)
⁠Regular init scripts (on startup)
  • init_99_save.groovy: Ensures any previous configuration changes are saved, sets flags not to re-run certain scripts; currently not much done here as we prefer to wait for the CJE license to be activated
⁠License Activated scripts - utilizes the custom CloudBees license-activated-or-renewed-after-expiration hook that will be fired after your CJE license is activated
  • init_01_install_plugins.groovy: Used to install plugins listed in cje_plugins.txt⁠, but now that is handled by the Dockerfile and this script is only used to trigger another custom groovy hook
⁠Quickstart scripts - a custom init groovy hook that fires after required plugins are installed and after a necessary restart
  • init_03_global_pipeline_library.groovy: Configures a Pipeline Global Shared Library from this repository https://github.com/beedemo/workflowLibs⁠ - see the Jenkins Pipeline documentation for Extending with Shared Libraries ⁠
  • init_04_pipeline_model-def_config.groovy: Configures the agent label to be used for Pipeline Declarative Docker syntax. This is not documented very well, but there is a global and per folder setting to tell Declarative Pipeline what Jenkins agent label to use when using the `` syntax - to ensure that the underlying Pipeline Model Definition will be able to spin up the Docker image to use inside the agent.
  • init_07_palace_one_shot_config.groovy: CJE includes an awesome Share Agent Cloud provisioner called Palace⁠. One of the features of Palace is to use the One Shot Executor Strategy⁠, but because that strategy does not support Pipeline resumption, it is disabled by default. This script enables it by default - because it makes agent provisioning super fast!
  • init_12_http_request_global_config.groovy: Creates Basic Digest Authentication entry for HttpRequest plugin for use with the Pipeline External shared libraries - REQUIRES environment variable ES_AUTH_CREDENTIALS_ID to be set to Jenkins Credential ID for Elasticsearch
  • init_15_slack_notifier_config.groovy: Configures the global settings for the Slack Notification plugin so the Managed Master will be able to send notifications to the Slack #ci channel of the beedemo-team sub-domain.

Tag summary

Content type

Image

Digest

Size

485.9 MB

Last updated

over 8 years ago

docker pull beedemo/cje-mm