https://github.com/vmware/photon-os-installer
Photon OS Installer
https://github.com/vmware/photon-os-installer
Last synced: 10 months ago
JSON representation
Photon OS Installer
- Host: GitHub
- URL: https://github.com/vmware/photon-os-installer
- Owner: vmware
- License: other
- Created: 2020-11-06T10:19:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-08T18:12:46.000Z (10 months ago)
- Last Synced: 2025-04-08T19:26:48.217Z (10 months ago)
- Language: Python
- Size: 703 KB
- Stars: 14
- Watchers: 14
- Forks: 19
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-Apachev2
- Code of conduct: CODE-OF-CONDUCT.md
Awesome Lists containing this project
README
# Photon OS Installer
### What is Photon Installer
Photon OS Installer Project aims to seperate out installer source code from [Photon project](https://github.com/vmware/photon/tree/master) 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.
### Features
- 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.
### Dependencies
`python3, python3-pyinstaller, python3-setuptools`
### Building from source.
Building Photon Installer Executable on Photon OS
```bash
➜ ~ 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
```bash
➜ ~ 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
```bash
➜ ~ 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](https://github.com/vmware/photon/blob/master/installer/sample_ks.cfg)
```python
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()
```
### Contributing
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](https://cla.vmware.com/faq).
License
----
[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html)
[GPL-2.0](https://github.com/vmware/photon-os-installer/blob/master/LICENSE-GPL2.0)