Testing PhotonOS

I've tested PhotonOS 4 on a Raspberry pi 3B+. These tiny single board computers need lightweight systems, and on the paper, PhotonOS was a good candidate. I tried to verify that.

Install

There is a doc online. Unfortunatly, the default password & sshd config do not allow for an imediate hands on when the rasp is plug through a network connection.

To fix that, you can :

  • Mount the sdcard on a computer, or anything you have an editor on
  • Edit the shadow file and push a generated shasum using openssl for exemple:
openssl passwd -6 "test"
  • edit the sshd config and allow root login
  • sync, umount, plug the sdcard in the rasp and boot.

This is obviously not secure! If you plan to use the system for anything else than tests, fix this.

Filesystem

The initial setup come with 3 partitions, the second one is very tiny and is used for the root filesystem. The third one is supposed to be setup for swap but it was not working.

To be able to play a bit with the system, I restructured a bit the disk structure:

fdisk /dev/mmcblk0
# in fdisk:
d # delete the last partition, validate
d # delete the second partition which is used by the system, we'll recreate it with a different setup
n # re-create the second partition to take the whole sdcard, or whatever fits your need
w # do not erase the existing ext4 signature fs, validate and exit.
resize2fs /dev/mmcblk0p2 # make the ext4 filesystem aware it has more space available now

Packages

  • The package manager used by photon is a derivative of dnf, tdnf.
  • Some update may be available:
tdnf update -y
tdnf install -y nano
# the following packages are docker-compose dependencies (or maybe just some of them, see bellow)
tdnf install -y python3-devel python3-cffi python3-setuptools python3-pip make

To test containers stuff, I usually rely on podman in 2020. Unfortunatly it's not available. Instead I installed docker and tried to install docker-compose:

tdnf install -y docker
pip install pip --upgrade
pip install wheel docker-compose

For some resons docker-compose installation failed. Conflits between raspberry architecture, pip version and PEP 517.. I tried a couple of workarounds without success.

CGroups

They are there (yay) and properly setup from the get go (yay). However it's cgroup v1 (oh..), which is slowly getting deprecated (perfs and security limitations). I would have hoped for a better and more up to date version on the most recent (and still in beta) version of the distrib..

Init system

The init system uses systemd. With tdnf, and some other similarities from rhel based system this is not surprising but an interesting point for a very lightweight system. Alpine, Or even CoreOS I belive used an openrc based init instead. I had some weird issues with openrc/docker on Alpine with docker istelf not being able to be properly restarted. Systemd also bring a lot more modern tooling around ntp client, dns resolver, log managment ect..

Thoughts about PhotonOS

PhotonOS feel like a crossover between a RHEL based system and a lighter system, but fail short in term of stability and package availability. tdnf seems interesting through and there is some good ideas but it seems like photon is built with a single purpose : being a vsphere light system to run kubernetes nodes in vsphere.

The alternatives are just too ahead in the game for PhotonOS from what I can see. The only point where it might be interesting is its deeper integration in vsphere. But honestly, All other available system do fine on it anyway, and are better on other aspects.

Another bad point for PhotonOS being its licence.

And to wrap up with one last item: Photon is already on its 4th version. I was expecting something else, more stable and more mature.

If you want to get your hand on it yourself and make your own opinion here are a few links:

Avatar
Julien Pericat
Linux Sysadmin, SysOps & DevOps friendly

Happily automating and putting things in containers.

Related