Skip to content

Instantly share code, notes, and snippets.

@rochacon
Last active December 29, 2015 16:59
Show Gist options
  • Save rochacon/7700642 to your computer and use it in GitHub Desktop.
Save rochacon/7700642 to your computer and use it in GitHub Desktop.
JuJu+Jenkins Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
$bootstrap = <<SCRIPT
apt-get update -yq
apt-get install -yq python-software-properties
add-apt-repository -y ppa:juju/stable
apt-get update -yq
apt-get install -yq juju-local
echo -e 'y\n' | ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa
juju init
juju switch local
juju bootstrap
juju deploy jenkins
juju set jenkins password=admin
juju expose jenkins
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu1204"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision "shell", inline: $bootstrap
config.vm.network "forwarded_port", guest: 8080, host: 8080
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment