Skip to content

Vagrant Environment for a Jenkins Continuous Integration server.

Notifications You must be signed in to change notification settings

etclabscore/jenkins-vagrant

 
 

Repository files navigation

NOTE: This is a fork of rgl/jenkins-vagrant, modified to not include gitlab or require custom vagrant boxes.

Jenkins Vagrant

This is a Vagrant Environment for a Continuous Integration server using the Jenkins daemon. It includes support for all major operating systems (Mac, Windows, Linux).

For the Non-Developer

Jenkins Vagrant is an easy way for projects to test, build, and deploy their code without the need of any 3rd party service.

What is this?

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.
  • Add and list users.
  • Install and configure plugins.
  • Create Freestyle project job.
  • Create Pipeline job.
  • Create Multibranch Pipeline job.
  • Add a Ubuntu Linux slave node.
  • Add a Windows slave node.
    • With enabled long path support on the OS and chocolatey.
  • Add a macOS slave node.

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:

Install

virtualbox and vagrant and virtualbox-extension-pack are the dependencies for this repository. OSX users can get them via brew and brew cask:

OSX Installations Instructions:

brew cask install virtualbox

brew cask install vagrant

brew cask install virtualbox-extension-pack

Note about Virtualbox Installation:

Installing virtualbox requires you to allow Oracle America, Inc in System Preferences > Security & Privacy in order to finish the installation. More information can be found here.

Ubuntu Installation Instructions:

Virtualbox:

sudo apt-add-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib"
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox -y

Vagrant:

wget https://releases.hashicorp.com/vagrant/2.2.3/vagrant_2.2.3_linux_amd64.zip
unzip vagrant_2.2.3_linux_amd64.zip
sudo mv vagrant /usr/local/bin/

Virtualbox Extension Pack:

LatestVirtualBoxVersion=$(wget -qO - http://download.virtualbox.org/virtualbox/LATEST-STABLE.TXT) && wget "http://download.virtualbox.org/virtualbox/${LatestVirtualBoxVersion}/Oracle_VM_VirtualBox_Extension_Pack-${LatestVirtualBoxVersion}.vbox-extpack"

sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-${LatestVirtualBoxVersion}.vbox-extpack

https://unix.stackexchange.com/questions/289685/how-to-install-virtualbox-extension-pack-to-virtualbox-latest-version-on-linux/290462

Usage

Run vagrant up jenkins to launch the master. See its output to learn how to login at the Jenkins home page as admin.

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.

Reference

About

Vagrant Environment for a Jenkins Continuous Integration server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 58.6%
  • Shell 38.0%
  • HCL 3.4%