Replace gitlab.topology_service in favour of gitlab.cell.topology_service_client

What does this merge request do and why?

As per #2348 (moved), I am replacing gitlab.topology_service in favour of gitlab.cell.topology_service_client

How to set up and validate locally

  1. Modify your gdk.yml as follows:

    cells:
      enabled: true
      instance_count: 1
      instances:
      - config:
          gitlab:
            cell:
              topology_service_client:
                enabled: true
                address: "127.0.0.1:50051"
                ca_file: /tmp/cell-2-ca-cert.pem
                certificate_file: /tmp/cell-2-client-cert.pem
                private_key_file: /tmp/cell-2-client-key.pem
    gitlab:
      cell:
        topology_service_client:
          enabled: true
          address: "127.0.0.1:50051"
          ca_file: /tmp/cell-1-ca-cert.pem
          certificate_file: /tmp/cell-1-client-cert.pem
          private_key_file: /tmp/cell-1-client-key.pem
    gitlab_topology_service:
      enabled: true
  2. Run gdk reconfigure

    You should see a similar diff to the following appear:

    gitlab/config/gitlab.yml
    --------------------------------------------------------------------------------
    @@ -813,8 +813,8 @@ production: &base
           skip_sequence_alteration: true
         topology_service_client:
    -      address: 127.0.0.1:9095
    -      ca_file: /gdk/gitlab-topology-service/tmp/certs/ca-cert.pem
    -      private_key_file: /gdk/gitlab-topology-service/tmp/certs/client-key.pem
    -      certificate_file: /gdk/gitlab-topology-service/tmp/certs/client-cert.pem
    +      address: 127.0.0.1:50051
    +      ca_file: /tmp/cell-1-ca-cert.pem
    +      private_key_file: /tmp/cell-1-client-key.pem
    +      certificate_file: /tmp/cell-1-client-cert.pem
  3. Check out this branch in the cells' directory:

    cd gitlab-cells/cell-2;
    git checkout tskorupa/refactor-gitlab-cells-configuration;
    cd ../..
  4. Run gdk cells up

    You should see a similar diff to the following appear:

    gitlab/config/gitlab.yml
    --------------------------------------------------------------------------------
    @@ -807,4 +807,14 @@ production: &base
         # secret_file: /home/git/gitlab/.gitlab_workhorse_secret
    
    +  cell:
    +    enabled: true
    +    id: 2
    +    database:
    +      skip_sequence_alteration: false
    +    topology_service_client:
    +      address: 127.0.0.1:50051
    +      ca_file: /tmp/cell-2-ca-cert.pem
    +      private_key_file: /tmp/cell-2-client-key.pem
    +      certificate_file: /tmp/cell-2-client-cert.pem
    
       gitlab_kas:
    
    gitlab/config/session_store.yml
    --------------------------------------------------------------------------------
    @@ -1,4 +1,4 @@
     development:
    -  unique_cookie_key_postfix: true
    +  unique_cookie_key_postfix: false
       cookie_key: "_gitlab_session"
       session_cookie_token_prefix: "cell-2"
    ✅️ Cell 2 is ready.
  5. Remove any replacements from gdk.yml:

    cells:
      enabled: true
      instance_count: 1
      instances:
      - {}
    gitlab_topology_service:
      enabled: true
  6. Run gdk reconfigure

    You should see a similar diff to the following appear:

    gitlab/config/gitlab.yml
    --------------------------------------------------------------------------------
    @@ -813,8 +813,8 @@ production: &base
           skip_sequence_alteration: true
         topology_service_client:
    -      address: 127.0.0.1:50051
    -      ca_file: /tmp/cell-2-ca-cert.pem
    -      private_key_file: /tmp/cell-2-client-key.pem
    -      certificate_file: /tmp/cell-2-client-cert.pem
    +      address: 127.0.0.1:9095
    +      ca_file: /gdk/gitlab-topology-service/tmp/certs/ca-cert.pem
    +      private_key_file: /gdk/gitlab-topology-service/tmp/certs/client-key.pem
    +      certificate_file: /gdk/gitlab-topology-service/tmp/certs/client-cert.pem
  7. Run gdk cells up

    You should see a. similar diff to the following appear:

    gitlab/config/gitlab.yml
    --------------------------------------------------------------------------------
    @@ -813,8 +813,8 @@ production: &base
           skip_sequence_alteration: false
         topology_service_client:
    -      address: 127.0.0.1:50051
    -      ca_file: /tmp/cell-2-ca-cert.pem
    -      private_key_file: /tmp/cell-2-client-key.pem
    -      certificate_file: /tmp/cell-2-client-cert.pem
    +      address: 127.0.0.1:9095
    +      ca_file: /gdk/gitlab-topology-service/tmp/certs/ca-cert.pem
    +      private_key_file: /gdk/gitlab-topology-service/tmp/certs/client-key.pem
    +      certificate_file: /gdk/gitlab-topology-service/tmp/certs/client-cert.pem
    
       gitlab_kas:
    ✅️ Cell 2 is ready.

Impacted Categories

The following categories relate to this merge request:

Merge request checklist

  • This MR references an issue describing the change.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
Edited by Tomasz Skorupa

Merge request reports

Loading