From 5081dd1ed966f76f58c9e30ad716967f14dc1991 Mon Sep 17 00:00:00 2001 From: Eric Biagiotti Date: Fri, 14 Jun 2019 13:59:24 -0400 Subject: [PATCH] 15106: Updates install and upgrade docs to include trgm prerequisites Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti --- .../_install_postgres_database.liquid | 31 +++++++++++++------ doc/admin/upgrading.html.textile.liquid | 6 +++- .../install-postgresql.html.textile.liquid | 6 ++-- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/doc/_includes/_install_postgres_database.liquid b/doc/_includes/_install_postgres_database.liquid index aad4688d79..5373680caf 100644 --- a/doc/_includes/_install_postgres_database.liquid +++ b/doc/_includes/_install_postgres_database.liquid @@ -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: -
~$ sudo -u postgres bash
-# Generate a new database password: -
$ ruby -e 'puts rand(2**128).to_s(36)'
+
    +
  1. Start a shell for the postgres user: +
    ~$ sudo -u postgres bash
    +
  2. +
  3. Generate a new database password: +
    $ ruby -e 'puts rand(2**128).to_s(36)'
     yourgeneratedpassword
     
    Record this. You'll need it when you set up the Rails server later. -# Create a database user with the password you generated: +
  4. +
  5. Create a database user with the password you generated:
    $ createuser --encrypted -R -S --pwprompt {{service_role}}
    -Enter password for new role: yourgeneratedpassword
    -Enter it again: yourgeneratedpassword
    -
    -# Create a database owned by the new user: + Enter password for new role: yourgeneratedpassword + Enter it again: yourgeneratedpassword
+ +
  • Create a database owned by the new user:
    $ createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}
    -# Exit the postgres user shell: +
  • +{% if use_contrib %} +
  • Enable the pg_trgm extension +
    $ psql {{service_database}} -c "CREATE EXTENSION pg_trgm"
    +
  • +{% endif %} +
  • Exit the postgres user shell:
    $ exit
    +
  • + diff --git a/doc/admin/upgrading.html.textile.liquid b/doc/admin/upgrading.html.textile.liquid index b25dc10916..e0661c002b 100644 --- a/doc/admin/upgrading.html.textile.liquid +++ b/doc/admin/upgrading.html.textile.liquid @@ -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 diff --git a/doc/install/install-postgresql.html.textile.liquid b/doc/install/install-postgresql.html.textile.liquid index aabe6629d9..5e638ff850 100644 --- a/doc/install/install-postgresql.html.textile.liquid +++ b/doc/install/install-postgresql.html.textile.liquid @@ -27,7 +27,7 @@ h3(#centos7). CentOS 7 {% include 'note_python_sc' %} # Install PostgreSQL: -
    ~$ sudo yum install rh-postgresql95
    +  
    ~$ sudo yum install rh-postgresql95 rh-postgresql95-postgresql-contrib
     ~$ scl enable rh-postgresql95 bash
    # Initialize the database:
    ~$ sudo postgresql-setup initdb
    @@ -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: -
    ~$ sudo apt-get install postgresql
    +
    ~$ sudo apt-get install postgresql postgresql-contrib
    # "Set up Arvados credentials and databases":#rails_setup for the services that will use this PostgreSQL install. @@ -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' %} -- 2.30.2