15106: Updates install and upgrade docs to include trgm prerequisites
authorEric Biagiotti <ebiagiotti@veritasgenetics.com>
Fri, 14 Jun 2019 17:59:24 +0000 (13:59 -0400)
committerEric Biagiotti <ebiagiotti@veritasgenetics.com>
Fri, 14 Jun 2019 17:59:24 +0000 (13:59 -0400)
Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti@veritasgenetics.com>

doc/_includes/_install_postgres_database.liquid
doc/admin/upgrading.html.textile.liquid
doc/install/install-postgresql.html.textile.liquid

index aad4688d79cba0068695d23648450942b859aa04..5373680caf9a8d6111f6bc697761dfad9fa073ed 100644 (file)
@@ -4,18 +4,29 @@ Copyright (C) The Arvados Authors. All rights reserved.
 SPDX-License-Identifier: CC-BY-SA-3.0
 {% endcomment %}
 
-# Start a shell for the postgres user:
-  <notextile><pre>~$ <span class="userinput">sudo -u postgres bash</span></pre></notextile>
-# Generate a new database password:
-  <notextile><pre>$ <span class="userinput">ruby -e 'puts rand(2**128).to_s(36)'</span>
+<ol>
+<li>Start a shell for the postgres user:
+<notextile><pre>~$ <span class="userinput">sudo -u postgres bash</span></pre></notextile>
+</li>
+<li>Generate a new database password:
+<notextile><pre>$ <span class="userinput">ruby -e 'puts rand(2**128).to_s(36)'</span>
 yourgeneratedpassword
 </pre></notextile> Record this.  You'll need it when you set up the Rails server later.
-# Create a database user with the password you generated:
+</li>
+<li>Create a database user with the password you generated:
   <notextile><pre><code>$ <span class="userinput">createuser --encrypted -R -S --pwprompt {{service_role}}</span>
-Enter password for new role: <span class="userinput">yourgeneratedpassword</span>
-Enter it again: <span class="userinput">yourgeneratedpassword</span>
-</code></pre></notextile>
-Create a database owned by the new user:
+  Enter password for new role: <span class="userinput">yourgeneratedpassword</span>
+  Enter it again: <span class="userinput">yourgeneratedpassword</span></code></pre></notextile>
+</li>
+<li>Create a database owned by the new user:
   <notextile><pre><code>$ <span class="userinput">createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}</span></code></pre></notextile>
-# Exit the postgres user shell:
+</li>
+{% if use_contrib %}
+<li>Enable the pg_trgm extension
+  <notextile><pre>$ <span class="userinput">psql {{service_database}} -c "CREATE EXTENSION pg_trgm"</span></pre></notextile>
+</li>
+{% endif %}
+<li>Exit the postgres user shell:
   <notextile><pre>$ <span class="userinput">exit</span></pre></notextile>
+</li>
+</ol>
index b25dc10916063b63a3bd54d1255cef35569d53a6..e0661c002b27f8db22305225221c84ebf3109edf 100644 (file)
@@ -14,10 +14,10 @@ What you need to know and do in order to upgrade your Arvados installation.
 
 h2. General process
 
+# Consult upgrade notes below to see if any manual configuration updates are necessary.
 # Wait for the cluster to be idle and stop Arvados services.
 # Install new packages using @apt-get upgrade@ or @yum upgrade@.
 # Package installation scripts will perform any necessary data migrations.
-# Consult upgrade notes below to see if any manual configuration updates are necessary.
 # Restart Arvados services.
 
 h2. Upgrade notes
@@ -47,6 +47,10 @@ h4. No longer stripping ':' from strings in serialized database columns
 
 You can test if any records in your database are affected by going to the API server directory and running @bundle exec rake symbols:check@.  This will report which records contain fields with a leading ':' that would previously have been stripped.  If there are records to be updated, you can update the database using @bundle exec rake symbols:stringify@.
 
+h4. Enabling Postgres trigram indexes
+
+  Feature "#15106":https://dev.arvados.org/issues/15106 improves the speed and functionality of full text search by introducing trigram indexes on text searchable database columns via a migration. Prior to updating, you must first install the postgresql-contrib package on your system and subsequently run the @CREATE EXTENSION pg_trgm@ SQL command on the arvados_production database as a postgres superuser.
+
 h3(#v1_4_0). v1.4.0 (2019-06-05)
 
 h4. Populating the new file_count and file_size_total columns on the collections table
index aabe6629d939c36b782eedc2185d665f485aa3b2..5e638ff850c93949f466dc6bea2a7e6d8951a100 100644 (file)
@@ -27,7 +27,7 @@ h3(#centos7). CentOS 7
 {% include 'note_python_sc' %}
 
 # Install PostgreSQL:
-  <notextile><pre>~$ <span class="userinput">sudo yum install rh-postgresql95</span>
+  <notextile><pre>~$ <span class="userinput">sudo yum install rh-postgresql95 rh-postgresql95-postgresql-contrib</span>
 ~$ <span class="userinput">scl enable rh-postgresql95 bash</span></pre></notextile>
 # Initialize the database:
   <notextile><pre>~$ <span class="userinput">sudo postgresql-setup initdb</span></pre></notextile>
@@ -46,7 +46,7 @@ Debian 8 (Jessie) and Ubuntu 16.04 (Xenial) and later versions include a suffici
 Ubuntu 14.04 (Trusty) requires an updated PostgreSQL version, see "the PostgreSQL ubuntu repository":https://www.postgresql.org/download/linux/ubuntu/
 
 # Install PostgreSQL:
-  <notextile><pre>~$ <span class="userinput">sudo apt-get install postgresql</span></pre></notextile>
+  <notextile><pre>~$ <span class="userinput">sudo apt-get install postgresql postgresql-contrib</span></pre></notextile>
 # "Set up Arvados credentials and databases":#rails_setup for the services that will use this PostgreSQL install.
 
 <a name="rails_setup"></a>
@@ -55,10 +55,12 @@ h2(#sso). Set up SSO server credentials and database
 
 {% assign service_role = "arvados_sso" %}
 {% assign service_database = "arvados_sso_production" %}
+{% assign use_contrib = false %}
 {% include 'install_postgres_database' %}
 
 h2(#api). Set up API server credentials and database
 
 {% assign service_role = "arvados" %}
 {% assign service_database = "arvados_production" %}
+{% assign use_contrib = true %}
 {% include 'install_postgres_database' %}