Photon OS Installer Project aims to seperate out installer source code from Photon project and use it as a python library. This Project can be used to create a photon-installer binary that can be used to install Photon OS when invoked with appropriate arguments.
- Generates Photon Installer executable.
- Creates Photon Images(ISO, GCE, AMI, AZURE, OVA...).
- Makes Photon Installer Source code installable through pip interface and use it as a python library.
python3, python3-pyinstaller, python3-setuptools
Building Photon Installer Executable on Photon OS
➜ ~ tdnf install -y python3 python3-setuptools python3-pyinstaller
➜ ~ git clone https://github.com/vmware/photon-os-installer.git
➜ ~ cd photon-os-installer
➜ ~ pyinstaller --onefile photon-installer.spec
Building Photon Installer Executable on Other distros
➜ ~ pip3 install setuptools pyinstaller
➜ ~ git clone https://github.com/vmware/photon-os-installer.git
➜ ~ cd photon-os-installer
➜ ~ pyinstaller --onefile photon-installer.spec
The executable generated can be found inside dist directory created.
Currently following images can be built based on architecture mentioned in table.
x86_64 | arm64 |
---|---|
iso | iso |
ova | ova |
ova_uefi | ova_uefi |
minimal-iso | |
rt-iso | |
ami | |
gce | |
azure | |
rpi3 |
Building Photon Cloud images using Photon OS Installer
➜ ~ pip3 install git+https://github.com/vmware/photon-os-installer.git
➜ ~ git clone https://github.com/vmware/photon.git
➜ ~ cd photon
➜ ~ make image IMG_NAME=ami
Using Photon OS Installer as python library
install config mentioned below can be referred from Photon Project
import photon_installer
from photon_installer.installer import Installer
import json
with open('path_to_file/config.json') as f:
install_config = json.load(f)
installer = Installer(working_directory='/root/photon/stage/ova', rpm_path='/root/photon/stage/RPMS', log_path='/root/photon/stage/LOGS')
installer.configure(install_config)
installer.execute()
The Photon OS Installer project team welcomes contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a Pull Request. For any questions about the CLA process, please refer to our FAQ.