Back to Gitlabhq

Cells

doc/administration/cells.md

18.11.26.0 KB
Original Source

{{< details >}}

  • Offering: GitLab.com
  • Status: Experiment

{{< /details >}}

[!disclaimer]

To test cell functionality, configure the GitLab Rails console.

[!note] This feature is available for administrators of GitLab.com only. This feature is not available for GitLab Self-Managed or GitLab Dedicated instances.

Cells 1.0 is in development. For more information about the state of cell development, see epic 12383.

Configuration

To configure your GitLab instance as a Cell instance:

{{< tabs >}}

{{< tab title="Self-compiled (source)" >}}

The cells related configuration in config/gitlab.yml is in this format:

yaml
  cell:
    enabled: true
    id: 1
    database:
      skip_sequence_alteration: false
    topology_service_client:
      address: topology-service.gitlab.example.com:443
      ca_file: /home/git/gitlab/config/topology-service-ca.pem
      certificate_file: /home/git/gitlab/config/topology-service-cert.pem
      private_key_file: /home/git/gitlab/config/topology-service-key.pem

{{< /tab >}}

{{< tab title="Linux Package (Omnibus)" >}}

  1. Edit /etc/gitlab/gitlab.rb and add the following lines:

    ruby
    gitlab_rails['cell'] = {
      enabled: true,
      id: 1,
      database: {
        skip_sequence_alteration: false
      },
      topology_service_client: {
        enabled: true,
        address: 'topology-service.gitlab.example.com:443',
        ca_file: 'path/to/your/ca/.pem',
        certificate_file: 'path/to/your/cert/.pem',
        private_key_file: 'path/to/your/key/.pem'
      }
    }
    
  2. Reconfigure and restart GitLab:

    shell
    sudo gitlab-ctl reconfigure
    sudo gitlab-ctl restart
    

{{< /tab >}}

{{< tab title="Helm chart" >}}

  1. Edit gitlab_values.yaml:

    yaml
    global:
      appConfig:
        cell:
          enabled: true
          id: 1
          database:
            skipSequenceAlteration: false
          topologyServiceClient:
            address: "topology-service.gitlab.example.com:443"
            tls:
              enabled: true
    
  2. Save the file and apply the new values:

    shell
    helm upgrade -f gitlab_values.yaml gitlab gitlab/gitlab
    

{{< /tab >}}

{{< /tabs >}}

ConfigurationDefault valueDescription
cell.enabledfalseTo configure whether the instance is a Cell or not. false means all Cell features are disabled. session_cookie_prefix_token is not affected, and can be set separately.
cell.idnilRequired to be a positive integer when cell.enabled is true. Otherwise, it must be nil. This is the unique integer identifier for the cell in a cluster. This ID is used inside the routable tokens. When cell.id is nil, the other attributes inside the routable tokens, like organization_id will still be used
cell.database.skip_sequence_alterationfalseWhen true, skips database sequence alteration for the cell. Enable for the legacy cell (cell-1) before the monolith cell is available for use, being tracked in this epic: Phase 6: Monolith Cell.
cell.topology_service_client.address"topology-service.gitlab.example.com:443"Required when cell.enabled is true. Address and port of the topology service server.
cell.topology_service_client.tls.enabledtrueWhen true, enables mTLS for communication with the topology service. This requires the cell.topology_service_client.tls.secret to be properly configured. If set to false, the connection will be made without TLS encryption.
cell.topology_service_client.tls.secretnilKubernetes TLS Secret name that contains the mTLS credentials. Required when TLS is enabled. The secret must include tls.crt and tls.key keys. If not explicitly set, defaults to <release.name>-topology-tls. This secret must be created manually; the Helm chart does not create it automatically.

For information on how to configure other components of the cells architecture, see:

  1. Topology service configuration
  2. HTTP router configuration