Make it easier to set up GitLab Geo with the GDK
Right now it's a bit challenging to set up a primary and secondary GitLab Geo with the GDK. The PostgreSQL replication instructions really helped, but there were additional steps on a brand new machine that had rbenv installed with the GDK:
-
Installed
nginx
on both primary and secondary machines viaapt-get install nginx
-
Stopped the default system
nginx
viasudo systemctl stop nginx
-
Configured the
nginx.conf
on port 80 (SSL appears to be configured by default) to forward Workhorse connections (my EE is on port 3001, but nginx was in port 3000) -
Enabled
nginx
in the GDKProcfile
. Added asudo
step since I wanted nginx to listen on port 80. -
Configured the GDK OpenSSH to listen on all interfaces on port 2222 (by default only listens to
localhost:2222
) -
On both primary and secondary nodes, in
gitlab.yml
under the SSH configuration, replacedlocalhost
with the full hostname. -
Started up both GDKs.
-
Ran
rake cache:clear
on the primary to make the SSH config appear -
Added a primary Geo Node in the GitLab UI with the public SSH key in
/home/stanhu/gdk-ee/openssh/ssh_host_rsa_key.pub
-
Created an SSH key in my home directory
-
Added a secondary Geo Node in the GitLab UI with the public SSH key of my user's SSH key in
/home/stanhu/.ssh/id_rsa.pub
(notice the paths are quite different from step 9) -
Attempted to test my SSH connection, but got:
$ ssh stanhu@stanhu-geo-primary -p 2222 PTY allocation request failed on channel 0 /usr/bin/env: 'ruby': No such file or directory Connection to stanhu-geo-primary closed.
-
Realized I need to install the system ruby package instead of relying on rbenv via
apt-get install ruby
. -
Had failures with system hooks. Copied
config/secrets.yml
from the primary to the secondary.
/cc: @brodock, @dbalexandre, @rspeicher