Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser. Upcoming version 10 of Internet Explorer should also handle it.

Jenkins Scaling
best practices and tips

Agenda

Scale?

M a s t e r

Master do's and dont's

+
# see http://tinyurl.com/746w35l  
location ~ ^/static/[0-9a-fA-F] ... $ {
 # rewrite all static files into the root:
 # /static/1234/css/some.css -> /css/some.css
 rewrite "^/static/[0-9a-fA-F] ... ;
}
   
Slaves
Config
uration

Job configuration smells

Managing branches from UI results in duplication, create a template project and clone, use programatic API
job(name:'liquibase'){

  slave(name:'jenkins-slave')  

  scm {
    url('git://github.com/...')
  } 

  steps {
    gradle(version: '1.0', tasks: 'build')
  }
} 
  

  
    
    
    build
    
    
    1.0
    false
  

  
% gradle tasks

  Other tasks
  -----------
  buildJob
  createJob
  deleteJob
  listjobs  
  
Tracking
Logstash
input {
 file {
  type => "jenkins"
  path => "/var/log/jenkins/jenkins.log"
 }

 file {
  type => "jenkins-slave"
  path => "/var/.../slave-jenkins-slave.log"
 }
}

output {
  stdout { }

  gelf {
     host => "graylog2"
  }
} 
  
i = Inotify.new
LOGGER = GELF::Logger.new("graylog2" ..)

t = Thread.new do
 i.each_event do |ev|
   path = "#{ARGV[0]}/#{ev.name}"
   if(File.directory?(path) && ...)
     log_job("#{path}/log") if File.exists? ..
   end
 end
end

i.add_watch(ARGV[0], Inotify::CREATE ...)
t.join
Archiving

What to lookout for

Alternatives

Vagrant
Vagrant::Config.run do |config|

 config.vm.define :master do |master|
   # master configuration
 end

  config.vm.define :slave do |slave|
   # slave configuration
  end

end
  

Benefits

Summary
Platinum sponsers:
Silver sponser:

Thanks to our sponsers