Omnibus GitLab High Availability Roles

Introduced in GitLab EE 10.1.0

Omnibus GitLab includes various software components/services to support running GitLab in a high availability configuration. By default, some of these supporting services are disabled, and Omnibus GitLab is configured to run as a single node installation. Each service can be enabled or disabled using configuration settings in /etc/gitlab/gitlab.rb, but the introduction of roles allows you to easily enable a group of services, and provides better default configuration based on the high availability roles you have enabled.

Not specifying any Roles (the default configuration)

When you don’t configure GitLab with any roles, GitLab enables the default services for a single node install. These include things like PostgreSQL, Redis, Puma, Sidekiq, Gitaly, GitLab Workhorse, NGINX, etc.

These can still be individually enable/disabled by the settings in your /etc/gitlab/gitlab.rb.

Specifying Roles

Roles are passed as an array in /etc/gitlab/gitlab.rb

Example specifying multiple roles:

roles ['redis_sentinel_role', 'redis_master_role']

Example specifying a single role:

roles ['geo_primary_role']

Roles

The majority of the following roles will only work on a GitLab Enterprise Edition, meaning a gitlab-ee Omnibus package. It will be mentioned next to each role.

GitLab App Role

  • application_role (gitlab-ce/gitlab-ee)

    The GitLab App role is used to easily configure an instance where only GitLab is running. Redis, PostgreSQL, and Consul services are disabled by default.

Redis Server Roles

Documentation on the use of the Redis Roles can be found in Configuring Redis for Scaling

  • redis_sentinel_role (gitlab-ee)

    Enables the sentinel service on the machine,

    By default, enables no other services.

  • redis_master_role (gitlab-ee)

    Enables the Redis service and monitoring, and allows configuring the master password

    By default, enables no other services.

  • redis_replica_role (gitlab-ee)

    Enables the Redis service and monitoring

    By default, enables no other services.

GitLab Geo Roles

The GitLab Geo roles are used when setting up the database replication for GitLab Geo. See the Geo Database Documentation for configuration steps.

  • geo_primary_role (gitlab-ee)

    Prepares the database for replication and configures the application as a Geo Primary.

    By default, enables all of the GitLab standard single node services. (NGINX, Puma, Redis, Sidekiq, etc)

  • geo_secondary_role (gitlab-ee)

    Configures the secondary database for incoming replication and flags the application as a Geo Secondary

    By default, enables all of the GitLab default single node services. (NGINX, Puma, Redis, Sidekiq, etc)

Monitoring Roles

Monitoring roles are used to set up monitoring of installations. For additional information, see the Monitoring documentation.

  • monitoring_role (gitlab-ce/gitlab-ee)

    Configures a central monitoring server to collect metrics and provide dashboards.

    Enables Prometheus, Alertmanager, and Grafana.

PostgreSQL Roles

Documentation on the usage of the PostgreSQL Roles can be found in Configuring PostgreSQL for Scaling

  • postgres_role (gitlab-ce/gitlab-ee)

    Enables the PostgreSQL and Consul services on the machine

    By default, enables no other services.

  • patroni_role (gitlab-ee)

    Enables the PostgreSQL, patroni, and Consul services on the machine

    By default, enables no other services.

  • pgbouncer_role (gitlab-ee)

    Enables the PgBouncer and Consul services on the machine

    By default, enables no other services.

  • consul_role (gitlab-ee)

    Enables the Consul service on the machine

    By default, enables no other services.

GitLab Pages Roles

GitLab Pages roles are used to setup and configure GitLab Pages. For additional information, see the GitLab Pages Administration documentation

  • pages_role (gitlab-ce/gitlab-ee)

    Configures the server with a GitLab Pages instance.

    By default, enables no other services.