Difference between revisions of "Gitlab Migration"
Line 13: | Line 13: | ||
$ git push new_gitlab --all | $ git push new_gitlab --all | ||
$ git push new_gitlab --tags | $ git push new_gitlab --tags | ||
− | |||
− | |||
− | |||
# Rename the old remote | # Rename the old remote |
Revision as of 10:34, 26 October 2018
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 # 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.
# Change the remote called origin 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)