diff --git a/base/systemd-presets/debian/deb_folder/changelog b/base/systemd-presets/debian/deb_folder/changelog new file mode 100644 index 000000000..fe3b1aa17 --- /dev/null +++ b/base/systemd-presets/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +systemd-presets (1.0) unstable; urgency=medium + + * Initial release. + + -- Charles Short Mon, 29 Aug 2022 16:35:37 -0400 diff --git a/base/systemd-presets/debian/deb_folder/control b/base/systemd-presets/debian/deb_folder/control new file mode 100644 index 000000000..3789629df --- /dev/null +++ b/base/systemd-presets/debian/deb_folder/control @@ -0,0 +1,14 @@ +Source: systemd-presets +Section: admin +Priority: optional +Maintainer: Starlingx Developers +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.4.1 +Homepage: https://www.starlingx.io + +Package: systemd-presets +Architecture: all +Depends: + ${misc:Depends} +Description: System Profiles + Install system preset based on system type. diff --git a/base/systemd-presets/debian/deb_folder/copyright b/base/systemd-presets/debian/deb_folder/copyright new file mode 100644 index 000000000..512c8eb58 --- /dev/null +++ b/base/systemd-presets/debian/deb_folder/copyright @@ -0,0 +1,27 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: system-config +Source: https://opendev.org/starlingx/integ/ + +Files: * +Copyright: (c) 2013-2022 Wind River Systems, Inc +License: Apache-2 + +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/base/systemd-presets/debian/deb_folder/rules b/base/systemd-presets/debian/deb_folder/rules new file mode 100644 index 000000000..e6e1fe452 --- /dev/null +++ b/base/systemd-presets/debian/deb_folder/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_install: + install -d debian/tmp/etc/systemd/system-preset + install -m 544 stx/systemd/defaults/99-default-disable.preset debian/tmp/etc/systemd/system-preset + install -m 544 stx/systemd/defaults/90-default.preset debian/tmp/etc/systemd/system-preset + install -d debian/tmp/usr/share/systemd-presets + install -m 544 stx/systemd/traits/* debian/tmp/usr/share/systemd-presets + dh_install diff --git a/base/systemd-presets/debian/deb_folder/systemd-presets.install b/base/systemd-presets/debian/deb_folder/systemd-presets.install new file mode 100644 index 000000000..5427551fa --- /dev/null +++ b/base/systemd-presets/debian/deb_folder/systemd-presets.install @@ -0,0 +1,2 @@ +etc/systemd/system-preset/* +usr/share/systemd-presets/* diff --git a/base/systemd-presets/debian/meta_data.yaml b/base/systemd-presets/debian/meta_data.yaml new file mode 100644 index 000000000..6f1135a45 --- /dev/null +++ b/base/systemd-presets/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: systemd-presets +debver: 1.0 +src_path: source +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/base/systemd-presets/source/.gitignore b/base/systemd-presets/source/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/base/systemd-presets/source/stx/systemd/defaults/90-default.preset b/base/systemd-presets/source/stx/systemd/defaults/90-default.preset new file mode 100644 index 000000000..dc8907ba8 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/defaults/90-default.preset @@ -0,0 +1,27 @@ +# System stuff +enable ssh.service +enable atd.* +enable cron.* +enable rpcbind.* +enable avahi-daemon.* +enable apparmor.* +enable set-grub-install-device.* +enable networking.* + +# The various syslog implementaitons +enable syslog-ng.* + +# Network facing +enable libvirtd.service + +# Storage +enable multipathd.service +enable libstoragemgmt.service +enable lvm2-lvmpolld.socket +enable lvm2-monitor.* +enable lvm2-lvmetad.* +enable dm-event.* +enable dmraid-activation.service + +# Others +enable virlogd.socket diff --git a/base/systemd-presets/source/stx/systemd/defaults/99-default-disable.preset b/base/systemd-presets/source/stx/systemd/defaults/99-default-disable.preset new file mode 100644 index 000000000..1f29b5059 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/defaults/99-default-disable.preset @@ -0,0 +1 @@ +disable * diff --git a/base/systemd-presets/source/stx/systemd/traits/aio.preset b/base/systemd-presets/source/stx/systemd/traits/aio.preset new file mode 100644 index 000000000..95a8e95c2 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/traits/aio.preset @@ -0,0 +1,126 @@ +# 00-mtce-storage.preset +disable goenabled-storage.service + +# 00-cgcs-patch.preset +enable sw-patch-controller.service +enable sw-patch-controller-daemon.service +enable sw-patch-agent.service +enable sw-patch.service + +# 00-config-gate-worker.preset +enable config.service + +# 00-controllerconfig.preset +enable controllerconfig.service + +# 00-filesystem-scripts.preset +enable uexportfs.service + +# 00-fm-rest-api.preset +enable fm-api.service + +# 00-haproxy-config.preset +disable haproxy.service + +# 00-iscsi-initiator-utils-config.preset +enable iscsi-shutdown.service + +# 00-mtce-control.preset +enable hbsAgent.service + +# 00-nfs-utils-config.preset +disable rpc-statd.service +disable rpc-statd-notify.service +enable nfs-common.service +enable nfs-server.service + +# 00-sm-api.preset +enable sm-api.service + +# 00-sm-common.preset +enable sm-watchdog.service + +# 00-sm-eru.preset +enable sm-eru.service + +# 00-sm.preset +enable sm.service +enable sm-shutdown.service + +# 00-sysinv-agent.preset +enable sysinv-agent.service + +# 00-sysinv-fpga-agent.preset +enable sysinv-fpga-agent.service +enable sysinv-conf-watcher.service +enable sysinv-conf-watcher.path + +# 00-tuned-config.preset +enable tuned.service + +# 85-debpkg-issues.preset +enable mountnfs.service + +# nfs debian +enable nfs-blkmap.service +enable nfs-idmapd.service +enable nfs-mountd.service +enable nfs-client.target + +# isolcpus-device-plugin.spec +enable isolcpu_plugin.service + +# k8s-pod-recovery.spec +enable k8s-pod-recovery.service + +# lldpd.spec +enable lldpd.service + +# openvswitch.spec +disable openvswitch.service + +# libvirt.spec (Package currently not included) + +# qemu-kvm.spec (Package currently not included) + +# mtce-compute.spec +enable goenabled-worker.service + +# lighthtpd +enable lighttpd.service + +# qemu-kvm-ev +enable qemu_clean.service + +# mtce.spec +enable mtcClient.service +enable fsmon.service +enable hbsClient.service +enable mtclog.service +enable iscsid.service +enable rsync.service +enable mtcalarm.service +enable goenabled.service +enable crashDumpMgr.service +enable hostw.service +enable pmon.service +enable lmon.service + +# mtce-guest.spec +enable guestServer.service + +# collect-engtools.spec (Move to rutime enablement. Typically not installed. Disable, not needed for AIO) +#enable collect-engtools.service + +# logmgmt.spec +enable logmgmt.service + +# nfscheck.spec (Move to rutime enablement. Disable, only on non-controllers) +#enable nfscheck.service + +# platform-util.spec (Move to rutime enablement. Disable, only on non-controllers) +#enable opt-platform.service + +# worker-utils.spec +enable affine-platform.sh.service +enable affine-tasks.service diff --git a/base/systemd-presets/source/stx/systemd/traits/controller.preset b/base/systemd-presets/source/stx/systemd/traits/controller.preset new file mode 100644 index 000000000..bffe4ea10 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/traits/controller.preset @@ -0,0 +1,136 @@ +# 00-mtce-storage.preset +disable goenabled-storage.service + +# 00-cgcs-patch.preset +enable sw-patch-controller.service +enable sw-patch-controller-daemon.service +enable sw-patch-agent.service +enable sw-patch.service + +# 00-config-gate-worker.preset +enable config.service + +# 00-controllerconfig.preset +enable controllerconfig.service + +# 00-filesystem-scripts.preset +enable uexportfs.service + +# 00-fm-rest-api.preset +enable fm-api.service + +# 00-haproxy-config.preset +disable haproxy.service + +# 00-iscsi-initiator-utils-config.preset +enable iscsi-shutdown.service + +# 00-mtce-compute.preset +disable goenabled-worker.service + +# 00-mtce-control.preset +enable hbsAgent.service + +# 00-nfs-utils-config.preset +disable rpc-statd.service +disable rpc-statd-notify.service +enable nfs-common.service +enable nfs-server.service + +# 00-sm-api.preset +enable sm-api.service + +# 00-sm-common.preset +enable sm-watchdog.service + +# 00-sm-eru.preset +enable sm-eru.service + +# 00-sm.preset +enable sm.service +enable sm-shutdown.service + +# 00-sysinv-agent.preset +enable sysinv-agent.service + +# 00-sysinv-fpga-agent.preset +disable sysinv-fpga-agent.service +disable sysinv-conf-watcher.service +disable sysinv-conf-watcher.path + +# 00-tuned-config.preset +enable tuned.service + +# 85-debpkg-issues.preset +enable mountnfs.service + +# nfs debian +enable nfs-blkmap.service +enable nfs-idmapd.service +enable nfs-mountd.service +enable nfs-client.target + +# isolcpus-device-plugin.spec +disable isolcpu_plugin.service + +# k8s-pod-recovery.spec +enable k8s-pod-recovery.service + +# lldpd.spec +enable lldpd.service + +# openvswitch.spec +disable openvswitch.service + +# libvirt.spec (Package currently not included) + +# qemu-kvm.spec (Package currently not included) + +# qemu-clean +enable qemu_clean.service + +# lightttpd +enable lighttpd.service + +# mtce-storage.spec (Move to rutime enablement. Disable, not needed for AIO) +#enable goenabled-storage.service + +# mtce.spec +enable fsmon.service +enable mtcClient.service +enable hbsClient.service +enable mtclog.service +enable iscsid.service +enable rsync.service +enable goenabled.service +enable mtcalarm.service +enable crashDumpMgr.service +enable hostw.service +enable pmon.service +enable lmon.service + +# mtce-guest.spec +disable guestServer.service + + +# collect-engtools.spec (Move to rutime enablement. Typically not installed. Disable, not needed for AIO) +#enable collect-engtools.service + +# logmgmt.spec +enable logmgmt.service + +# nfscheck.spec (Move to rutime enablement. Disable, only on non-controllers) +disable nfscheck.service + +# platform-util.spec (Move to rutime enablement. Disable, only on non-controllers) +disable opt-platform.mount +disable opt-platform.service + +# worker-utils.spec +disable affine-platform.sh.service +disable affine-tasks.service + +disable worker-config-gate.service +disable storageconfig.service +disable workerconfig.service +disable kvm_timer_advance_setup.service diff --git a/base/systemd-presets/source/stx/systemd/traits/lowlatency.preset b/base/systemd-presets/source/stx/systemd/traits/lowlatency.preset new file mode 100644 index 000000000..95a8e95c2 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/traits/lowlatency.preset @@ -0,0 +1,126 @@ +# 00-mtce-storage.preset +disable goenabled-storage.service + +# 00-cgcs-patch.preset +enable sw-patch-controller.service +enable sw-patch-controller-daemon.service +enable sw-patch-agent.service +enable sw-patch.service + +# 00-config-gate-worker.preset +enable config.service + +# 00-controllerconfig.preset +enable controllerconfig.service + +# 00-filesystem-scripts.preset +enable uexportfs.service + +# 00-fm-rest-api.preset +enable fm-api.service + +# 00-haproxy-config.preset +disable haproxy.service + +# 00-iscsi-initiator-utils-config.preset +enable iscsi-shutdown.service + +# 00-mtce-control.preset +enable hbsAgent.service + +# 00-nfs-utils-config.preset +disable rpc-statd.service +disable rpc-statd-notify.service +enable nfs-common.service +enable nfs-server.service + +# 00-sm-api.preset +enable sm-api.service + +# 00-sm-common.preset +enable sm-watchdog.service + +# 00-sm-eru.preset +enable sm-eru.service + +# 00-sm.preset +enable sm.service +enable sm-shutdown.service + +# 00-sysinv-agent.preset +enable sysinv-agent.service + +# 00-sysinv-fpga-agent.preset +enable sysinv-fpga-agent.service +enable sysinv-conf-watcher.service +enable sysinv-conf-watcher.path + +# 00-tuned-config.preset +enable tuned.service + +# 85-debpkg-issues.preset +enable mountnfs.service + +# nfs debian +enable nfs-blkmap.service +enable nfs-idmapd.service +enable nfs-mountd.service +enable nfs-client.target + +# isolcpus-device-plugin.spec +enable isolcpu_plugin.service + +# k8s-pod-recovery.spec +enable k8s-pod-recovery.service + +# lldpd.spec +enable lldpd.service + +# openvswitch.spec +disable openvswitch.service + +# libvirt.spec (Package currently not included) + +# qemu-kvm.spec (Package currently not included) + +# mtce-compute.spec +enable goenabled-worker.service + +# lighthtpd +enable lighttpd.service + +# qemu-kvm-ev +enable qemu_clean.service + +# mtce.spec +enable mtcClient.service +enable fsmon.service +enable hbsClient.service +enable mtclog.service +enable iscsid.service +enable rsync.service +enable mtcalarm.service +enable goenabled.service +enable crashDumpMgr.service +enable hostw.service +enable pmon.service +enable lmon.service + +# mtce-guest.spec +enable guestServer.service + +# collect-engtools.spec (Move to rutime enablement. Typically not installed. Disable, not needed for AIO) +#enable collect-engtools.service + +# logmgmt.spec +enable logmgmt.service + +# nfscheck.spec (Move to rutime enablement. Disable, only on non-controllers) +#enable nfscheck.service + +# platform-util.spec (Move to rutime enablement. Disable, only on non-controllers) +#enable opt-platform.service + +# worker-utils.spec +enable affine-platform.sh.service +enable affine-tasks.service diff --git a/base/systemd-presets/source/stx/systemd/traits/storage.preset b/base/systemd-presets/source/stx/systemd/traits/storage.preset new file mode 100644 index 000000000..e69de29bb diff --git a/base/systemd-presets/source/stx/systemd/traits/worker-lowlatency.preset b/base/systemd-presets/source/stx/systemd/traits/worker-lowlatency.preset new file mode 100644 index 000000000..121871626 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/traits/worker-lowlatency.preset @@ -0,0 +1,152 @@ +# 00-mtce-storage.preset +disable goenabled-storage.service + +# 00-cgcs-patch.preset +disable sw-patch-controller.service +disable sw-patch-controller-daemon.service +enable sw-patch-agent.service +enable sw-patch.service + +# 00-controllerconfig.preset +enable config.service + +# 00-controllerconfig.preset +disable controllerconfig.service + +# 00-filesystem-scripts.preset +enable uexportfs.service + +# 00-fm-rest-api.preset +disable fm-api.service + +# 00-haproxy-config.preset +disable haproxy.service + +# 00-iscsi-initiator-utils-config.preset +enable iscsi-shutdown.service + +# 00-mtce-compute.preset +enable goenabled-worker.service + +# 00-mtce-control.preset +disable hbsAgent.service + +# 00-nfs-utils-config.preset +disable rpc-statd.service +disable rpc-statd-notify.service +enable nfs-common.service + +# 00-sm-api.preset +disable sm-api.service + +# 00-sm-common.preset +disable sm-watchdog.service + +# 00-sm-eru.preset +enable sm-eru.service + +# 00-sm.preset +disable sm.service +disable sm-shutdown.service + +# 00-sysinv-agent.preset +enable sysinv-agent.service + +# 00-sysinv-fpga-agent.preset +enable sysinv-fpga-agent.service +enable sysinv-conf-watcher.service +enable sysinv-conf-watcher.path + +# 00-tuned-config.preset +enable tuned.service + +# 85-debpkg-issues.preset +enable mountnfs.service + +# nfs debian +enable nfs-blkmap.service +enable nfs-idmapd.service +enable nfs-mountd.service +enable nfs-server.service +enable nfs-client.target + +# isolcpus-device-plugin.spec +enable isolcpu_plugin.service + +# k8s-pod-recovery.spec +disable k8s-pod-recovery.service + +# lldpd.spec +enable lldpd.service + +# openvswitch.spec +disable openvswitch.service + +# libvirt.spec (Package currently not included) + +# qemu-kvm.spec (Package currently not included) +enable qemu_clean.service + +# mtce-storage.spec (Move to rutime enablement. Disable, not needed for AIO) +#enable goenabled-storage.service + +# mtce.spec +enable mtcClient.service +enable hbsClient.service +enable fsmon.service +enable mtclog.service +enable iscsid.service +enable rsync.service +enable goenabled.service +enable mtcalarm.service +enable crashDumpMgr.service +enable hostw.service +enable pmon.service +enable lmon.service + +# mtce-guest.spec +enable guestServer.service + +# collect-engtools.spec (Move to rutime enablement. Typically not installed. Disable, not needed for AIO) +#enable collect-engtools.service + +# logmgmt.spec +enable logmgmt.service + +# nfscheck.spec (Move to rutime enablement. Disable, only on non-controllers) +enable nfscheck.service + +# platform-util.spec (Move to rutime enablement. Disable, only on non-controllers) +enable opt-platform.mount +enable opt-platform.service + +# worker-utils.spec +enable affine-platform.sh.service +enable affine-tasks.service + +# worker personality +disable ceph-manager.service +disable dcmanager-api.service +disable dcmanager-audit-worker.service +disable dcmanager-audit.service +disable dcmanager-manager.service +disable dcmanager-orchestrator.service +disable dcorch-api.service +disable dcorch-engine.service +disable dcorch-identity-api-proxy.service +disable dcorch-sysinv-api-proxy.service +disable drbd.service +disable fminit.service +disable lighttpd.service +disable memcached.service +disable guestAgent.service +disable slapd.service +disable barbican-api.service +disable barbican-keystone-listener.service +disable barbican-worker.service +disable keystone.service +disable postgresql.service +disable storageconfig.service +enable kvm_timer_advance_setup.service +enable worker-config-gate.service +enable workerconfig.service diff --git a/base/systemd-presets/source/stx/systemd/traits/worker.preset b/base/systemd-presets/source/stx/systemd/traits/worker.preset new file mode 100644 index 000000000..121871626 --- /dev/null +++ b/base/systemd-presets/source/stx/systemd/traits/worker.preset @@ -0,0 +1,152 @@ +# 00-mtce-storage.preset +disable goenabled-storage.service + +# 00-cgcs-patch.preset +disable sw-patch-controller.service +disable sw-patch-controller-daemon.service +enable sw-patch-agent.service +enable sw-patch.service + +# 00-controllerconfig.preset +enable config.service + +# 00-controllerconfig.preset +disable controllerconfig.service + +# 00-filesystem-scripts.preset +enable uexportfs.service + +# 00-fm-rest-api.preset +disable fm-api.service + +# 00-haproxy-config.preset +disable haproxy.service + +# 00-iscsi-initiator-utils-config.preset +enable iscsi-shutdown.service + +# 00-mtce-compute.preset +enable goenabled-worker.service + +# 00-mtce-control.preset +disable hbsAgent.service + +# 00-nfs-utils-config.preset +disable rpc-statd.service +disable rpc-statd-notify.service +enable nfs-common.service + +# 00-sm-api.preset +disable sm-api.service + +# 00-sm-common.preset +disable sm-watchdog.service + +# 00-sm-eru.preset +enable sm-eru.service + +# 00-sm.preset +disable sm.service +disable sm-shutdown.service + +# 00-sysinv-agent.preset +enable sysinv-agent.service + +# 00-sysinv-fpga-agent.preset +enable sysinv-fpga-agent.service +enable sysinv-conf-watcher.service +enable sysinv-conf-watcher.path + +# 00-tuned-config.preset +enable tuned.service + +# 85-debpkg-issues.preset +enable mountnfs.service + +# nfs debian +enable nfs-blkmap.service +enable nfs-idmapd.service +enable nfs-mountd.service +enable nfs-server.service +enable nfs-client.target + +# isolcpus-device-plugin.spec +enable isolcpu_plugin.service + +# k8s-pod-recovery.spec +disable k8s-pod-recovery.service + +# lldpd.spec +enable lldpd.service + +# openvswitch.spec +disable openvswitch.service + +# libvirt.spec (Package currently not included) + +# qemu-kvm.spec (Package currently not included) +enable qemu_clean.service + +# mtce-storage.spec (Move to rutime enablement. Disable, not needed for AIO) +#enable goenabled-storage.service + +# mtce.spec +enable mtcClient.service +enable hbsClient.service +enable fsmon.service +enable mtclog.service +enable iscsid.service +enable rsync.service +enable goenabled.service +enable mtcalarm.service +enable crashDumpMgr.service +enable hostw.service +enable pmon.service +enable lmon.service + +# mtce-guest.spec +enable guestServer.service + +# collect-engtools.spec (Move to rutime enablement. Typically not installed. Disable, not needed for AIO) +#enable collect-engtools.service + +# logmgmt.spec +enable logmgmt.service + +# nfscheck.spec (Move to rutime enablement. Disable, only on non-controllers) +enable nfscheck.service + +# platform-util.spec (Move to rutime enablement. Disable, only on non-controllers) +enable opt-platform.mount +enable opt-platform.service + +# worker-utils.spec +enable affine-platform.sh.service +enable affine-tasks.service + +# worker personality +disable ceph-manager.service +disable dcmanager-api.service +disable dcmanager-audit-worker.service +disable dcmanager-audit.service +disable dcmanager-manager.service +disable dcmanager-orchestrator.service +disable dcorch-api.service +disable dcorch-engine.service +disable dcorch-identity-api-proxy.service +disable dcorch-sysinv-api-proxy.service +disable drbd.service +disable fminit.service +disable lighttpd.service +disable memcached.service +disable guestAgent.service +disable slapd.service +disable barbican-api.service +disable barbican-keystone-listener.service +disable barbican-worker.service +disable keystone.service +disable postgresql.service +disable storageconfig.service +enable kvm_timer_advance_setup.service +enable worker-config-gate.service +enable workerconfig.service diff --git a/debian_pkg_dirs b/debian_pkg_dirs index afd6b6352..4d0580ab4 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -10,6 +10,7 @@ base/lvm2 base/lsb base/pf-bb-config base/systemd +base/systemd-presets base/watchdog centos-debian-compat ceph/ceph