Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Photon OS 3.0 to 5.0 without internet #1544

Open
PTTASIA opened this issue Mar 8, 2024 · 4 comments
Open

Upgrading Photon OS 3.0 to 5.0 without internet #1544

PTTASIA opened this issue Mar 8, 2024 · 4 comments
Labels

Comments

@PTTASIA
Copy link

PTTASIA commented Mar 8, 2024

Describe the bug

May I know the official procedure to upgrade the existing Photon OS 3.0 to 5.0 in vCenter. I was trying to use Photon OS 5.0 full ISO but unsuccess.

Reproduction steps

1.Download Photon OS 5.0 ISO
2.Mount the Photon OS 5.0 ISO
3.Run the photon-upgrade script
...

Expected behavior

Please help provide steps and commands to upgrade Photon OS 3.0 to latest version without internet.

Additional context

No response

@PTTASIA PTTASIA added the bug label Mar 8, 2024
@dcasota
Copy link
Contributor

dcasota commented Mar 9, 2024

Hi,

Do you mean upgrading VCSA or offline upgrade of an open-source Photon OS 3.0 virtual machine?

VCSA is a commercial product. It uses a closed-source version of Photon OS as a subsystem in the process of maintaining VCSA.
For an existing VCSA upgrade, see the latest product documentation and release notes.

Open-source Photon OS
The assumption to download and mount the 5.0 GA iso as the one and only upgrade source afaik will not work in many cases. This fact is caused by the compromise of providing a downloadable iso of reasonable size with up-to-date packages.

Offline upgrading Photon OS virtual machines isn't difficult, but it isn't described in the docs because initial situation (flavor), configuration and installed applications lead rapidly to environment-specific cascades. Historically, see here, here and here. Basically the package manager tdnf got a nifty functionality called reposync on top of rpm-ostree.

This custom recipe contains a description of an offline upgrade method without network connectivity on the target environment. It's in progress and I try to finish it soon.

Also, have a look to VMware By Broadcom Telco Cloud Automation airgap server deployment topologies, in which the commercial version of Photon OS is in use as subsystem, see https://docs.vmware.com/en/VMware-Telco-Cloud-Automation/1.9.5/com.vmware.tca.userguide/GUID-27304C0A-2D5C-4E99-8932-E7FE08B92D31.html and the follow-up chapters.
The concept and a few commands in the guide are reusable for the open-source version of Photon OS as well.

Hope this helps.

@PTTASIA
Copy link
Author

PTTASIA commented Mar 11, 2024

Hi @dcasota ,

Thank you for your prompt reply. I will have a look at your mentioned reference.

@dcasota
Copy link
Contributor

dcasota commented Mar 11, 2024

edited 3/20/2024: weblink custom recipe offline upgrading Photon OS 3.0 to 5.0 and a few correction in the text below.

Hi,

Reflecting the custom recipe from above, it seems to be more difficult that I thought. QA actually wouldn't accept the custom recipe proposed, because:

  • For testing purposes, the custom recipe syncs lot of packages from packages.vmware.com/photon. Hence the disk file needed is 250GB 130GB. How to identify only necessary packages 3.0, 4.0 and 5.0 ?
  • The custom recipe requires that the virtual disk with packages is attached, but it doesn't copy the packages to the local disk. Hence it is not possible yet to get rid of the attached virtual disk. How to relink copied packages as '@System' ?
  • gpgcheck isn't implemented, no cert-checks.
  • Differences between a vanilla Photon OS 5.0 and an upgraded system? [fill-in observations]

@dweepadvani
Copy link
Contributor

dweepadvani commented Apr 2, 2024

Thanks @PTTASIA for your query and thanks @dcasota for your responses.

@PTTASIA, is the query about -

A) upgrading Photon OS 3.0 VM which is managed by a VC?
B) Or, it is about upgrading a VC on Photon OS 3.0?

For (B), the correct build of VC needs to consumed and the upgrade process of VC needs to be followed.

For (A), the latest ISOs of 3.0 and 5.0 can be downloaded, copied over to the VM which does not have internet and then can be mounted locally within the VM to paths like /repo/3.0 and /repo/5.0 respectively, for example. Then local repo file need to be created in /etc/yum.repos.d - for example a file named local.repo can be created having the baseurl as file:///repo/$releaever/RPMS. Then, install/upgrade photon-upgrade package and subsequently running photon-upgrade.sh with --repos=local option will upgrade Photon OS VM with no internet connection. Please refer help of photon-upgrade.sh for knowing about all the options available using --help command line parameter.

An example /etc/yum.repos.d/local.repo file can be as below -

[local]
name=Local ISO $releasever ($basearch)
baseurl=file:///repo/$releasever/RPMS
gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY
gpgcheck=1
enabled=1
skip_if_unavailable=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants