Project

General

Profile

Actions

Idea #13996

closed

[API] Migrate RailsAPI to new cluster config file

Added by Tom Clegg over 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
3.0
Release relationship:
Auto

Description

This will enable an operator to move their configs from their existing RailsAPI configuration file (/etc/arvados/api/application.yml) to their cluster config file (/etc/arvados/config.yml), then delete the RailsAPI-specific file.

Features needed:

  • The old Rails-only configuration file has precedence (otherwise, merely upgrading to this version could cause unanticipated config changes).
  • The operator can easily find out whether deleting their legacy config file would affect their runtime configuration.
  • The operator can delete their legacy config file.

Suggested implementation:

At startup:
  1. Load new cluster config defaults from static file included in package (this can be in the RailsAPI subtree for now, although in the future all arvados components will ship with a copy of it)
  2. Load new cluster config from /etc/arvados/config.yml
  3. Load legacy config /etc/arvados/api/application.yml / config/application.yml
  4. Copy legacy config keys to equivalent cluster config keys

Update Rails.configuration references to use the corresponding keys in the new config.

Provide script(s) or rake task(s) for "dump" and "diff" to assist with config migration:
  • "dump": load configuration (as above) and write the resulting config to stdout/file. This is the quickest way for the operator to make the legacy config file superfluous so it can be deleted.
  • "diff": show the changes made by the "copy legacy config keys" step. This suits an operator who wants to update their new config incrementally and/or preserve comments in their new config.

NOT included here:

  • mechanism to split config into multiple files/fragments ("include")
  • mechanism to overlay multiple configs (like the legacy config does with "common" + "production" sections)
  • mechanism to avoid storing secrets in the config file
  • update other components to read RailsAPI configs from the cluster config file instead of the discovery document

Subtasks 2 (0 open2 closed)

Task #14981: Review 13996-new-api-configResolvedPeter Amstutz03/26/2019Actions
Task #15042: API server packaging includes its own copy of config.defaults.ymlResolvedWard Vandewege04/04/2019Actions

Related issues

Related to Arvados - Idea #13648: [Epic] Use one cluster configuration file for all componentsResolvedActions
Related to Arvados - Bug #15225: [API] installation gives error: Creating git_internal_dir ''...mkdir: cannot create directory ‘’: No such file or directoryResolvedWard VandewegeActions
Related to Arvados - Bug #15273: [API] accept lowercase postgresql connection paramsResolvedActions
Blocked by Arvados - Feature #13646: [API] Rails API server loads cluster configuration fileRejectedActions
Blocks Arvados - Feature #14811: [SSO] Use cluster configRejectedActions
Blocks Arvados - Feature #14812: [Workbench1] Load configuration from cluster config fileResolvedPeter Amstutz07/02/2019Actions
Actions

Also available in: Atom PDF