From 10e27aecc326b70bfac8f4944cf25846c622c66b Mon Sep 17 00:00:00 2001 From: Erik Webb Date: Wed, 11 Dec 2013 22:17:51 -0500 Subject: [PATCH] Add Varnish test box --- varnish/Vagrantfile | 20 ++++++++++++++++++++ varnish/manifests/base.pp | 29 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 varnish/Vagrantfile create mode 100644 varnish/manifests/base.pp diff --git a/varnish/Vagrantfile b/varnish/Vagrantfile new file mode 100644 index 0000000..a418b35 --- /dev/null +++ b/varnish/Vagrantfile @@ -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 + diff --git a/varnish/manifests/base.pp b/varnish/manifests/base.pp new file mode 100644 index 0000000..9fc11a1 --- /dev/null +++ b/varnish/manifests/base.pp @@ -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"], +} +