Giter Club home page Giter Club logo

Comments (9)

jboxberger avatar jboxberger commented on July 20, 2024

Hi,

of course there is a migration path but it need some steps in between because you're really far behind.

Read Migration synology-gitlab => synology-gitlab-ce notes here.

  1. Backup your synology-gitlab: 13.12.2 like in migration noes described.

  2. Checkout this Repo and build your synology-gitlab-ce package (just one command). You can do it on your linux or just spin up a linux in a VM (i prefer ubuntu or fedora)
    ./build.sh --version=13.12.2-ce.0 --dsm=6 --type=advanced

  3. restore your synology-gitlab:13.12.2 backup to synology-gitlab-ce:13.12.2
    https://github.com/jboxberger/synology-gitlab-ce#restore

  4. Update you GitLab to desired version you can build any version like in Step 2.
    Note, sometimes you have to update to the latest minor Release before you can jump to the next minor release eg. 13.12.1 to 13.12.x and then you can update to 13.13.x. On major release you almost always have to have the lastest previous major release installed. eg. 13.13.x to 14.x.x

image

I recommend you to go with the "advanced" version since the classic allows only updates with "newer" version and deletes all gitlab data on uninstall. so technically if you get the message "update to this x.x.x version first" you need to backup and uninstall the classic package. Install the previous package, restore the backup and the upgrade to the x.x.x version before you can continue upgrading.

in the advanced package you can update and downgrade in any direction you like with one command.

cd /var/packages/synology-gitlab-ce/scripts && \
sudo sh gitlab update synology-gitlab-ce --version=15.0.1-ce.0

The synology-gitlab-ce uses another namespace so there is no need to uninstall synology-gitlab. You can keep your synology-gitlab as is (maybe you need it to shut down due conflicting ports) and only when you're done with migrating to synology-gitlab-ce and your're happy with it, only then you can backup and uninstall your synology-gitlab.

Hope this helps.

from synology-gitlab-ce.

jboxberger avatar jboxberger commented on July 20, 2024

I've added both files for you here but i strongly recommend you to build your own because you will need multiple versions in between to update up to 15.1.2.

synology-gitlab-ce-13.12.2-dsm6-advanced.spk.zip
synology-gitlab-ce-13.12.2-dsm7-advanced.spk.zip

If you only want to migrate the git repositories without any Gitlab specific stuff (users, issues, etc.) you can make a clean install of synology-gitlab-ce:15.1.2 and follow this instructions.

Basically you copy the git project to you synology-gitlab-ce share and then import them from there. After that they belong to root in GitLab and you only have to take the ownership.

Documentation: https://docs.gitlab.com/ee/raketasks/import.html

Quick Commands:

\# inside synology-gitlab-ce container
sudo docker exec -it synology-gitlab-ce bash
sudo -u git mkdir -p /var/opt/gitlab/git-data/repository-import/<optional_groupname>/<optional_subgroup>

\# outside synology-gitlab-ce container (synology bash/shell)
sudo cp -r /old/git/foo.git /var/opt/gitlab/git-data/repository-import/<optional_groupname>/<optional_subgroup>

\# inside synology-gitlab-ce container
\# Do this once when you are done copying git repositories
sudo chown -R git:git /var/opt/gitlab/git-data/repository-import
sudo gitlab-rake gitlab:import:repos["/var/opt/gitlab/git-data/repository-import"]

from synology-gitlab-ce.

hubient avatar hubient commented on July 20, 2024

This is a very big help. Thank you for your help, i will try this out soon.

from synology-gitlab-ce.

rafaellop avatar rafaellop commented on July 20, 2024

Just one note that if for some reason (like me) you forgot to backup the config but you have backuped or stored somewhere the previous environment settings, in particularly the GITLAB_SECRETS_DB_KEY_BASE, GITLAB_SECRETS_SECRET_KEY_BASE and GITLAB_SECRETS_OTP_KEY_BASE variables, you can still restore your repository from the data backup only. After all steps you should just add the forementioned environment variables in the container settings in the Synology panel by editing the container when stopped and adding the variables.

Thank you @jboxberger for great job! With your magnificent help I've successfuly updated DSM 6 to DSM 7 and then built and installed gitlab 13.12.2 and restored all my gitlab data. Super valuable! Now I'll try to updated the gitlab to a newer version.

from synology-gitlab-ce.

hubient avatar hubient commented on July 20, 2024

from synology-gitlab-ce.

rafaellop avatar rafaellop commented on July 20, 2024

For the other users needed to upgrade. If you have your githab version finally installed and working and you would like to upgrade then use the steps below. As mentioned above you need to have the Advanced version of the synology-github-ce installed.

SSH as root and do the following:

cd /var/packages/synology-gitlab-ce/scripts

Now do the update with:

sudo sh gitlab update synology-gitlab-ce --version=X.Y.Z-ce.0

For the 13.12.2 the upgrade path is:

13.12.2 => 13.12.15 -> 14.0.12 -> 14.3.6 => 14.6.2 => 14.9.5 => 14.10.5 => 15.0.2 => 15.1.0

The paths for different versions and targets are available here:
https://docs.gitlab.com/ee/update/#upgrade-paths

Each upgrade takes time to download (2-3 GB of data each version)., unpack and install. The process requires the gitlab to be stopped and restarted each time which happens automatically. Then it come to live also in a significant amount of time so be patient if you can't open the gitlab dashboard in your browser.

I've tried to omit some steps but the gitlab container was crashing. So I reversed the changes and do the full path while working on something else. I hope this will be helpful for other.

from synology-gitlab-ce.

redscotina avatar redscotina commented on July 20, 2024

15.1.0 => 15.3.3 work

from synology-gitlab-ce.

bojake avatar bojake commented on July 20, 2024

Note that the migration from 14.0.12 -> 14.3.6 could be problematic. You need to let the DB migrate all of the IDs to fix an overflow problem in pre-14.2 versions. If you didn't wait and you get into a boot loop in your 14.3.6 migrated docker instance then you will need to run these migrations manually:

gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,events,id,'[["id"], ["id_convert_to_bigint"]]']
gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_builds,id,'[["id", "stage_id"], ["id_convert_to_bigint", "stage_id_convert_to_bigint"]]']
gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_stages,id,'[["id"], ["id_convert_to_bigint"]]']
gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_builds_metadata,id,'[["id"], ["id_convert_to_bigint"]]']
gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_builds_metadata,id,'[["build_id"], ["build_id_convert_to_bigint"]]']
gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,push_event_payloads,event_id,'[["event_id"], ["event_id_convert_to_bigint"]]']

When you are done, this command will return quietly:

gitlab-rake db:migrate

My migration took about 3 hours to complete, manually.

After each version upgrade you need to check the background job status:

https://docs.gitlab.com/ee/update/background_migrations.html#check-the-status-of-batched-background-migrations

from synology-gitlab-ce.

develmac avatar develmac commented on July 20, 2024

Any tips on what to do if the upgrade to 14.0.12 fails (the container can not start anymore)? Also if I try to access the runners admin page on 15.3.3 I get a 500 as the runner token/secret seems to be missing. Not sure how I can move it from the Synology Pkg to Omnibus :(

from synology-gitlab-ce.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.