Warning
This software is currently in development and should not be used in a production environment.
initd
is a supervisor daemon for Linux - written entirely in Rust™ - that conforms to the UNIX philosophy of doing one thing and doing it well1. initd
supervises other processes, possibly as an init system (process with PID 1). Its main goals are:
- Stability: The program is robust and reliable.
- Performance: The program is efficient and fast.
- Integrity: The code is well-documented, linted, tested, as well as easy to navigate and comprehend.
- Simplicity: The code is easy to understand, and the program is easy to use.
- Fun: Often overlooked, it should be seamless and fun to write code and to use the program.
initd
uses YAML configuration files to fully define the processes it supervises. The code aims to be simple in structure and easy to comprehend. Hence, you should be able to effortlessly navigate it to find out more about this project.
Note
This project draws inspiration from the computer of the NCC-1701-D USS Enterprise from Star Trek - The Next Generation2. The computer aboard the ship is a central system that manages the ship's operations. Hence, you will occasionally encounter references. Engage!
As a supervisor daemon, initd
starts and manages so-called services. Services are defined declaratively, initd
continuously tries to establish the defined state. To reach this goals, initd
employs subsystems, each providing special functionality integral to initd
's operation.
A service is a description of a program and its environment. Such a description contains information about
- the type of the program
- the program's name, where to find it, how to start it, how to shut it down
- what the environment that the program should run in looks like
- how to test the program's current state
There are temporary and permanent services.
initd
consists of the following subsystems:
block-beta
columns 12
space space space START:6 space space space
SCHEDULER:6 WATCHER:6
RECONCILER:6 REFLECTOR:6
space space space API:6 space space space
This subsystem initd
and handles the initialization of initd
itself.
This subsystem starts, restarts and stops services.
This subsystem reacts to state changes of services.
This subsystem observes services and publishes their state transitions.
This subsystem provides diagnostic functionalities.
This subsystems handles API requests used to interact with initd
during run-time.