harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Extend install.sh with switch to specify offline installer package

Open chrifey opened this issue 3 years ago • 5 comments

I opened https://github.com/goharbor/harbor/pull/16178 which was closed with a comment from @bitsf.

I think I do not fully understand the answer.

Usually I download the offline Installer bundle and use this file to install or upgrade harbor instances (within airgapped environments). The main reason for this is, to be able to "docker load" the images (versus pulling them directly from dockerhub or a local mirror registry).

Here is my actual problem, since the path to the tar.gz is hardcoded at the moment.

Can you elaborate on why I should not use the offline bundle and why it does not make sense to have this configurable?

Woule be happy to understand this and have the pullrequest merged.

chrifey avatar Jan 21 '22 10:01 chrifey

Hi @chrifey,

When you are trying to upgrade Harbor and using an existed harbor.[version].tar.gz, files like install.sh and harbor.yml.tmpl may varied from versions which means you may not using these to install a Harbor properly. You may refer to this doc for Upgrade Harbor and Migrate Data When you are installing a brand new Harbor with offline-installer-file, there's no need to specify the file path. Please refer to this Doc Harbor installation

MinerYang avatar Jan 24 '22 06:01 MinerYang

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Jul 05 '22 09:07 github-actions[bot]

Hi @chrifey ,

Do you still have a concern on this issue? I am wondering why we need make this image tarball file path configurable? If you need docker load the image, you need to have this tarball locally and most of the chance you got it from the offline installer bundle right ? So why bother to move it to another place? You can load the image first then do whatever you need.

So I don't think it's necessary enough to have this configurable. If there's more users do need this feature, we will consider to have it in the future.And if you have further concern, welcome to have a discuss on this. Otherwise, I would like to close this issue for now.

MinerYang avatar Aug 04 '22 02:08 MinerYang

Hi @MinerYang,

thanks for your response. So imagine you have a system, where there are two harbor offline-installer files present like this:

./harbor-offline-installer-v2.4.3.tgz
./harbor-offline-installer-v2.5.1.tgz

In this case, which file will the installer take at the moment to do the docker load -i?

This is what I tried to fix very simple in the pullrequest, so it would just use ./harbor*.tar.gz if you do nothing, but use the file I want to configure if I use --offline-installer-file.

I hope that explains it.

Kind regards Christian

chrifey avatar Aug 04 '22 07:08 chrifey

Hi @chrifey ,

Giving the situation above, you'd better to regard the whole offline installer bundle as a unit. It contains all the script, configuration yaml file as well as image tarball. I understand you might want to using a install file here but put an image tarball somewhere else. But this is not a best practice, since all of these files have corresponding relationship including the images, and may varied from version to version. So I would not suggest to do so.

If you do need this configuration, you could try to build the package for yourself usage

Best, Miner

MinerYang avatar Aug 04 '22 08:08 MinerYang

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Oct 03 '22 09:10 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

github-actions[bot] avatar Nov 03 '22 09:11 github-actions[bot]