Skip to content

Commit

Permalink
Upgrade Zulip voyager to postgres 9.3 in preparation for trusty.
Browse files Browse the repository at this point in the history
(imported from commit 1dd8bd8fe1361979b3a52f595d2ff0c92bb03e05)
  • Loading branch information
timabbott committed Sep 25, 2015
1 parent 2348a83 commit 8269b4d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions puppet/zulip/files/postgresql/postgresql.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.

data_directory = '/var/lib/postgresql/9.1/main' # use data in another directory
data_directory = '/var/lib/postgresql/9.3/main' # use data in another directory
# (change requires restart)
hba_file = '/etc/postgresql/9.1/main/pg_hba.conf' # host-based authentication file
hba_file = '/etc/postgresql/9.3/main/pg_hba.conf' # host-based authentication file
# (change requires restart)
ident_file = '/etc/postgresql/9.1/main/pg_ident.conf' # ident configuration file
ident_file = '/etc/postgresql/9.3/main/pg_ident.conf' # ident configuration file
# (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
external_pid_file = '/var/run/postgresql/9.1-main.pid' # write an extra PID file
external_pid_file = '/var/run/postgresql/9.3-main.pid' # write an extra PID file
# (change requires restart)


Expand Down
2 changes: 1 addition & 1 deletion puppet/zulip/manifests/app_frontend.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Used for Hesiod lookups, etc.
"python-dns",
# Needed to access our database
"postgresql-client-9.1",
"postgresql-client-9.3",
"python-psycopg2",
# Needed for building complex DB queries
"python-sqlalchemy",
Expand Down
10 changes: 5 additions & 5 deletions puppet/zulip/manifests/postgres_appdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$appdb_packages = [# Needed to run process_fts_updates
"python-psycopg2",
# Needed for our full text search system
"postgresql-9.1-tsearch-extras",
"postgresql-9.3-tsearch-extras",
]
define safepackage ( $ensure = present ) {
if !defined(Package[$title]) {
Expand Down Expand Up @@ -37,16 +37,16 @@
notify => Service[supervisor],
}

file { '/usr/share/postgresql/9.1/tsearch_data/en_us.dict':
file { '/usr/share/postgresql/9.3/tsearch_data/en_us.dict':
ensure => 'link',
target => '/var/cache/postgresql/dicts/en_us.dict',
}
file { '/usr/share/postgresql/9.1/tsearch_data/en_us.affix':
file { '/usr/share/postgresql/9.3/tsearch_data/en_us.affix':
ensure => 'link',
target => '/var/cache/postgresql/dicts/en_us.affix',
}
file { "/usr/share/postgresql/9.1/tsearch_data/zulip_english.stop":
require => Package["postgresql-9.1"],
file { "/usr/share/postgresql/9.3/tsearch_data/zulip_english.stop":
require => Package["postgresql-9.3"],
ensure => file,
owner => "root",
group => "root",
Expand Down
2 changes: 1 addition & 1 deletion puppet/zulip/manifests/postgres_common.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class zulip::postgres_common {
$postgres_packages = [# The database itself
"postgresql-9.1",
"postgresql-9.3",
# tools for database setup
"pgtune",
# tools for database monitoring
Expand Down
10 changes: 5 additions & 5 deletions puppet/zulip/manifests/voyager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
source => "puppet:///modules/zulip/cron.d/restart-zulip",
}

file { '/etc/postgresql/9.1/main/postgresql.conf.template':
require => Package["postgresql-9.1"],
file { '/etc/postgresql/9.3/main/postgresql.conf.template':
require => Package["postgresql-9.3"],
ensure => file,
owner => "postgres",
group => "postgres",
Expand Down Expand Up @@ -82,12 +82,12 @@
exec { 'pgtune':
require => Package["pgtune"],
# Let Postgres use half the memory on the machine
command => "pgtune -T Web -M $half_memory -i /etc/postgresql/9.1/main/postgresql.conf.template -o /etc/postgresql/9.1/main/postgresql.conf",
command => "pgtune -T Web -M $half_memory -i /etc/postgresql/9.3/main/postgresql.conf.template -o /etc/postgresql/9.3/main/postgresql.conf",
refreshonly => true,
subscribe => File['/etc/postgresql/9.1/main/postgresql.conf.template']
subscribe => File['/etc/postgresql/9.3/main/postgresql.conf.template']
}

exec { 'pg_ctlcluster 9.1 main restart':
exec { 'pg_ctlcluster 9.3 main restart':
require => Exec["sysctl_p"],
refreshonly => true,
subscribe => [ Exec['pgtune'], File['/etc/sysctl.d/40-postgresql.conf'] ]
Expand Down

0 comments on commit 8269b4d

Please sign in to comment.