Open aroodgar opened 10 months ago
Hi,
fyi see the classic recipe below. I built a full x86_64 photon-5.0-0240e5e3c.x86_64.iso a week ago from the 5.0 branch.
Classic because there will be a new way of make build using containers, see https://github.com/vmware/photon/issues/1519#issuecomment-1826195008, but I haven't tried it out yet.
Hope this helps. -Daniel
Choose and configure your builder system host e.g. laptop scenario The builder system host suggested consists of VMware Workstation 17 on a x86_64 Windows 11 laptop with enough capacity.
For this builder system host, it is better to disable Windows powerthrottling.
powercfg /powerthrottling disable /path "C:\Program Files (x86)\VMware\VMware Workstation\x64\vmware-vmx.exe"
Provision a Photon OS vm e.g. with e.g. vhw latest, non-TPM, 16 vcpu, 120 GB storage, 32GB ram from photon-minimal-5.0-dde71ec57.x86_64.iso.
Configure the builder system. Depending on the environment needs, specify e.g. name, ip, ntp, dns, timezone, ssh settings.
For multiple workspaces, consider a directory structure e.g.
mkdir -p /workspaces/ph5prod
cd /workspaces/ph5prod
Using the latest packages usually is a quick start method.
tdnf distro-sync -y
tdnf install -y kpartx git bc build-essential createrepo_c texinfo wget python3-pip tar dosfstools cdrkit rpm-build linux-secure-devel
python -m pip install --upgrade pip
pip3 install --upgrade pip
pip3 install setuptools ez_setup
# use latest photon-os-installer
pip3 install docker==2.3.0
pip3 install git+https://github.com/vmware/photon-os-installer.git
Make build e.g. of Photon OS 5.0 latest
git clone -b 5.0 https://github.com/vmware/photon.git
cd ./photon
make -j16 image IMG_NAME=iso THREADS=16
Troubleshooting
If the make build process fails, there are several options.
make image IMG_NAME=iso
make build
The first make build takes 6-20 hours. The iso (and a debug version) is stored in the ./stage
directory.
To rerun with latest 5.0 packages, fetch and merge the sources before restarting make image IMG_NAME=iso
.
git fetch
git merge origin/5.0
credits Maintaining a builder system host in good shape is crucial for beginners. Thanks to the great support from the Photon OS team, I was able to acquire Linux know-how, especially about Photon OS. I hope the above code snippets are useful.
You can do:
sudo make minimal-iso THREADS=8
This takes less time but builds a small iso.
If you are a dev
branch user, you can do:
sudo make basic-iso THREADS=8
minimal iso is a small iso with a bunch of cloud env tools & utilities. basic is also a small iso but with very limited set of tools & utilities which focuses on smaller sized image.
Thanks for the responses.
I think did not ask my question clearly. What @dcasota said is the same default process of the photon build process. I want to see if there is a way to get the full photon ISO without all the unnecessary packages being installed during the process. I don't want a minimal version. I just don't want all the packages that are installed in the process to be installed which are around a 1000. I only want those that are actually installed with this image.
Hi @aroodgar,
Github comes along with the functionality of tags, see https://github.com/vmware/photon/tags. From the photon build process perspective, you could use
git clone https://github.com/vmware/photon.git
cd ./photon
git checkout dde71ec
to have the same state as in this image.
Let's say you already have a Photon OS 4.x installation, the actual upgrade does NOT stop on state Ph5 dde71ec57 .
tdnf upgrade tdnf
tdnf install photon-upgrade
photon-upgrade.sh --upgrade-os --assume-yes
If you need to upgrade to 5.0 by solely using this image, the built-in photon-upgrade.sh
has several options --repos
, --to-ver
, --install-all
, but I haven't tried them out to achieve the goal.
Unnecessary packages is very complex in terms of life support. Move open source packages if they no longer function. The reasons can range from lack of community interest to the hardware becoming so rare that it is simply not available any more. If packages in life support are not shown to be working within a reasonable timeframe, move them to an archived status. Imho this is good standing, see https://github.com/vmware-archive.
The build process of photon takes a lot of time and installs a lot of packages. The build process resiliency of photon has dependencies e.g. the access to the sources on github. There are different stages during the build process and each stage uses a set of necessary packages to make build other packages. The initial build process for Photon OS allows to distinct "save paths" aka flavors which results in different build process time, but also in different update build process time. Afaik there is no official migration path between flavors.
Hope this helps. -Daniel
@arrodgar, I don't fully understand your request, I think you need to rephrase.
Do you want to avoid building all packages? Or do you want a smaller ISO image, not with the full set? Or do you want to create a VM but not with all packages? Or something different altogether?
Please see if this answer to a similar request helps you: https://github.com/vmware/photon/issues/1519#issuecomment-1826195008
Is your feature request related to a problem? Please describe.
The build process of photon takes a lot of time and installs a lot of packages.
Describe the solution you'd like
I want to know if there is a way to configure the build process so that I could get a basic photon ISO file like the official release file of this link
Describe alternatives you've considered
No response
Additional context
No response