Concepts in Thymis
Thymis is built around several core concepts that help manage devices, configurations, and deployments effectively. Understanding these concepts is important for using Thymis to its full potential.
Fundamentally, concepts in Thymis revolve around the management of devices, device configurations, and the deployment of software and software updates to these devices. The concepts include:
- Hardware Devices: Represents a physical or virtual device managed by Thymis. These devices can be anything from Raspberry Pi boards to generic x86 devices. They are associated with device‑unique identifiers like hardware IDs or can be created on the fly for virtual devices without distinguishing properties. Deployments are associated with these devices when they run on them.
- Deployment: A running instance of a device configuration on a specific hardware device. It includes the software and settings applied to the device. A deployment is defined by an SSH public host key, which is used to access the device via SSH over the Thymis Controller WebSocket, and a reference to the commit of the project repository that the device is running.
- (Device-)Configuration: The set of settings and software that define how a device operates. This includes the software packages installed, network settings, and other parameters. Configurations are defined in Thymis Modules. Configurations also have associated tags, which allow for grouping and applying multiple modules to a device configuration.
- Tag: A label that can be applied to device configurations to group them together. Tags allow for easy management and application of settings across multiple devices. For example, you can create a tag for all devices in a specific location or for devices running a particular application. When deploying, you can also select a tag to deploy to devices with that tag.
- Module: A reusable component that defines a set of configurations and settings for devices. Modules can be used to package software, define configurations, and manage deployments. They are written in Python and Nix and can be used to create custom configurations for devices. Modules can also include templates, which allow for dynamic configuration based on device‑specific parameters.
- Secrets: A secure piece of information, such as a password or API key, that can be deployed to devices. Secrets are used to manage sensitive information that needs to be accessed by the software running on the devices. They are encrypted and stored securely in Thymis, ensuring that sensitive data is protected during deployment and deployed to the devices such that decryption takes place on the device.
- Artifacts: A file or package that can be deployed to devices. Artifacts are stored in plain text in the project repository and can be used to deploy files such as configuration files, scripts, or any other necessary files that need to be present on the device. Artifacts are referenced in Nix code and can be included in device configurations to ensure they are available when the device is deployed or updated.
- External repositories/Inputs: Thymis uses Nix Flakes to manage dependencies and inputs. Repositories or inputs are Git repositories that contain Nix expressions and Thymis Modules. They can be used to package software, define configurations, and manage deployments. Inputs can be added to Thymis projects, allowing you to use external repositories and modules in your device configurations.