Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I already have installed the jenkins charm. My question is how can I configure jenkins before deploy/after installation automatically? I want to authomatically, for example, install the github plugin and set the repository without the use of jenkins manager dashboard.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

The jenkins charm externalizes config for a few different things... including plugins. You can see the current set of configurable bits, as well as their default values, on the config page.

You can set these at deploy-time:

juju deploy --config myjenkins.yaml jenkins myjenkins

where myjenkins.yaml has something like:

myjenkins:
  password: mypassword
  plugins-check-certificate: no
  plugins: greenballs javadoc

(the myjenkins service name has to match what you named the jenkins service when deploying with juju).

Alternatively, you can change things after you've deployed via something like:

juju set myjenkins plugins="greenballs"

The service should pick up the latest version of the plugin from the url specified in the plugins-site config param... defaulting to updates.jenkins-ci.org.

Note that some plugins (like maven-plugin for example) are really part of jenkins core, so the plugin version has to match the jenkins version exactly. The latest plugin version that the charm pulls won't necessarily match the installed version of jenkins... which can cause problems. I got around this by specializing the jenkins charm to pull some core plugins with matching versions, but perhaps a better way would be to use a separate plugins-site with only a single version of the plugin.

share|improve this answer
    
Thank you!!! Do you also know how to set a repository automatically? –  user125496 Jan 23 '13 at 17:22
    
hmmm... what I've done is specialize the charm to add extra config for particular plugins I need... I added things to config.yaml like ircbot_enabled ircbot_server ircbot_port etc etc. That works well, but requires you to maintain a separate charm. Perhaps the core jenkins charm should be reworked to support adding plugins and effectively pass them arguments. Maybe it can take a map of plugin name to plugin arguments. Don't know what the best solution would look like... but specializing the charm's worked well enough for me. –  m_3 Jan 23 '13 at 19:11
    
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.