mirror of https://github.com/zulip/zulip.git
puppet: Move public portions of Postgres puppet config to the zulip module
(imported from commit 25cb2e386e16b5c12f8efa26aa029215e29099f2)
This commit is contained in:
parent
b3e6d49d2f
commit
2afdb4b11e
|
@ -1,27 +1,6 @@
|
|||
class zulip-internal::postgres-appdb {
|
||||
include zulip-internal::postgres-common
|
||||
include zulip::supervisor
|
||||
|
||||
$appdb_packages = [ "python-psycopg2",]
|
||||
package { $appdb_packages: ensure => "installed" }
|
||||
|
||||
file { "/usr/local/bin/process_fts_updates":
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 755,
|
||||
source => "puppet:///modules/zulip-internal/postgresql/process_fts_updates",
|
||||
}
|
||||
|
||||
file { "/etc/supervisor/conf.d/zulip_db.conf":
|
||||
require => Package[supervisor],
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "puppet:///modules/zulip-internal/supervisor/conf.d/zulip_db.conf",
|
||||
notify => Service[supervisor],
|
||||
}
|
||||
include zulip::postgres-appdb
|
||||
|
||||
file { "/etc/postgresql/9.1/main/pg_hba.conf":
|
||||
require => Package["postgresql-9.1"],
|
||||
|
@ -31,14 +10,4 @@ class zulip-internal::postgres-appdb {
|
|||
mode => 640,
|
||||
source => "puppet:///modules/zulip-internal/postgresql/pg_hba.conf",
|
||||
}
|
||||
|
||||
file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop":
|
||||
require => Package["postgresql-9.1"],
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "puppet:///modules/zulip-internal/postgresql/zulip_english.stop",
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
class zulip-internal::postgres-common {
|
||||
|
||||
$postgres_packages = [ "postgresql-9.1", "pgtune",
|
||||
"python-argparse", "python-gevent",
|
||||
"lzop", "pv", "hunspell-en-us", "python-dateutil"]
|
||||
package { $postgres_packages: ensure => "installed" }
|
||||
include zulip::postgres-common
|
||||
|
||||
exec {"pip_wal-e":
|
||||
command => "/usr/bin/pip install git+git://github.com/zbenjamin/wal-e.git#egg=wal-e",
|
||||
|
@ -40,11 +36,6 @@ class zulip-internal::postgres-common {
|
|||
require => [ File["/usr/local/bin/pg_backup_and_purge.py"], Package["postgresql-9.1", "python-dateutil"] ]
|
||||
}
|
||||
|
||||
exec { "disable_logrotate":
|
||||
command => "/usr/bin/dpkg-divert --rename --divert /etc/logrotate.d/postgresql-common.disabled --add /etc/logrotate.d/postgresql-common",
|
||||
creates => '/etc/logrotate.d/postgresql-common.disabled',
|
||||
}
|
||||
|
||||
exec { "sysctl_p":
|
||||
command => "/sbin/sysctl -p /etc/sysctl.d/40-postgresql.conf",
|
||||
subscribe => File['/etc/sysctl.d/40-postgresql.conf'],
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
class zulip::postgres-appdb {
|
||||
include zulip::postgres-common
|
||||
include zulip::supervisor
|
||||
|
||||
$appdb_packages = [ "python-psycopg2",]
|
||||
package { $appdb_packages: ensure => "installed" }
|
||||
|
||||
file { "/usr/local/bin/process_fts_updates":
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 755,
|
||||
source => "puppet:///modules/zulip/postgresql/process_fts_updates",
|
||||
}
|
||||
|
||||
file { "/etc/supervisor/conf.d/zulip_db.conf":
|
||||
require => Package[supervisor],
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "puppet:///modules/zulip/supervisor/conf.d/zulip_db.conf",
|
||||
notify => Service[supervisor],
|
||||
}
|
||||
|
||||
file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop":
|
||||
require => Package["postgresql-9.1"],
|
||||
ensure => file,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "puppet:///modules/zulip/postgresql/zulip_english.stop",
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
class zulip::postgres-common {
|
||||
$postgres_packages = [ "postgresql-9.1", "pgtune",
|
||||
"python-argparse", "python-gevent",
|
||||
"lzop", "pv", "hunspell-en-us", "python-dateutil"]
|
||||
package { $postgres_packages: ensure => "installed" }
|
||||
|
||||
exec { "disable_logrotate":
|
||||
command => "/usr/bin/dpkg-divert --rename --divert /etc/logrotate.d/postgresql-common.disabled --add /etc/logrotate.d/postgresql-common",
|
||||
creates => '/etc/logrotate.d/postgresql-common.disabled',
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue