jenkins #5
Description
Jenkins is an extendable open source continuous integration server that monitors executions of repeated jobs. The focus of Jenkins is the building/testing of software project continuously, and monitoring executions of externally-run jobs. More information at http://jenkins-ci.org/.
This charm provides the Jenkins master service, and when paired with the jenkins-slave charm provides an easy way to deploy Jenkins on Ubuntu server, and scale out Jenkins slaves.
Overview
This charm (along with its companion, jenkins-slave) provides an easy way to deploy Jenkins on Ubuntu server and scale out Jenkins slaves.
This charm provides a Jenkins Server which can be accessed, after exposing, on http://
Usage
If you want to run jobs on separate nodes you will also need to deploy the jenkins-slave charm:
juju deploy jenkins
juju deploy -n 5 jenkins-slave
juju add-relation jenkins jenkins-slave
The default password for the 'admin' account will be auto-generated.
You can set it using:
juju set jenkins password=mypassword
Always change it this way - this account is used by the charm to manage slave configuration.
Then feel free to expose your Jenkins master:
juju expose jenkins
The Jenkins UI will be accessible on http://
Scale out Usage
The main method to use the Jenkins service at scale is to add units to the jenkins-slave, as illustrated in the example usage:
juju deploy -n 5 jenkins-slave
Here the "-n 5" is adding 5 additional units (instances) to the jenkins-slave. Of course that "5" can be as large as you wish or you cloud provider supports. Additional information on scaling services with add-unit can be found at Juju Scaling Docs.
Configuration
You have already seen the password configuration in the "Usage" section. Some other interesting config options are plugins and release. You can add config options via the command line with juju set or via a config file. More information on Juju config is at Juju Config Docs.
Plugin config example
juju set jenkins plugins=htmlpublisher view-job-filters bazaar git
Release config example
juju set jenkins release=trunk
You could also set these config options via a config.yaml on jenkins deploy. For example your config.yaml could look like
jenkins:
plugins: htmlpublisher view-job-filters bazaar git
release: trunk
You would then deploy jenkins with your config such as:
juju deploy --config config.yaml jenkins
Extending this charm
If you wish to perform custom configuration of either the master or slave services, you can branch this charm and add install hooks into hooks/install.d.
These will be executed when the main install, config-changed or upgrade-charm hooks are executed (as the config-changed and upgrade-charm hooks just call install)..
Additional hooks are executed in the context of the install hook so may use any variables which are defined in this hook.
Jenkins Project Information
Configuration
- extra_packages
- (string) Space separated list of extra deb packages to install.
- install_keys
- (string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
- install_sources
- (string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
- master-executors
- (int) Number of executors to configure for jenkins master.
- 1
- package_status
- (string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
- install
- password
- (string) Admin user password - used to manage slave nodes so please don't change in Jenkins.
- plugins
- (string) Space separated list of plugins to install
- plugins-check-certificate
- (string) Set to no to allow downloading from an invalid https site.
- yes
- plugins-site
- (string) Site to download plugin .hpi files from.
- https://updates.jenkins-ci.org/latest/
- release
- (string) Source of Jenkins, options include: - lts: use the most recent Jenkins LTS release. - trunk: use the most recent Jenkins release. - bundle: use a bundled deb package. The jenkins deb package needs to be manually copied over to the charm files/ dir before deployment and named jenkins.deb. It can be downloaded from http://pkg.jenkins-ci.org/debian/ - http(s)://...: http(s) link to a retrievable jenkins deb
- lts
- remove-unlisted-plugins
- (string) Set this to yes to remove any plugins not listed in plugins from the installation.
- no
- tools
- (string) Tooling to deploy alongside jenkins
- git gcc make bzr
- username
- (string) Admin user username - used to manage slave nodes so please don't change in Jenkins.
- admin