Skip to content

Instantly share code, notes, and snippets.

@uaarkoti
Last active August 27, 2015 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uaarkoti/82696918aab4ce3225fe to your computer and use it in GitHub Desktop.
Save uaarkoti/82696918aab4ce3225fe to your computer and use it in GitHub Desktop.

Setup Vagrant

vagant box add ubuntu/trusty64 
vagrant init trusty64

Install haproxy

echo deb http://archive.ubuntu.com/ubuntu trusty-backports main universe | \
      sudo tee /etc/apt/sources.list.d/backports.list

sudo apt-get update
sudo apt-get install haproxy -t trusty-backports

Install Jenkins

wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

Install Certificate

$ sudo mkdir /etc/ssl/jenkins.io
$ sudo openssl genrsa -out /etc/ssl/jenkins.io/jenkins.io.key 1024
$ sudo openssl req -new -key /etc/ssl/jenkins.io/jenkins.io.key \
                   -out /etc/ssl/jenkins.io/jenkins.io.csr
> Country Name (2 letter code) [AU]:US
> State or Province Name (full name) [Some-State]:California
> Locality Name (eg, city) []:San Jose
> Organization Name (eg, company) [Internet Widgits Pty Ltd]:CloudBees
> Organizational Unit Name (eg, section) []:
> Common Name (e.g. server FQDN or YOUR name) []:*.jenkins.io
> Email Address []:

> Please enter the following 'extra' attributes to be sent with your certificate request
> A challenge password []:
> An optional company name []:
$ sudo openssl x509 -req -days 365 -in /etc/ssl/jenkins.io/jenkins.io.csr \
                    -signkey /etc/ssl/jenkins.io/jenkins.io.key \
                    -out /etc/ssl/jenkins.io/jenkins.io.crt

Import trusted cert into Java Keystore on Jenkins Masters

keytool -import -noprompt -trustcacerts -alias jenkins.local -file /etc/ssl/jenkins.io/jenkins.io.pem -keystore cacerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment