puppet: Add wal-e to Postgres config

(imported from commit 55727a95cc51afb69f14c27df89a6ae287ec0f3f)
This commit is contained in:
Zev Benjamin 2013-04-22 11:24:28 -04:00
parent f280e7cdfa
commit 986ca06c44
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export WALE_S3_PREFIX=s3://humbug-postgres
exec /usr/local/bin/wal-e "$@"

View File

@ -1,9 +1,26 @@
class humbug::postgres-common {
class { 'humbug::base': }
$postgres_packages = [ "postgresql-9.1", "pgtune", ]
$postgres_packages = [ "postgresql-9.1", "pgtune", "python-boto",
"python-argparse", "python-gevent/squeeze-backports",
"lzop", "pv"]
package { $postgres_packages: ensure => "installed" }
exec {"pip_wal-e":
command => "/usr/bin/pip install git+git://github.com/zbenjamin/wal-e.git#egg=wal-e",
creates => "/usr/local/bin/wal-e",
require => Package['python-pip', 'python-boto', 'python-argparse',
'python-gevent/squeeze-backports', 'lzop', 'pv'],
}
file { "/usr/local/bin/env-wal-e":
ensure => file,
owner => "root",
group => "postgres",
mode => 750,
source => "puppet:///modules/humbug/postgresql/env-wal-e",
}
file { "/etc/postgresql/9.1/main/pg_hba.conf":
require => Package["postgresql-9.1"],
ensure => file,