There’s a whole world of edge kiosks out there
When we think about edge computing use cases, we often think of unattended or headless boxes that real people — real users — don't interact with directly or knowingly. Think IoT devices, industrial equipment, network base stations, smart building controllers, and so on.
But there's a whole other class of edge computing devices that are deployed at scale, distributed across locations, but that users interact with directly through a graphical user interface.
We can call this class of devices edge computing ‘kiosks’, but it encompasses everything from ticket machines, vending machines and parking meters to ATMs, point of sale (POS), and interactive digital signage.
Managing kiosks is just as challenging as other edge devices
Traditionally single-app kiosks — such as the ATM above — have evolved from a PC operating model. We’re sure you’ve been in a museum and found that the information screen is just a full-screen browser on a Windows machine.
But kiosks present many of the same challenges and requirements around manageability, security and reliability as any other edge computing host. They:
- Are at risk of tampering, so we need an ability to secure and verify the boot and make the software stack immutable
- Are deployed out in the field for years, needing new feature upgrades and patches, without risk of bricking the device and requiring a field engineering visit, so we need A/B upgrades.
- May be deployed in large distributed fleets in locations lacking technical staff, whether it's a museum or a parking garage, therefore we need automated installation and remote/centralized operations
- May run software with different lifecycles than the OS itself and are in need of the flexibility to update parts of the system outside the main OS lifecycle
What are your options?
Aside from good ol’ Windows XP or OS/2 Warp, there are a number of different software options out there that you can use to build locked-down kiosks for untrusted users.
For example, Windows has a kiosk mode, and so does Android. Kiosks can also be created with Ubuntu or specialized software like OpenKiosk. PC-like devices can potentially be managed with mobile device management (MDM) solutions.
And although some of these solutions do better than others at solving the security and operational challenges of running kiosks, we’ve seen a lot of interest from users in using the CNCF Sandbox Kairos project for their kiosk use cases.
At first glance, this may seem odd: our Kairos team did not set out to target kiosk use cases, and we have never pitched it that way when having conversations at conferences. To us, Kairos is a Linux meta-distribution designed to simplify the creation and management of edge Kubernetes clusters, for traditional edge computing use cases.
But the Kairos project is actually a great fit because it was built for managing edge nodes with tamper-resistent security, resilience and automation — all things that kiosks require, just like other edge devices. So let’s take this opportunity to bring some cloud native innovation to a whole new industry!
What does Kairos offer?
Let’s not get hung up on the term ‘Kubernetes’. Kairos uses Kubernetes to perform management tasks, such as node upgrades, at scale. Kubernetes is not the final deliverable, it’s merely a technical detail, enabling some of Kairos’s features.
For example, Kairos supports:
- Trusted boot, ensuring that tampering is prevented
- A/B upgrades for risk-free software updates
- Immutability, for tamper-resistance and simplified configuration management
- Automated installation, for reduced field engineering costs
- Centralized operations via Kubernetes controllers
- Live layering for software extensibility
It’s also lightweight, meaning it can run on limited edge hardware, and supports a wide range of hardware and customizable OS components.
Kairos in action: deploying a GUI application to a kiosk
For the purpose of this post, we will use the example of a single-app kiosk. We will show how Kairos can be used to run a single GUI application in “kiosk mode” (using cage), meaning that the users aren’t able to run anything else on the machine.
Our example application will be just a browser serving the “kairos.io” website. Replacing that with the application of your choice should be trivial.
Here is the software stack of this example:
1. Create a custom Kairos image
The standard Kairos images don’t include the necessary packages, like the Chromium browser, to run GUI applications.
We’ll create a derivative image adding those packages by creating a Dockerfile that starts from a released image. Check our docs here to learn more.
This dockerfile uses an Ubuntu “standard” Kairos image (with K3s), installs a couple of additional packages for `cage` to work, and installs a build of the Chromium browser. Chromium will be used as the kiosk application, serving a single web page.
2. Create a Kairos config
The following Kairos config file will make sure Kairos installs automatically and start a systemd service to load the kiosk application automatically upon boot.
Most of the config is implementing the `cage` docs.
Sidenote: Although we mentioned trusted boot earlier in this document, for sake of brevity, here we’ll describe the simpler installation of Kairos without trusted boot. If you are planning to implement this in production, make sure you go through the trusted boot docs!
Save the following file as `config.yaml`:
If for some reason the kiosk application does not start, check the two output files for errors:
3. Build the container image:
Now that we have a dockerfile, it’s time to build the container image with it:
4. Build an ISO
We will use Auroraboot to convert the image we built in the step above into a bootable ISO.
5. Boot the ISO
The generated ISO has the Kairos config embedded in it, which means we simply have to boot the ISO and let it complete the installation.
Use the hypervisor of your choice or boot a real device with the ISO and wait until the installation completes, rebooting automatically into the installed system.
If you are on Linux with qemu installed, here are some commands that should work for you:
You should eventually see qemu running chromium in kiosk mode, serving the kairos.io web page:
You’ll notice that there is no way for the user to open any other application. Even if the application crashes or exits, it will be restarted.
Note: In a production deployment, the Kairos config would need to change in order to:
- Not have a default user (or any login capabilities at all)
- Become a multi node cluster (e.g. as per the docs)
…and others. Please refer to the Kairos documentation for recommendations and available configuration options.
Ideas and final thoughts
In the example above, we just served a publicly available web page. But Kubernetes is also running in the background. Although it can be used to upgrade Kairos, Kubernetes can also be used to host the actual kiosk application.
Such an application would even be able to access specialized hardware attached to the Kairos node.
For example, consider an application that allows a doctor to analyze a patient’s CT scan using AI. Capturing the CT scan might require the node to communicate with the CT scanner and AI processing might require access to the GPU. All these can be packaged nicely and run on the node’s Kubernetes.
The example above simply demonstrates that running GUI applications with Kairos is possible and easy. Starting a full desktop environment is also possible. We actually started playing with the idea by running XFCE: it’s just a matter of installing the needed packages and enabling the relevant systemd services. This scenario might be suitable for school laboratories and cases when more than one application should be offered to the user.
If you liked this use of Kairos or if you have ideas on how this could be extended further, we’d love to hear from you! Head to the Kairos site and start building your own kiosk solution. Or, if you’d rather get enterprise level support and guidance, check out Spectro Cloud’s Palette Edge, which builds on top of Kairos.