Install pgroonga in development and (optionally) in prod.

This is preliminary work towards being able to merge support for using
the pgroonga full-text search solution for all languages in Zulip.
This commit is contained in:
Tim Abbott 2016-08-25 17:25:53 -07:00
parent 5a065503cb
commit 9818a760b5
3 changed files with 15 additions and 1 deletions

View File

@ -66,4 +66,14 @@ class zulip::postgres_appdb_base {
source => "puppet:///modules/zulip/nagios_plugins/zulip_postgres_appdb",
}
$pgroonga = zulipconf("machine", "pgroonga", "")
if $pgroonga != "" {
apt::ppa {'ppa:groonga/ppa':
before => Package["postgresql-${zulip::base::postgres_version}-pgroonga"],
}
# Needed for optional our full text search system
package{"postgresql-${zulip::base::postgres_version}-pgroonga":
ensure => "installed",
}
}
}

View File

@ -2,7 +2,7 @@
set -x
set -x
apt-get install -y lsb-release
apt-get install -y lsb-release software-properties-common
# First, install any updates from the apt repo that may be needed
wget -qO - https://zulip.com/dist/keys/zulip-ppa.asc | apt-key add -

View File

@ -95,10 +95,12 @@ APT_DEPENDENCIES = {
"trusty": UBUNTU_COMMON_APT_DEPENDENCIES + [
"postgresql-9.3",
"postgresql-9.3-tsearch-extras",
"postgresql-9.3-pgroonga",
],
"xenial": UBUNTU_COMMON_APT_DEPENDENCIES + [
"postgresql-9.5",
"postgresql-9.5-tsearch-extras",
"postgresql-9.5-pgroonga",
],
}
@ -160,6 +162,8 @@ def main():
os.chdir(ZULIP_PATH)
run(["sudo", "./scripts/lib/setup-apt-repo"])
# Add groonga repository to get the pgroonga packages
run(["sudo", "add-apt-repository", "-y", "ppa:groonga/ppa"])
run(["sudo", "apt-get", "update"])
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + APT_DEPENDENCIES[codename])