Automated Jenkins Installs

57 views
Skip to first unread message

Ryan Cocks

unread,
Oct 13, 2016, 11:54:25 AM10/13/16
to Jenkins Users
Hi,

I'm a bit surprised to find Jenkins installation requires manual intervention via a user interface.

Are there any guides on how to avoid the UI and do an automated deploy of Jenkins itself?

Best idea I have is to store a post-setup jenkins docker image. I'd much prefer to be able to pass in the configuration in files or the environment.

Best regards,
Ryan

Mark Waite

unread,
Oct 13, 2016, 1:15:53 PM10/13/16
to Jenkins Users
The official Jenkins image can be easily extended to pass in the configuration in files.  That's how it is designed to work, and it has worked quite well for me.

If you'd like to see one way to do it, look at the lts-with-plugins branch of my docker repo, https://github.com/MarkEWaite/docker/tree/lts-with-plugins .  I've also added credentials and agents and many other configuration settings by committing files to a private repository similar to that one.    I use docker images to test the Jenkins git plugin and the Jenkins git client plugin and have been very pleased with how well Jenkins works with complex setups in a docker environment.

I'm sure there are others with much better techniques than mine, but you're welcome to refer to my techniques as one way of doing it.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3fabfeff-5336-45dc-a3ea-0f2a271d4a11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Martinez

unread,
Oct 13, 2016, 5:27:46 PM10/13/16
to Jenkins Users
Hi Ryan,

There are different solutions besides of using Docker (which IMO, it's the one of the best ones as Mark already suggested), as long as you use Configuration Management tools:

Besides of that, you can automate even more if you use the https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Hook+Script , I've used to configured for instance: some active directory, security policies, ant/jdk/maven installations, ssh/other credentials and so on.

Cheers 

Ted Xiao

unread,
Oct 18, 2016, 3:04:46 AM10/18/16
to Jenkins Users
If you are talking about the setup wizard in jenkinx 2.x, you can overwrite it by -Djenkins.install.runSetupWizard=false, a sample dockerfile

FROM jenkins:latest
USER jenkins
RUN install-plugins.sh git workflow-aggregator

# Skip initial setup
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
Reply all
Reply to author
Forward
0 new messages