jboxberger / synology-gitlab

Updated an improved Original Synology Package
MIT License
129 stars 20 forks source link

Upgrade is not longer possible #50

Closed FoxD7 closed 2 years ago

FoxD7 commented 3 years ago

Hey, I would like to Upgrade my OS to DSM 7. Therefor I have to Upgrade my GitLab Package first. Unfortunately I can't :(

I'm currenty running Version 13.0.3. I'm not able to Upgrade to 13.9.3 or 13.6.2. Neither I can Upgrade to 13.12.2 (Synology Stock).

This is the Error/Warning: SmartSelect_20210701-111518_Chrome (Screenshot from German UI - Sorry)

Translation: Upgrade is not possible, because current Version is to old. Please Upgrade to 12.10.6.

But this doesn't make any sense. My current Version is higher than 12.10.6 ?!?

Do you have any suggestions?

FoxD7 commented 3 years ago

Got it :) There is a problem with the SPK-Version. Your modified Package 13.0.3 has the spk version 0055. The 12.10.6 on the other hand has 0058!

During the update there is a spk-version check. To fix the problem, I manipulated the config file. I simply overwite the variable "version" value from "0055" to "0058".

The configuration file is stored here: /usr/syno/etc/packages/Docker-GitLab/config

With this quick&dirty trick, I was able to upgrade my 13.0.3-00555 to 13.12.2-0072 (stock) So far, I detected no issues.

nexxome commented 3 years ago

I currently have version 13.9.3 (0068) installed on my DS. Is there anything to do before upgrading from this package to the new stock version 13.12.2 (0072), besides backup?

jboxberger commented 3 years ago

Hey Guys sorry for my late reply. I will have a look on that by the weekend and test it for you so you have less risk in doing an upgrade.

jboxberger commented 3 years ago

Hey, I would like to Upgrade my OS to DSM 7. Therefor I have to Upgrade my GitLab Package first. Unfortunately I can't :(

I'm currenty running Version 13.0.3. I'm not able to Upgrade to 13.9.3 or 13.6.2. Neither I can Upgrade to 13.12.2 (Synology Stock).

This is the Error/Warning: SmartSelect_20210701-111518_Chrome (Screenshot from German UI - Sorry)

Translation: Upgrade is not possible, because current Version is to old. Please Upgrade to 12.10.6.

But this doesn't make any sense. My current Version is higher than 12.10.6 ?!?

Do you have any suggestions?

Could you please provide which Version you are currently using and where you have installed it from. German UI is no Problem for me. If you struggeling with english you can provide the Problem in German too but for the other user out there is einglish more helpful if they run into the same issue.

Kind Regards

FoxD7 commented 3 years ago

Hi Juri,

thx - I know that german is no problem for you ;) - I may have not the best english skills, but I try to do my best :) Unfortunately DSM 7 is not supporting "Synology GitLab" anymore! It's not possible to install the Synology GitLab Package (Stock OR! your modified version).

My Solution? I installed the official gitlab/gitlab-ce:latest (14.0.1) Docker-Image (with a few adjustments for less consuming RAM) and manually migrated my repositories :( (You not even able to restore the backup when gitlab version is the same.)

nexxome commented 3 years ago

That's sad news :/ If this is true I won't update to DSM 7.

But I think it would be a little bit strange. Synology didn't update the stock package for a long time, and now where it is updated, they drop support on DSM 7?

jboxberger commented 3 years ago

I think the DSM7 wont be an issue. The Message you ran into seems to come from the Package INFO File which forces any DSM 6 Version. I have to whitelist the DSM7 an test. The Test is not automatet and i am doing it by hand so i need my time, sorry.

@FoxD7: this is a "beginner" package to get started with Gitlab on Synology to get familiar with. I fully support the migration to the gitlab-ce because this makes you more independent. I've played around and if you use the gitlab alone you may omit the mysql/psql container and use directly SQLite. You will see no performance impact but have less dependencies which can go wrong on update.

Ive Played around and came up with this experimental config (you can modify it to the desired version). gitlab-ce-13.4.3-ce.0.zip

1) Make a Gitlab backup https://github.com/jboxberger/synology-gitlab#backup 2) Start a Gitlab CE Container with same version as you backuped from. 3) Restore your Backup to Gitlab CE (test your data) 4) Update Gitlab CE to the desired Verseion (test your data) 5) (test your data) 6) (test your data) 7) (test your data) 8) Think about delete old Gitlab 9) (test your data) 10) Delete old Gitlab in 90 Days

You can just stop the old Gitlab Container so it will not eat up your memory. Kind Regards

jboxberger commented 3 years ago

I've uploaded a modified version with the new requred "os_min_ver". see: https://github.com/jboxberger/synology-gitlab/releases/tag/13.9.3-0068

Unfortunately i do not have DSM7 to test it. I will update my production System to DSM 7 maybe next year, because DSM7 is new and shurely buggy as hell and there are no features that i really need.

Xpenology is also not DSM7 ready yet, so i can not test it. The Update on DSM 6.2 took forever i think about 20 - 30 minutes but it finished without issues. The Installation went much faster, maybe this is an issue on my VM.

@FoxD7 so if you want to, you can give it a try.

I've seen synology made a new package so i will have a look and maybe i can bump the package version too, the next days.

Hardcore-fs commented 2 years ago

seems it will not update says incomparable with current DSM version.

"This package is not supported on the platform of diskstation or is incompatible with the current DSM version"

DSM 7.0.1-42218 INTEL Atom C2538 DS1817+

jboxberger commented 2 years ago

Hi, gitlab should run without any issues on DSM7 becuse it is wrapped in a docker container. The main problem is the installer. The Synology package has a crapy installer. Yes the Installer is crapy but the best choice for the beginners.

Ich have seen there is already a XPENOLOGY 7 out, when i can get it running in a VM i can test ist an upload a package. Until then, if you confident enough, i recommend to migrate to the gitlab CE Package.

Here i have an example. But you need some know how to do that. https://github.com/jboxberger/synology-gitlab/issues/50#issuecomment-874307612

Kind Regards

caco3 commented 2 years ago

Just a note: I setup a xpenology with DSM 7 (DSM 7.0.1-42218 Update 2). It thinks it is a DS918+.

I tried to install synology-gitlab-stock-aio-13.9.3-0068.dsm7.experimental.spk, how ever it aborts with an error message about not supported DSM.

jboxberger commented 2 years ago

I'am struggeling get DSM 7 running, i've already bought another NAS and wating for the HDDs. The API has changed a lot. I can not expirment with my Production NAS.

Do you have a Tutorial?

caco3 commented 2 years ago

I basically followed this blog: https://xpenology.club/install-dsm-7-on-baremetal-or-vm I didn't get it working in a virtualbox, so I tried it on a real PC and an USB stick.

OT: Do you have any documentation how to migrate the data from your (resp. the synology) gitlab setup to a native gitlab-ce setup?

jboxberger commented 2 years ago

ah thank you, i am on linux with quemu so this is kind of tricky. Iam hammering this already for two day, but it looks like i did.

jboxberger commented 2 years ago

OMG: got DSM 7.0 running on qemu virt-manager after so many attempts and days of trying, That is GREAT!!!

For those who will google that later: Download the bootloader and the pat file fome Here: https://www.bachmann-lan.de/xpenology-7-0-unter-proxmox-installieren/

# create boot drive
sudo qemu-img convert -f raw -O qcow2 redpill-DS918+_7.0.1-42218_b1638389280.img /var/lib/libvirt/images/xpenology-7.0-ds918-boot-qcow2.img
sudo chown qemu:qemu /var/lib/libvirt/images/xpenology-7.0-ds918-boot-qcow2.img
sudo chmod 600 /var/lib/libvirt/images/xpenology-7.0-ds918-boot-qcow2.img

# create data drive (no preallocate to keep size small)
sudo qemu-img create -f qcow2 -o preallocation=off /var/lib/libvirt/images/xpenology-7.0-ds918-data.qcow2 60G
sudo chown qemu:qemu /var/lib/libvirt/images/xpenology-7.0-ds918-data.qcow2
sudo chmod 600 /var/lib/libvirt/images/xpenology-7.0-ds918-data.qcow2

sudo virsh define xpenology-7.0.xml 

# now boot and select sata on the boot menu
# give it a minute or so and call with your browser find.synology.com 
# if the station is not found, be patient and wait, sometimes it takes forever or about 10min

xpenology-7.0.zip

caco3 commented 2 years ago

As a note, If you don't find it with find.synology.com or the DS Assistant, simply point your webbrowser to it :5000

jboxberger commented 2 years ago

Ok its official... i hate synology. The documentation is absolute CRAP and the examples provided in the documentation are not working, the toolkit also garbage... took me forever to get nothing working. This is insane.

I will change my Stategy an take a working package and modify it to desired state...

Hardcore-fs commented 2 years ago

Synology took a turn for the worst on 7.0... QNAP used to be complete GARBAGE, I vowed never to use them., but it seems recently there two companies traded places. I bought a QNAP for evaluation. These sinology dumb asses fail to understand that it is individuals that set corporate purchasing decisions on I.T, Don't support low end kit privately..that is going to be reflected in the 40,000 USD corporate contract you will not be getting. we cannot put HPE kit in every branch office... I dropped back to 6.x, once I have time to get the QNAP setup they can kiss my ass.

jboxberger commented 2 years ago

So, after i dumped the toolkit and done a lot of API reverse Engineering i got something ready tonight.

This is not meant for production, but you could give it a try. Since DSM7 locked everything down, a docker package is monolithic, means the container can not be modified afterwards in the DSM docker app. Any attempt to export and re-import the container config breaks the package and it hast to be reinstalled again. The good news ist that the omnibus gitlab-ce can be configured through files instead of ENVIRONMENT variables. The config is exposed in /docker/synology-gitlab-ce. The bad news, after uninstalling the package all gitlab-ce files will be deleted automatically (/docker/synology-gitlab-ce), i have not found a solution to prevent this yet.

Both Solutions runs parallel to existing gitlab installations, as far as you do not use the folder /docker/synology-gitlab-ce or container name synology-gitlab-ce. You need to choose other ports to avoid conflicts with existing ones. The custom installer is basically an automation for a manual creation of the docker-container in the docker app. During update existing container config is exported, modified and re-imported. This solution keeps all the custom configurations you made to you synology-gitlab-ce container.

WARNING: FOR TESTING ONLY

1) SPK:

2) Custom Installer:

Any feedback is welcome :+1:

Kind Regards

jboxberger commented 2 years ago

Hello guys, it's almost done... this was a hell of a ride... but we succeeded.

As far as i can tell you all here will prefer the "advanced" approach. Please feel free to checkout and build your own version. If you're on windows and can not build, please let me know i will provide you the specific version you need.

The migration should be a simple backup (config and data) and restore to the new container. Please do not mix up the data shares, let both container have their own data share so you do not mess up you production data.

I will do a detailed migration tutorial later.

Hope you like it. https://github.com/jboxberger/synology-gitlab-ce

Kind Regards

jboxberger commented 2 years ago

Ok its finally done.

The migration path should also work (see readme). please give me feedback if this worked for you. This package has no relation to synology's original package and the gitlab docker image can be self-updated anytime so you do not have to wait for releases.

The data migration should work fine, because you backup your old system, and restore it on the new one. The new and old can run parallel and if in the new is something wrong, the old remains unchanged. So no risk but fun! :-) The only thing that gets a little tricky is that this is a omnibus package and the configuration differs from the image (sameersbn/gitlab) that is used by synology. Here I depend on you your experience. If you have problems or solutions, please report them in the issues section so that they can be documented for others.

Hope you like it: https://github.com/jboxberger/synology-gitlab-ce Downloads: https://github.com/jboxberger/synology-gitlab-ce/releases

Kind Regards

razorfish-sl commented 2 years ago

so.. can we run it on 6.x in parallel to get it tested , then upgrade to 7.0?

jboxberger commented 2 years ago

Yes, you can install the dsm6 version of the package parallel and upgade to 7.0 when ever you want to. But there is no need to update. The dsm6 and dsm7 advanced packages differs only a single line and this ist the os_min_ver value which hast to be >= 7.0 for DSM7.