Skip to content

Commit

Permalink
webgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Dec 3, 2012
1 parent 1a1f3b7 commit 622c537
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 15 deletions.
22 changes: 12 additions & 10 deletions manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@

node "default" {

# initialize core packages
include user
include network
include puppet
include ssh
include git
include samba
include motd
# initialize core packages
include user
include network
include puppet
include ssh
include git
include samba
include motd
include unzip

# initialize LEMP stack
include phpfpm

# initialize LEMP stack
include phpfpm
phpfpm::nginx::kalabox { "default":
server_name => "kala",
root => "/var/www",
Expand Down
9 changes: 9 additions & 0 deletions modules/unzip/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
*
* Install and unzip
*/
class unzip {

include unzip::install

}
11 changes: 11 additions & 0 deletions modules/unzip/manifests/install.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
*
* Install unzip
*/
class unzip::install {

package { "unzip":
ensure => "6.0-4ubuntu1",
}

}
15 changes: 10 additions & 5 deletions modules/webgrind/manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
class webgrind::config {

file { "webgrind.ini":
ensure => file,
path => "/etc/php5/conf.d/webgrind.ini",
require => Class["phpfpm::extensions::xdebug"],
notify => [Class["phpfpm::service"], Class["nginx::service"]],
content => template("webgrind/webgrind.ini.erb")
ensure => file,
path => "/etc/php5/conf.d/webgrind.ini",
require => Class["phpfpm::extensions::xdebug"],
notify => [Class["phpfpm::service"], Class["nginx::service"]],
content => template("webgrind/webgrind.ini.erb")
}

phpfpm::nginx::kalabox { "webgrind":
server_name => "grind.kala",
root => "/var/www/webgrind",
}

}
7 changes: 7 additions & 0 deletions modules/webgrind/manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@
*
*/
class webgrind::install {

exec { "install-webgrind":
path => "/bin:/usr/bin",
unless => "cat /var/www/webgrind/index.php",
command => "wget http://webgrind.googlecode.com/files/webgrind-release-1.0.zip -O /tmp/grind.zip && unzip /tmp/grind.zip -d /var/www/",
require => [Class["phpfpm::extensions::xdebug"], Class["unzip::install"]],
}

}

0 comments on commit 622c537

Please sign in to comment.