Another minimal init system for Unix/Linux containers
/ˈiːlɛm/
the primordial matter of the universeDuring the Linux startup process,ylem
is intended to sequentially execute arbitrary “user scripts”
(alphabetically sorted). Moreover ylem
provides logging
which facilitates startup debugging.
Startup scripts executed through ylem
SHOULD be aimed to:
For example, ylem
COULD startsupervisor
,
to manage daemons, as soon as the system is sufficiently ready.
Create an /etc/ylem/scripts
directory and put your bootstraping scripts.
Then scripts are executed alphabetically sorted.
In a Dockerfile
:
ENTRYPOINT ["dumb-init", "-c", "--", "ylem", "start", "--"]
CMD ["sleep", "infinity"]
The configuration uses a YAML syntax
and remains in /etc/#{progname}/config.yml
,
where progname
is ylem
.
Furthermore configuration filepath can be set on the
CLI.
Available configuration keys are:
scripts.path
/etc/#{progname}/scripts
logger.file
/var/log/#{progname}.log
logger.level
INFO
(see: Logger::Severity)environment.file
/etc/environment
Missing configuration keys use default values.
Configuration file can be: complete, partial or empty.
Ylem provides its own logging mechanism, based onLogger
.
During its init process, each handled script is logged to logger.file
.
Depending on logger.level
only the messages with a level greater or equal
will be published to the log file.
Level | Format | Summary |
---|---|---|
DEBUG |
/"BEGIN"/ |
script started |
INFO |
/".*"/ |
script message echoed to STDOUT |
WARN |
/".*"/ |
script message echoed to STDERR |
DEBUG |
/"ENDED \[0\]/" |
script ended (success) |
ERROR |
/"ERROR \[[0-9]+\]"/ |
script error |