PIDZERO

lightweight container-native process manager

CONTAINERS ARE HARD

Well, containers themselves are pretty easy, its operationalizing them that is hard. Its not enough just to run your app in a container anymore, you need log shipping, service discovery, monitoring, and a host of other services too, but Docker (and LXC) is designed to only run a single process in each container.

To get around this, some devops engineers use tools like supervisord or runit (or, god-forbid, they install systemd in a container), but these are large (supervisord) and unnecessarily complicated (runit). Lots of other engineers use simple shells scripts to do what they need, but when was the last time you trusted a shell script to do anything mission critical? Both of these tools were designed for full OSes, not minimal containers. They're large, their folder structures are sprawling, and it takes an expert just to get them to work correctly.

PIDZERO

We recognize that today's problems need new answers, and our answer for this problem is PIDZERO. PIDZERO is different. Its designed for containers from the ground up, simple in its implementation, and easy to learn.

USING PIDZERO

Using PIDZERO is easy. If you know JSON, you can deploy PIDZERO.

Process configration is stored in daemons.json


                                        [
                                            {
                                                "name": "test",
                                                "command": "sleep 100",
                                                "comment": "this is a test daemon definition for the purpose of documentation",
                                                "vital": true,
                                                "environment": [
                                                    "MY_CUSTOM_VARIABLE=mycustomvalue"
                                                ]
                                            }
                                        ]
                                    
  • NAME => a name for your daemon
  • COMMAND => command to run as the daemon executable
  • COMMENT => a human-readable comment for reference
  • VITAL => mark the daemon as "vital", causing PIDZERO to exit if the daemon exists
  • ENVIRONMENT => environment variables to append to the command

START PIDZERO

To start PIDZERO, simply invoke it from the command line or as a container entrypoint.

                                        
                                            $> /etc/pidzero/pidzero
                                        
                                    

For full documentation, please see our Gitlab repo for PIDZERO

Get PIDZERO

Pre-Compiled Binary

  • Coming soon

Docker Images

  • Coming soon

Compile from Source

Roadmap

  • We would like to implement a REST API for PIDZERO so its status is queryable from Docker
  • We would also like to implement a TCP monitor for compaibility with other healthchecks
  • Eventually we will make other log formats available