-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and enable openrc/systemd service via yip files (#505)
- Loading branch information
Showing
22 changed files
with
200 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
packages: | ||
- name: "alpine" | ||
category: "initrd" | ||
version: "3.8.1+1" | ||
version: "3.8.1+2" | ||
description: "Provides custom initrd scripts for alpine" | ||
# This syncs with the alpine version at https://gitlab.alpinelinux.org/alpine/mkinitfs/-/blob/master/initramfs-init.in?ref_type=heads | ||
# any changes to the initramfs-init.in file should be looked at and backported if necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
packages: | ||
- name: "kairos-overlay-files" | ||
category: "static" | ||
version: "1.1.6" | ||
version: "1.1.7" |
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
packages/static/kairos-overlay-files/files/etc/systemd/system/systemd-firstboot.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
packages/static/kairos-overlay-files/files/system/oem/09_services.yaml
This file was deleted.
Oops, something went wrong.
129 changes: 129 additions & 0 deletions
129
packages/static/kairos-overlay-files/files/system/oem/09_systemd_services.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Rootfs Kairos OEM configuration file | ||
# | ||
# This file is part of Kairos and will get reset during upgrades. | ||
|
||
name: "Default config" | ||
stages: | ||
boot: | ||
- name: "Default sysctl settings" | ||
sysctl: | ||
net.core.rmem_max: 2500000 | ||
vm.max_map_count: 262144 | ||
initramfs: | ||
- name: "Default systemd config" | ||
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]' | ||
systemctl: | ||
enable: | ||
- multi-user.target | ||
- getty@tty1 | ||
- iscsid | ||
- systemd-timesyncd | ||
- nohang | ||
- nohang-desktop | ||
- fail2ban | ||
- logrotate.timer | ||
- sshd | ||
mask: | ||
- purge-kernels | ||
commands: | ||
- systemctl set-default multi-user.target | ||
- name: "Generate host keys" | ||
# Make sure the host always has available keys | ||
commands: | ||
- ssh-keygen -A | ||
- name: "Create systemd services" | ||
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]' | ||
files: | ||
- path: /etc/systemd/system/cos-setup-boot.service | ||
permissions: 0644 | ||
owner: 0 | ||
group: 0 | ||
content: | | ||
[Unit] | ||
Description=cOS system configuration | ||
Before=getty.target | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/bin/kairos-agent run-stage boot | ||
[Install] | ||
WantedBy=multi-user.target | ||
- path: /etc/systemd/system/cos-setup-fs.service | ||
permissions: 0644 | ||
owner: 0 | ||
group: 0 | ||
content: | | ||
[Unit] | ||
Description=cOS system after FS setup | ||
DefaultDependencies=no | ||
After=local-fs.target | ||
Wants=local-fs.target | ||
Before=sysinit.target | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/bin/kairos-agent run-stage fs | ||
[Install] | ||
WantedBy=sysinit.target | ||
- path: /etc/systemd/system/cos-setup-network.service | ||
permissions: 0644 | ||
owner: 0 | ||
group: 0 | ||
content: | | ||
[Unit] | ||
Description=cOS setup after network | ||
After=network-online.target | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/bin/kairos-agent run-stage network | ||
[Install] | ||
WantedBy=multi-user.target | ||
- path: /etc/systemd/system/cos-setup-reconcile.service | ||
permissions: 0644 | ||
owner: 0 | ||
group: 0 | ||
content: | | ||
[Unit] | ||
Description=cOS setup reconciler | ||
[Service] | ||
Nice=19 | ||
IOSchedulingClass=2 | ||
IOSchedulingPriority=7 | ||
Type=oneshot | ||
ExecStart=/bin/bash -c "systemd-inhibit /usr/bin/kairos-agent run-stage reconcile" | ||
TimeoutStopSec=180 | ||
KillMode=process | ||
KillSignal=SIGINT | ||
[Install] | ||
WantedBy=multi-user.target | ||
- path: /etc/systemd/system/cos-setup-reconcile.timer | ||
permissions: 0644 | ||
owner: 0 | ||
group: 0 | ||
content: | | ||
[Unit] | ||
Description=cOS setup reconciler | ||
[Timer] | ||
OnBootSec=5min | ||
OnUnitActiveSec=60min | ||
Unit=cos-setup-reconcile.service | ||
[Install] | ||
WantedBy=multi-user.target | ||
- name: "Enable systemd services" | ||
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]' | ||
commands: | ||
- ln -sf /etc/systemd/system/cos-setup-reconcile.timer /etc/systemd/system/multi-user.target.wants/cos-setup-reconcile.timer | ||
- ln -sf /etc/systemd/system/cos-setup-fs.service /etc/systemd/system/sysinit.target.wants/cos-setup-fs.service | ||
- ln -sf /etc/systemd/system/cos-setup-boot.service /etc/systemd/system/multi-user.target.wants/cos-setup-boot.service | ||
- ln -sf /etc/systemd/system/cos-setup-network.service /etc/systemd/system/multi-user.target.wants/cos-setup-network.service |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/system/init-svc/openrc/cos-setup/files/etc/init.d/cos-setup-boot
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/system/init-svc/openrc/cos-setup/files/etc/init.d/cos-setup-network
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
packages/system/init-svc/openrc/cos-setup/files/etc/init.d/cos-setup-reconcile
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/system/init-svc/systemd/services/cos-setup-boot.service
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/system/init-svc/systemd/services/cos-setup-fs.service
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/system/init-svc/systemd/services/cos-setup-network.service
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.