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

  1. Rename current db to tests (as this is our intention anyway)
  2. Remove gitaly from app
  3. Remove rails-background-jobs from app
  4. Create a new dev with only required development dependencies except for rails (so we can run everything else in the IDE)
  5. Create a new dev_all all kitchen sink dependencies except rails
  6. Create a new jobs so 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)
  7. Update gdk help list of up-to-date runnable commands
  8. Make current "catch all" command trigger only for empty (ex: gdk run whatever i type today is equal to gdk run)
  9. 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

Edited Jul 11, 2018 by Gabriel Mazetto
Assignee Loading
Time tracking Loading