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
- Checkout this branch
- Run Rails Console
./bin/rails c -
Settings.cell.topology_serviceshould 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
- Checkout this branch
- Change
config/gitlab.ymlmanually to have this configuration ofcell:instead ofcell:andtopology_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
- Run Rails Console, and do the steps 2 and 3 from the previous section. And validate that you are getting the same configuration.
- Run
gdk reconfigureto get the old configuration format again inconfig/gitlab.ymlfile again.
Related to #513075 (moved)