GDK - how we use make, rake and gdk
Overview
We use a combination of make
, rake
and gdk
to manage various aspects of the GDK. I'd like to as much as possible stick to the following:
-
gdk
subcommands for user facing tasks - e.g.start/stop/restart
,update
-
rake
tasks to supportgdk
subcommands - e.g. creating config files - Deprecate
make
as much as possible moving logic intorake
tasks or Ruby libraries/methods so they can more easily be tested
Proposal
To kick things off, I'd like to:
- Convert any
rake
tasks that are user facing intogdk
subcommands - Make as many
rake
tasks as possible without description so they don't appear when runningrake -T
to support the stance thatrake
tasks are only there to supportgdk
subcommands and so therefore should ideally not be called directly by the user
Currently we have the following rake
tasks:
rake Procfile # Generate Procfile that defines the list of services to start
rake all # Generate all config files
rake clean # Remove any temporary products
rake clobber # Remove any generated files
rake dump_config # Dump the configured settings
rake gdk.example.yml # Generate an example config file with all the defaults
rake git:configure[global] # Configure your Git with recommended settings
rake gitaly/gitaly-0.praefect.toml # Generate gitaly config for praefect-internal-0
rake gitaly/gitaly.config.toml # Generate gitaly config toml
rake gitlab-shell/config.yml # Generate the gitlab-shell config.yml file
rake gitlab-workhorse/config.toml # Generate the gitlab-workhorse config file
rake gitlab/config/cable.yml # Generate the cable.yml config file
rake gitlab/config/database.yml # Generate the database.yml config file
rake gitlab/config/gitlab.yml # Generate the gitlab.yml config file
rake gitlab/config/resque.yml # Generate the resque.yml config file
rake nginx/conf/nginx.conf # Generate nginx configuration
rake openssh/sshd_config # Generate sshd configuration
rake preflight-checks # Preflight checks for dependencies
rake reconfigure # Regenerate all config files from scratch
rake redis/redis.conf # Generate redis configuration
Of the entire rake
task list above, I feel we should convert the following to be gdk
subcommands:
-
git:configure[global]
-
reconfigure
-
preflight-checks
- possible rename tocheck
or something similar? -
clean
- Roll intogdk pristine
- #843 (closed) -
clobber
- Roll intogdk pristine
- #843 (closed)
And the rest made 'hidden':
-
Procfile - this can be removed once #904 is resolved -
all - rename to generate_configs
-
dump_config -
gdk.example.yml -
gitaly/gitaly-0.praefect.toml -
gitaly/gitaly.config.toml -
gitlab-shell/config.yml -
gitlab-workhorse/config.toml -
gitlab/config/cable.yml -
gitlab/config/database.yml -
gitlab/config/gitlab.yml -
gitlab/config/resque.yml -
nginx/conf/nginx.conf -
openssh/sshd_config -
redis/redis.conf
Edited by Ash McKenzie