I never got around to this and now we have two MR's for this idea: !93 (closed) and !94 (closed) . @sytses points out in !93 (closed) that people could also clone GDK twice: once for CE, once for EE. I must admit that from a GDK maintenance perspective that looks like the most elegant solution to me.
In !93 (closed) I see two separate repositories directories and DB's for CE and EE. In !94 (closed), repositories is shared between CE and EE.
people could also clone GDK twice: once for CE, once for EE. I must admit that from a GDK maintenance perspective that looks like the most elegant solution to me.
That is sure something to consider. The cons to cloning GDK twice is that postgres/redis/openldap data will have to be duplicated.
In !94 (closed), repositories is shared between CE and EE.
Nope, I also have the repositories dir separated ;)
Let's see the scenario where someone starts their work on CE and then in the middle of the day they need to switch to EE for some testing.
Different GDKs workflow
cd in the CE gdk
Run foreman for postgres
Update GitLab CE
Run foreman for GitLab
Do stuff
Kill foreman for GitLab
Kill foreman for postgres
cd in the EE gdk
Run foreman for postgres
Update GitLab EE
Run foreman for GitLab
Do stuff
Using Valery's workflow
cd in the gdk
Run foreman for postgres
Update GitLab CE
Run foreman for GitLab
Do stuff
Kill foreman for GitLab
Run switch ee
Update GitLab EE
Run foreman for GitLab EE
Do stuff
At its current state the switcher does not check for gitlab-shell/config.yml where the repositories and authorized_keys path should be unique to CE and EE. I know it's a WIP, just saying.
Using Axil's workflow
cd in the gdk
Run foreman for postgres
Update GitLab CE
Run foreman for GitLab CE
Do stuff
Kill foreman for GitLab CE
Update GitLab EE
Run foreman for GitLab EE
Do stuff
The only overhead I see in my approach is the cluttered Makefile, which I state in my MR as one of the caveats. Other than that, I've been using this for 2 weeks now, installed from scratch and been handling the updates via the Makefile without problem so far. Of course I am biased since this is how I'm used to work now :p
what are your thoughts on a 'clone GDK twice' approach?
@jacobvosmaer I am ok with cloning twice. But I am not ok with killing 2 foreman jobs (gdk and gitlab) in one directory and starting in another for switch from ce to ee and back. Also I don't want update workhorse and other components twice.
So ideally I would stick to solution that shares most of GDK but have own
BTW @dzaporozhets What are you going to switch in gitlab-shell? authorized_keys? we don't use it in development kit, because we don't use SSH git operations, correct me if I'm wrong
I don't like scripts that rewrite the working directory so much; for me cd is the ideal switcher.
What do you all think about the following ideas:
GDK uses exactly one port (3000), which can be passed to make. You can have two or more GDK's running, one for CE and one for EE, with EE on e.g. port 3001. Switch using cd.
'dual head' GDK clones CE and EE by default, into gitlab-ce and gitlab-ee, and starts two gitlab-workhorse processes, one on 3000 (CE) and one on 3001 (EE)
I prefer 'single head' approach where GDK only uses port 3000 (or whatever number you want). This can be done because gitlab-shell now also supports Unix sockets.
In !98 (merged) GDK is changing to use only one Procfile, with only 1 port. If you want to also work on EE: clone a second GDK, change 3000 to 3001 in your Procfile, start it, done.