{% comment %} Copyright (C) The Arvados Authors. All rights reserved. SPDX-License-Identifier: CC-BY-SA-3.0 {% endcomment %}
~$ sudo -u postgres bash
$ ruby -e 'puts rand(2**128).to_s(36)'
yourgeneratedpassword
$ createuser --encrypted -R -S --pwprompt {{service_role}}
Enter password for new role: yourgeneratedpassword
Enter it again: yourgeneratedpassword
$ createdb {{service_database}} -T template0 -E UTF8 -O {{service_role}}
$ psql {{service_database}} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
$ exit