1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# 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://<master>:8080.
# Usage
To deploy Jenkins server you will also need to deploy the jenkins-slave charm. This can be done as follows:
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://<master>:8080
## 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](https://juju.ubuntu.com/docs/charms-scaling.html).
# 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](https://juju.ubuntu.com/docs/charms-config.html).
## 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
- [Jenkins Project Website](http://jenkins-ci.org/)
- [Jenkins Bug Tracker](https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking)
- [Jenkins mailing lists](http://jenkins-ci.org/content/mailing-lists)
- [Jenkins Plugins](https://wiki.jenkins-ci.org/display/JENKINS/Plugins)
|