From e58a60e1385e46985f64d61f7d9c968bed5d3a73 Mon Sep 17 00:00:00 2001 From: tsteur <thomas.steur@googlemail.com> Date: Mon, 13 Aug 2012 21:02:09 +0000 Subject: [PATCH] refs #3314 a very first puppet configuration for Piwik. I will add the required modules later git-svn-id: http://dev.piwik.org/svn/trunk@6729 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- misc/deploy/puppet/init.pp | 34 +++++++++++++++++++++++++++++++++ misc/deploy/puppet/mysql.pp | 13 +++++++++++++ misc/deploy/puppet/nodes.pp | 13 +++++++++++++ misc/deploy/puppet/php.pp | 9 +++++++++ misc/deploy/puppet/piwikrepo.pp | 7 +++++++ 5 files changed, 76 insertions(+) create mode 100644 misc/deploy/puppet/mysql.pp create mode 100644 misc/deploy/puppet/nodes.pp create mode 100644 misc/deploy/puppet/php.pp create mode 100644 misc/deploy/puppet/piwikrepo.pp diff --git a/misc/deploy/puppet/init.pp b/misc/deploy/puppet/init.pp index e69de29bb2..1fef161ffa 100644 --- a/misc/deploy/puppet/init.pp +++ b/misc/deploy/puppet/init.pp @@ -0,0 +1,34 @@ + +Exec { + path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", +} + +# does an apt-get update +include apt + +package { + 'vim': + ensure => installed; + 'subversion': + ensure => installed; + 'facter': + ensure => latest; + 'strace': + ensure => latest; + 'tcpdump': + ensure => latest; + 'wget': + ensure => latest; + 'python-software-properties': + ensure => installed; +} + +include git + +import 'php' + +import 'piwikrepo' + +import 'mysql' + +import 'nodes' \ No newline at end of file diff --git a/misc/deploy/puppet/mysql.pp b/misc/deploy/puppet/mysql.pp new file mode 100644 index 0000000000..86a607fb71 --- /dev/null +++ b/misc/deploy/puppet/mysql.pp @@ -0,0 +1,13 @@ +class { 'mysql': } + +class { 'mysql::server': + config_hash => { 'root_password' => 'secure' } +} + +# mysql::db { 'piwik': +# user => 'root', +# password => 'secure', +# host => 'localhost', +# grant => ['all'], +#} + diff --git a/misc/deploy/puppet/nodes.pp b/misc/deploy/puppet/nodes.pp new file mode 100644 index 0000000000..4eab15dd30 --- /dev/null +++ b/misc/deploy/puppet/nodes.pp @@ -0,0 +1,13 @@ +host { + "piwik.local": + ip => "127.0.0.1"; +} # host + +node default { + class { 'nginx': } + nginx::resource::vhost { 'piwik.local': + ensure => present, + www_root => '/var/www/piwik', + listen_port => 8001, + } +} diff --git a/misc/deploy/puppet/php.pp b/misc/deploy/puppet/php.pp new file mode 100644 index 0000000000..eeea8ec9a9 --- /dev/null +++ b/misc/deploy/puppet/php.pp @@ -0,0 +1,9 @@ +include php + +php::module { ['snmp', 'xdebug', 'mysql', 'gd', 'sqlite', 'memcache', 'mcrypt', 'imagick', 'geoip', 'uuid', 'recode', 'cgi']: +} + +# php::conf { "global": +# source => "puppet:///files/php/global.ini", +# } + diff --git a/misc/deploy/puppet/piwikrepo.pp b/misc/deploy/puppet/piwikrepo.pp new file mode 100644 index 0000000000..f27fa6394a --- /dev/null +++ b/misc/deploy/puppet/piwikrepo.pp @@ -0,0 +1,7 @@ + +vcsrepo { "/var/www/piwik": + ensure => present, + provider => svn, + source => 'http://dev.piwik.org/svn/trunk' +} + -- GitLab