Gitlab Migration

From Public PIC Wiki
Revision as of 13:26, 25 October 2018 by Jcasals (talk | contribs) (Jcasals moved page AC GitlabMigration to Gitlab Migration: Ugly name)
Jump to navigation Jump to search

The gitlab service need to be upgraded to a new version and host. It will be migrated from gitlab01.pic.es (running v6.x) to gitlab02.pic.es (running v11.x). This upgrade cannot be done transparently to the users because the actual version is too old. For newer releases this will be done without any user intervention.

The upgrade of the service need to be done in two steps. First, users must migrate their repositories to the new host following these instructions:

   # Create a remote called new_gitlab with the new address of the repository
   $ git remote add new_gitlab $(git remote -v | awk '{print $2}' | sort -u | sed s/gitlab01.pic.es/gitlab02.pic.es/g)
   
   # Upload the repository to the new remote
   $ git push new_gitlab --all
   $ git push new_gitlab --tags
   
   # Upload the repository to the new remote
   $ git push new_gitlab 
   
   # Rename the old remote
   $ git remote rename origin old_gitlab
   
   # Rename the new remote
   $ git remote rename new_gitlab origin

There will be a 3 month period where both gitlab host will coexist to give time users to migrate. After that, gitlab01 will be decomissioned and the gitlab.pic.es alias will point to gitlab02.pic.es. Users shall then update their remotes to point to the alias so that future upgrades can be done transparently.

   # Create a remote called new_gitlab with the new address of the repository
   $ git remote set-url origin $(git remote -v | awk '{print $2}' | sort -u | sed s/gitlab02.pic.es/gitlab.pic.es/g)