|
1 | 1 | # Zinit [](https://github.com/threefoldtech/zinit/actions/workflows/rust.yml) |
2 | 2 |
|
3 | | -Zinit is a lightweight PID 1 replacement inspired by runit, written in Rust using Tokio for async I/O. It provides both a Unix socket interface and an HTTP API for interacting with the process manager. |
| 3 | +Zinit is a lightweight PID 1 replacement inspired by runit, written in Rust using Tokio for async I/O. It manages service startup, supervision, and lifecycle, ensuring configured services remain running and handling dependencies through a simple declarative interface. |
4 | 4 |
|
5 | | -### Key Features |
| 5 | +## What this is |
6 | 6 |
|
7 | | -- **Service Management**: Ensures configured services are up and running at all times |
8 | | -- **Dependency Handling**: Supports service dependencies for proper startup ordering |
9 | | -- **Simple Control Interface**: Provides an intuitive CLI to add, start, stop, and monitor services |
10 | | -- **Container Support**: Can run in container mode with appropriate signal handling |
11 | | -- **Configurable Logging**: Multiple logging options including ringbuffer and stdout |
| 7 | +Zinit is an init system and process supervisor designed for environments that need reliable service management without the complexity of traditional init systems. It runs as PID 1 or in container mode, monitors configured services, restarts them on failure, and respects dependency ordering during startup and shutdown. Zinit exposes both a Unix socket control interface and an HTTP proxy with a JSON-RPC 2.0 API. |
| 8 | + |
| 9 | +## What this repository contains |
| 10 | + |
| 11 | +- **`zinit` binary** — the init system and process supervisor |
| 12 | +- **Unix socket control interface** — for local CLI interaction |
| 13 | +- **HTTP proxy** — JSON-RPC 2.0 API for remote management |
| 14 | +- **CLI commands** — `init`, `list`, `start`, `stop`, `monitor`, `proxy`, and more |
| 15 | +- **Declarative service configuration** via YAML files |
| 16 | +- **Container mode** with appropriate signal handling |
| 17 | +- **Configurable logging** including ringbuffer and stdout options |
| 18 | + |
| 19 | +## Role in the stack |
| 20 | + |
| 21 | +Zinit serves as the init system for ZOS / Zero-OS nodes and can also be used as a standalone process manager in containers or lightweight Linux systems. It is the layer that ensures system services (networking, storage, provisioning, and user workloads) are started in the correct order and kept healthy. External tools and clients — including the Zinit Client Rust library — can interact with it over its socket or HTTP APIs. |
| 22 | + |
| 23 | +## ZOS / Zero-OS |
| 24 | + |
| 25 | +ZOS, also known as Zero-OS, is the operating system layer used to run and manage nodes. It provides the low-level runtime environment for workloads, networking, storage, and automation. Zinit is the init system at the core of ZOS, responsible for bootstrapping and supervising all node services. |
| 26 | + |
| 27 | +## Relation to ThreeFold |
| 28 | + |
| 29 | +This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment. |
| 30 | + |
| 31 | +## Ownership |
| 32 | + |
| 33 | +This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology. |
12 | 34 |
|
13 | 35 | ## Installation |
14 | 36 |
|
15 | 37 | ```bash |
16 | 38 | curl https://raw.githubusercontent.com/threefoldtech/zinit/refs/heads/master/install.sh | bash |
17 | 39 |
|
18 | | -#to install & run |
| 40 | +# to install & run |
19 | 41 | curl https://raw.githubusercontent.com/threefoldtech/zinit/refs/heads/master/install_run.sh | bash |
20 | 42 | ``` |
21 | 43 |
|
@@ -75,4 +97,4 @@ See the [OpenRPC specs](openrpc.json) for more information about available RPC c |
75 | 97 | ## License |
76 | 98 |
|
77 | 99 | This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. |
78 | | -Copyright (c) TFTech NV. |
| 100 | +Copyright (c) TF-Tech NV. |
0 commit comments