Gitlab discontinued

Hi all.

Has anyone started on migrating gitlab already?

Looking forward to any feedback, thank you in advance.

Hey, I have separete my Gitlab from UCS to a standalone installation.

How can I help you?

Hey MyKey.

I am just starting to look into the topic, so a rough guide would be a great help. I’ve read about the possibility to install directly into an OS or use a docker container.

My feeling tells me to go with docker again, but maybe you can give some info about what you did.

I guess you migrated gitlab but connected it to UCS via ldap?

Best regards and thanks in advance

Okay, so here is a guide of what I ended up doing!

Notes:

  1. Gitlab inside Univention is such an old version, that bulk exports did not work for me.
  2. I decided against overwriting the existing install because
    a) we have relatively few projects which can be migrated one after each other by hand
    b) I did not want to risk some remnants of the univention gitlab to block me when eventually upgrading to Univention 5.2
  3. We do not use any of the advanced features from the enterprise edition, so in this guide, I switch to CE
  4. because of 3) we exported from the univention 12.1.0-ee and imported into 17.5.0-ce.0
  5. DISCLAIMER: use at your own risk! Backup your machine before, etc.

Steps

export GITLAB_HOME=/srv/gitlab
sudo docker run --detach \
   --hostname gitlab_ce \
   --env GITLAB_OMNIBUS_CONFIG="external_url 'https://YOUR_ORIGINAL_GITLAB_ADDRESS_HERE/gitlab2'; letsencrypt['enable'] = false; nginx['enable'] = false; gitlab_workhorse['listen_network'] = 'tcp'; gitlab_workhorse['listen_addr'] = '0.0.0.0:8181'" \
   --publish 2222:22 --publish 40099:8181 \
   --name gitlab_ce \
   --restart always \
   --volume $GITLAB_HOME/config:/etc/gitlab \
   --volume $GITLAB_HOME/logs:/var/log/gitlab \
   --volume $GITLAB_HOME/data:/var/opt/gitlab \
   --shm-size 256m \
   gitlab/gitlab-ce:17.5.0-ce.0

edit /srv/gitlab/config/gitlab.rb

# gitlab_workhorse['enable'] = true
# gitlab_workhorse['ha'] = false
gitlab_workhorse['listen_network'] = 'tcp'
# gitlab_workhorse['listen_umask'] = 000
gitlab_workhorse['listen_addr'] = '0.0.0.0:8181'
# gitlab_workhorse['auth_backend'] = "http://localhost:8080"

reset root password

docker exec -it gitlab_ce bash
gitlab-rails console -e production
user = User.where(id: 1).first
user.password = ‘secret_pass’
user.password_confirmation = ‘secret_pass’
user.save!
//replaced secret_pass with my new password
exit
gitlab-ctl restart

copy ldap settings from your existing gitlab to the new /srv/gitlab/config/gitlab.rb

run

docker exec -it gitlab_ce gitlab-ctl reconfigure

set up proxy and reverse-proxy in apache

now you should have 2 running instances of gitlab, one at /gitlab and the new one at /gitlab2 !

You can now export / import your projects.

When done, you can either uninstall the univention gitlab and then edit the apache config to have your new gitlab at /gitlab OR
leave the univention gitlab running for a while longer but switch /gitlab and /gitlab2 in your apache config.

then run the following to get the new gitlab to the old url

export GITLAB_HOME=/srv/gitlab
docker stop gitlab_ce
docker rm gitlab_ce
sudo docker run --detach \
   --hostname gitlab_ce \
   --env GITLAB_OMNIBUS_CONFIG="external_url 'https://YOUR_ORIGINAL_GITLAB_ADDRESS_HERE/gitlab'; letsencrypt['enable'] = false; nginx['enable'] = false; gitlab_workhorse['listen_network'] = 'tcp'; gitlab_workhorse['listen_addr'] = '0.0.0.0:8181'" \
   --publish 2222:22 --publish 40099:8181 \
   --name gitlab_ce \
   --restart always \
   --volume $GITLAB_HOME/config:/etc/gitlab \
   --volume $GITLAB_HOME/logs:/var/log/gitlab \
   --volume $GITLAB_HOME/data:/var/opt/gitlab \
   --shm-size 256m \
   gitlab/gitlab-ce:17.5.0-ce.0
Mastodon