Skip to content

Vagrant Environment for a Jenkins Continuous Integration server

Notifications You must be signed in to change notification settings

ptc-rrusso/jenkins-vagrant

 
 

Repository files navigation

This is a Vagrant Environment for a Continuous Integration server using the Jenkins daemon.

This configures Jenkins through CLI/JNLP and Groovy scripts to:

  • Enable the simple Logged-in users can do anything Authorization security policy.
  • Add a SSH public key to vagrant user account and use it to access the CLI.
  • Optionally use LDAP user authentication.
  • Add and list users.
  • Install and configure plugins.
  • Setup nginx as a Jenkins HTTPS proxy and static file server.
  • Create a simple Free Style Project job.
  • Add a Ubuntu Linux slave node.
  • Add a Windows slave node.
  • Add a macOS slave node.

NB If you are new to Groovy, be sure to check the Groovy Learn X in Y minutes page.

These are the machines and how they are connected with each other:

Usage

Build and install the Ubuntu Base Box.

Build and install the Windows Base Box.

Build and install the macOS Base Box.

Add the following entry to your /etc/hosts file:

10.10.10.100 jenkins.example.com

Install the following Vagrant plugin:

vagrant plugin install vagrant-triggers # see https://github.com/emyl/vagrant-triggers

If you want to use LDAP for user authentication, you have to:

  1. have rgl/windows-domain-controller-vagrant up and running at ../windows-domain-controller-vagrant.
  2. uncomment the config_authentication='ldap' line inside provision.sh.

Run vagrant up jenkins to launch the master. See its output to known how to login at the local Jenkins home page as admin (you can also login with one of the example accounts, e.g. alice.doe and password password).

NB nginx is setup with a self-signed certificate that you have to trust before being able to access the local Jenkins home page.

Run vagrant up ubuntu to launch the Ubuntu slave.

Run vagrant up windows to launch the Windows slave.

Run vagrant up macos to launch the macOS slave. NB you first need to download Xcode_8.1.xip. After provisioning you can delete it, as Xcode_8.1.cpio.xz will take its place as a more efficient way to install Xcode.

About

Vagrant Environment for a Jenkins Continuous Integration server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 65.0%
  • PowerShell 32.5%
  • HTML 2.5%