-
Notifications
You must be signed in to change notification settings - Fork 0
Home
'YInit' is designed to boot on bare-metal and in containerized environment. As in containerized environment host OS already provides multiple sub-systems, 'YInit' is only required to bring up container-specific services.
Services provides functions. Targets represent specific boot state. Instances represent service performance.
init:
- devfs [oneshot or daemon]: mount - devfs, sysfs and procfs
- hwclock [oneshot]: set a hardware clock
- console [daemon]: set console
launch
- localmount [oneshot]: check and remount rootfs to 'rw', check and mount remaining filesystems.
- storagemaintenace [periodic]: check and maintain filesystems – fstrim, BtrFS scrub
- hostname [oneshot]: set the hostname
network
- firewall [oneshot]: set rules
- network manager [daemon]: start network manager
- netmount [oneshot]: mount network filesystems
netowork.online
- ntp [daemon]
system
- sshd [daemon]
- nfs server
user
- getty [daemon]
oneshot – run coresponding process once at launch and optionally once at shutdown. periodic – run coresponding process according to scheduler deamon – run process as daemon
Each service run by YInit belongs to a specific target, the following targets are defined:
- init – Does initialization of the following special filesystems: devfs, procfs, sysfs.
- launch – Checks and mounts root and user filesystems, loads drivers, sets up hardware settings, launches logging capability.
- network – Initializes network via ConnMan and firewall.
- network.online – Brings up network services that require WAN access: NTP client. Successful pass of this target indicates that the machine is considered to be online.
- system – Starts system services such as SSH server and other.
- user – Runs user related services: login manager, task scheduler and other.
YInit ensures to start all active services for a specific target regarding to defined service dependencies.
The default target to achieve is 'user' (6), targets are executed in the order show above (that is: init, launch, network, network.online, system, user).
Target 'user' is the state of the OS that provides all user desired services. Targets from 1 to 4 are bare-metal specific, in containerized environment these are to be provided by host OS. Targets 5 and 6 are common for bare-metal and containerized environments – these are responsible for launching services specified for a given computer/VM.
To ensure proper system boot and shutdown services must start and stop in a proper order.
This can be defined by defining the following relations per service:
after = serviceX,targetX
before = serviceX, targetZ
wants = service
requires = service