Skip to content

Improve gitlab.yml configuration management

Right now when you run make, gitlab.yml gets configured via an ed script in support/edit-gitlab.yml that relies on the following files:

  • hostname
  • port
  • https_enabled
  • registry_enabled
  • registry_host
  • registry_external_port
  • webpack_port
  • object_store_enabled
  • host
  • relative_url_root

The ed script is run with environment variables loaded from these files. For example:

hostname=localhost port=3000 relative_url_root=\
  https=false\
        webpack_port=3808\
        registry_host=127.0.0.1 registry_external_port=5000\
        registry_enabled=false registry_port=5000\
        object_store_enabled=false object_store_port=9000\
        gitlab_pages_port=3010\
        support/edit-gitlab.yml gitlab/config/gitlab.yml

Problems:

  1. We seem to create one file for every configuration setting. This has exploded into 10+ different files you can tweak.
  2. The ed script is brittle; it fails if a new field is present in master but not for previous branches/tags (see #412 (comment 117922347)).
  3. gdk reconfigure always blows away custom settings (LDAP, OAuth2, etc.).

Proposal:

One way we might solve this:

  1. Centralize all user-specific settings in a single gdk.yml.
  2. Make gitlab.yml.example a ERB file
  3. To create a gitlab.yml, render the template with the values defined in gdk.yml
Edited by Stan Hu