Skip to content

Commit

Permalink
Add Varnish test box
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Webb committed Dec 12, 2013
1 parent a4611f5 commit 10e27ae
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
20 changes: 20 additions & 0 deletions varnish/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
config.vm.box = "Puppetlabs CentOS 6.4 x86_64"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box"

config.vm.hostname = "varnish-test"

config.vm.network :forwarded_port, guest: 6081, host: 6081
config.vm.network :forwarded_port, guest: 80, host: 8080

config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "base.pp"
puppet.module_path = "../modules"
end

end

29 changes: 29 additions & 0 deletions varnish/manifests/base.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
include epel

# Disable firewall
class { "firewall":
ensure => "stopped",
}

# Install Varnish yum repo
package { "varnish-release":
provider => "rpm",
source => "http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm",
}

# Install and configure Varnish
package { "varnish":
require => Package["varnish-release"],
}
service { "varnish":
ensure => "running",
require => Package["varnish"],
}

# Install application tools
package { [ "httpd", "php" ]: }
service { "httpd":
ensure => "running",
require => Package["httpd"],
}

0 comments on commit 10e27ae

Please sign in to comment.