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:
- We seem to create one file for every configuration setting. This has exploded into 10+ different files you can tweak.
- 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)). -
gdk reconfigure
always blows away custom settings (LDAP, OAuth2, etc.).
Proposal:
One way we might solve this:
- Centralize all user-specific settings in a single
gdk.yml
. - Make
gitlab.yml.example
a ERB file - To create a
gitlab.yml
, render the template with the values defined ingdk.yml
Edited by Stan Hu