Refactor Cell Configuration

What does this MR do and why?

Refactoring Cells configuration, to match what's agreed upon here: !176157 (merged)

This MR also takes into consideration supporting the old format of Topology Service configuration, to avoid breaking existing GDK configuration. Additional Cells on Staging and Production are not receiving this configuration yet.

Once gitlab-development-kit!4382 (merged) is merged, we can remove the support of the legacy format as part of the same issue, in a follow up MR.

Addressing: #513075 (moved)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

These steps assume that you are running the latest version of GDK, and you haven't excluded the Primary Cell from the Cells cluster.

A. Legacy Format

  1. Checkout this branch
  2. Run Rails Console ./bin/rails c
  3. Settings.cell.topology_service should still give GDK configuration like
 @options=
  {"enabled"=>true,
   "address"=>"gdk.test:9095",
   "ca_file"=>"/Users/omar/gdk/gitlab-topology-service/tmp/certs/ca-cert.pem",
   "private_key_file"=>"/Users/omar/gdk/gitlab-topology-service/tmp/certs/client-key.pem",
   "certificate_file"=>"/Users/omar/gdk/gitlab-topology-service/tmp/certs/client-cert.pem"}>

B. New Configuration Format

  1. Checkout this branch
  2. Change config/gitlab.yml manually to have this configuration of cell: instead of cell: and topology_service: configuration.
  cell:
    id: 1
    topology_service:
      enabled: true
      address: gdk.test:9095
      ca_file: /Users/omar/gdk/gitlab-topology-service/tmp/certs/ca-cert.pem
      private_key_file: /Users/omar/gdk/gitlab-topology-service/tmp/certs/client-key.pem
      certificate_file: /Users/omar/gdk/gitlab-topology-service/tmp/certs/client-cert.pem
    database:
      skip_sequence_alteration: false
  1. Run Rails Console, and do the steps 2 and 3 from the previous section. And validate that you are getting the same configuration.
  2. Run gdk reconfigure to get the old configuration format again in config/gitlab.yml file again.

Related to #513075 (moved)

Edited by Omar Qunsul

Merge request reports

Loading