Project

General

Profile

Actions

Feature #23238

closed

Ansible installer can install PostgreSQL packages from postgresql.org

Added by Brett Smith 5 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Story points:
-
Release relationship:
Auto

Description

The Ansible installer needs to be able to install arbitrary versions of PostgreSQL in order to match, e.g., the database deployed with RDS. postgresql.org publishes packages we can use to do this. Users will configure this using two variables across our roles:

# Can name a version number like 15, 17, etc.
arvados_postgresql_version: null
# Can be either "distro" or "postgresql" 
arvados_postgresql_repository: distro

Add a role distro_postgresql that:

  • depends on distro_apt
  • when: "arvados_postgresql_repository == 'postgresql'", it uses @deb822_repository to set up the postgresql.org package repository and notifies the apt update handler from distro_apt
  • otherwise it's a noop
  • It is a dependency of arvados_postgresql and arvados_api (where we install the client packages)

In arvados_postgresql:

  • Remove the separate, older arvados_postgresql_package default
  • In the tasks, install postgresql-{{ arvados_postgresql_version }} if the variable is set, else just postgresql.

In arvados_api_server, add a task before Install arvados-api-server that says when: "arvados_postgresql_version is truthy", install the postgresql-client-{{ arvados_postgresql_version }} package.

Test the new code with arvados_postgresql_repository set to both distro and postgresql.


Subtasks 1 (0 open1 closed)

Task #23242: Review 23238-ansible-psql-repoResolvedStephen Smith11/14/2025Actions

Related issues 1 (1 open0 closed)

Related to Arvados Epics - Idea #18337: Easier install using AnsibleIn Progress01/01/202508/31/2025Actions
Actions #1

Updated by Brett Smith 5 months ago

  • Assigned To set to Stephen Smith
Actions #2

Updated by Lucas Di Pentima 5 months ago

  • Subtask #23242 added
Actions #3

Updated by Stephen Smith 5 months ago

  • Status changed from New to In Progress
Actions #4

Updated by Stephen Smith 4 months ago ยท Edited

Changes at arvados|6d5ac68a519f772bda45b63b57cdfdc65b7dfde0 branch 23238-ansible-psql-repo

  • Added the distro_postgresql role that sets up the postgres repo when arvados_postgresql_repository = postgresql
  • Removed arvados_postgresql_package and split the package installation into 2 tasks, 1 for normal package and 1 for postgresql repo when arvados_postgresql_version is set
  • Added postgresql-client-x installation task to arvados_api_server
  • Tested that using 'distro' and 'postgresql' with a version installs the correct packages
  • I noticed I occasionally get Unable to restart service keepproxy.service: Job for keepproxy.service failed because a timeout was exceeded but re-running the playbook works, so I think this is unrelated and maybe normal?
Actions #5

Updated by Brett Smith 4 months ago

  • Target version changed from Development 2025-11-12 to Development 2025-11-26
Actions #6

Updated by Lucas Di Pentima 4 months ago

This LGTM. One thing I would suggest is to add these 2 new vars to the full cluster example inventory, for documentation purposes.

I'm also getting keepproxy starts timeouts on some tests I'm doing, not sure what is going on yet.

Actions #7

Updated by Stephen Smith 4 months ago

  • Status changed from In Progress to Resolved
Actions #8

Updated by Brett Smith 4 months ago

  • Related to Idea #18337: Easier install using Ansible added
Actions #9

Updated by Brett Smith about 2 months ago

  • Release set to 84
Actions

Also available in: Atom PDF