Skip to content

Instantly share code, notes, and snippets.

@virajkulkarni14
Forked from awesomejt/Vagrant file
Created March 28, 2017 15:29
Show Gist options
  • Select an option

  • Save virajkulkarni14/fa8d24fd8386d472e996d24efda56304 to your computer and use it in GitHub Desktop.

Select an option

Save virajkulkarni14/fa8d24fd8386d472e996d24efda56304 to your computer and use it in GitHub Desktop.
Vagrant file to install Jenkins 2 on Ubuntu 16.04 LTS, along with other tools.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# config.vm.box = "Ubuntu-16LTS"
config.vm.box = "ubuntu/xenial64"
config.vbguest.auto_update = false
config.vm.network "forwarded_port", guest: 8080, host: 8090
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get upgrade -y
echo "Install common tools"
apt-get install -y nano git
echo "Install Java and Maven"
apt-get install -y openjdk-8-jdk openjdk-8-jdk-headless maven
echo "Install Ruby"
apt-get install -y ruby
echo "Install Python 2"
apt-get install -y python python-pip
echo "Install Python 3"
apt-get install -y python3 python3-pip
if [ ! -f /usr/bin/nodejs ]; then
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt-get install -y nodejs
sudo apt-get install -y build-essential
npm install -g grunt-cli gulp-cli bower
fi
if [ ! -d /var/lib/jenkins ]; then
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
if [ ! -f /etc/apt/sources.list.d/jenkins.list ]; then
echo "deb https://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list.d/jenkins.list
fi
apt-get update
apt-get install jenkins -y
if [ -f /var/lib/jenkins/secrets/initialAdminPassword ]; then
cat /var/lib/jenkins/secrets/initialAdminPassword
fi
fi
SHELL
end
@RajaRamesh

RajaRamesh commented May 1, 2018

Copy link
Copy Markdown

error: Unknown configuration section 'vbguest'. - BY installing vbguest plugin the issue is resolved.

But how to run jenkins application in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment