Two Arvados Rails servers store data in a PostgreSQL database: the SSO server, and the API server. The API server requires at least version 9.4 of PostgreSQL. Beyond that, you have the flexibility to deploy PostgreSQL any way that the Rails servers will be able to connect to it. Our recommended deployment strategy is:
Find the section for your distribution below, and follow it to install PostgreSQL on each host where you will deploy it. Then follow the steps in the later section(s) to set up PostgreSQL for the Arvados service(s) that need it.
It is important to make sure that autovacuum is enabled for the PostgreSQL database that backs the API server. Autovacuum is enabled by default since PostgreSQL 8.3.
The API server requires at least version 9.4 of PostgreSQL.
To enable Software Collections on CentOS, run:
~$ sudo yum install centos-release-scl scl-utils
To enable Software Collections on RHEL:
~$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
~$ sudo yum install rh-postgresql95 ~$ scl enable rh-postgresql95 bash
~$ sudo postgresql-setup initdb
~$ sudo sed -ri -e 's/^(host +all +all +(127\.0\.0\.1\/32|::1\/128) +)ident$/\1md5/' /var/lib/pgsql/data/pg_hba.conf
~$ sudo systemctl enable rh-postgresql95-postgresql
~$ sudo systemctl start rh-postgresql95-postgresql
Debian 8 (Jessie) and Ubuntu 16.04 (Xenial) and later versions include a sufficiently recent version of Postgres.
Ubuntu 14.04 (Trusty) requires an updated PostgreSQL version, see the PostgreSQL ubuntu repository
~$ sudo apt-get install postgresql
~$ sudo -u postgres bash
$ ruby -e 'puts rand(2**128).to_s(36)'
yourgeneratedpassword
Record this. You’ll need it when you set up the Rails server later.$ createuser --encrypted -R -S --pwprompt arvados_sso
Enter password for new role: yourgeneratedpassword
Enter it again: yourgeneratedpassword
$ createdb arvados_sso_production -T template0 -E UTF8 -O arvados_sso
$ exit
~$ sudo -u postgres bash
$ ruby -e 'puts rand(2**128).to_s(36)'
yourgeneratedpassword
Record this. You’ll need it when you set up the Rails server later.$ createuser --encrypted -R -S --pwprompt arvados
Enter password for new role: yourgeneratedpassword
Enter it again: yourgeneratedpassword
$ createdb arvados_production -T template0 -E UTF8 -O arvados
$ exit
The content of this documentation is licensed under the
Creative
Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the
Apache License, Version 2.0.