Improve GDK to make it easy to use with external IDEs
This is our current list of gdk runable commands:
| command | description |
|---|---|
| db | dependencies to run tests |
| geo_db | Geo external database |
| app | GitLab with all frontend daemons without databases but with gitaly |
| * | Same as app but with optional dependencies as well |
| thin | Run only "thin" server for local development |
| grafana | Runs grafana |
| gitaly | Runs gitaly |
* this is empty command, or the "default" behavior when you just gdk run
Problem is when you want to develop locally using an external IDE like RubyMine or want to run rails from it, to benefit from the IDE integrations. There is currently no command that provides the required environment but rails.
Also db is poorly named, as it's not only db but all test dependencies (we have things like webpack which is not a database).
You can't also just run gdk run db and rails server separately as to run GitLa you also need gitaly, but to run the tests, gitaly is spawned by the test suite, so you can't be running it in advance.
There is also gitlab-workhorse and nginx, which you may want to test while still running rails in your IDE, there is no out-of-the-box command to do so.
Proposal
- Rename current
dbtotests(as this is our intention anyway) - Remove
gitalyfromapp - Remove
rails-background-jobsfromapp - Create a new
devwith only required development dependencies except for rails (so we can run everything else in the IDE) - Create a new
dev_allall kitchen sink dependencies except rails - Create a new
jobsso we can spawn sidekiq only when we will need it (people with a Macbook can only have 16GB, and we have a lot of open tabs in our browsers + Slack + heavy java based IDE) - Update
gdk helplist of up-to-date runnable commands - Make current "catch all" command trigger only for empty (ex:
gdk run whatever i typetoday is equal togdk run) - Create new "catch all" to display error message teaching how to see available commands
New commands and flags:
| command | foreman flags |
|---|---|
| tests | all=0,redis=1,postgresql=1,openldap=1,influxdb=1,webpack=1,registry=1,minio=1,elasticsearch=1 |
| dev_all | all=0,redis=1,postgresql=1,openldap=1,influxdb=1,webpack=1,registry=1,minio=1,elasticsearch=1,grafana=1,gitaly=1,gitlab-workhorse=1,nginx=1 |
| dev | all=0,redis=1,postgresql=1,webpack=1,gitaly=1 |
| jobs | all=0,rails-background-jobs=1 |
That allows to run all development dependencies (except rails) with gdk run dev_all and the minimal development dependencies with gdk run dev