Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions LICENSES-AND-NOTICES/SPECS/data/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,7 @@
"os-update",
"otelcol-contrib",
"persistent-mount",
"platform-manageability-agent",
"platform-observability-agent",
"platform-telemetry-agent",
"platform-update-agent",
Expand Down
15 changes: 15 additions & 0 deletions SPECS/platform-manageability-agent/env_wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
Comment thread
sfonn marked this conversation as resolved.

set -eu

update_infra_url() {
if [ -n "$PM_INVENTORY_URL" ]; then
local UPDATED_PM_DISCOVERY_INFRA_URL
UPDATED_PM_DISCOVERY_INFRA_URL=$(sed "s/^ serviceURL: '.*'/ serviceURL: '$PM_INVENTORY_URL'/" /etc/edge-node/node/confs/platform-manageability-agent.yaml)
echo -E "${UPDATED_PM_DISCOVERY_INFRA_URL}" > /etc/edge-node/node/confs/platform-manageability-agent.yaml
fi
}

update_infra_url

exec "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
g bm-agents 500
u pm-agent -:bm-agents - - /usr/sbin/nologin
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[Unit]
Description=Platform Manageability Agent
Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-manageability-agent/README.md

[Service]
ExecStart=/etc/edge-node/node/confs/pm-agent /usr/bin/pm-agent -config /etc/edge-node/node/confs/platform-manageability-agent.yaml
EnvironmentFile=/etc/edge-node/node/agent_variables
StandardOutput=journal
StandardError=journal
RestartSec=60
Restart=on-failure
Group=bm-agents
User=pm-agent
CPUQuota=20%
MemoryMax=128M

PrivateTmp=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes
ProtectClock=yes
ProtectHostname=yes
ProtectKernelLogs=yes

CapabilityBoundingSet=~CAP_LINUX_IMMUTABLE CAP_IPC_LOCK CAP_SYS_CHROOT CAP_BLOCK_SUSPEND CAP_LEASE
CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_PTRACE CAP_SYS_RAWIO CAP_SYS_TIME CAP_SYS_TTY_CONFIG
CapabilityBoundingSet=~CAP_WAKE_ALARM CAP_MAC_ADMIN CAP_MAC_OVERRIDE
CapabilityBoundingSet=~CAP_SETPCAP CAP_CHOWN CAP_NET_ADMIN
CapabilityBoundingSet=~CAP_CHOWN CAP_FSETID CAP_SETFCAP
CapabilityBoundingSet=~CAP_DAC_READ_SEARCH CAP_FOWNER CAP_IPC_OWNER
CapabilityBoundingSet=~CAP_KILL CAP_MKNOD CAP_BPF CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Signatures": {
"platform-manageability-agent-v0.1.0.tar.gz": "7956a774fa3bbf8136c0e2f59975d3cd5c2ca58d6f50847930f89e59ff1dafb0",
"platform-manageability-agent.service": "fdd7b39ba0d4ee1d6a08b51446aff434dc147e7466c066da25b5dc602104cdaf",
"env_wrapper.sh": "6239de7a4e75db2ddf81454628ac7d111b79224d392161bdc11642e6de9602f7",
"platform-manageability-agent.conf": "efe3d39585266222720a828f4617a25beaf6e6334ee7d9bfa57fba4e4bd7f6ef",
"platform-manageability-agent.sudoers": "519571e8c61b36f65ea2fe2a6731c48713c1c9b79e6a38e88c022dcb6a2c7716"
}
Comment thread
jagratac marked this conversation as resolved.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Summary: Platform managebility agent for out of band opration.
Name: platform-manageability-agent
Version: 0.1.0
Release: 1%{?dist}
License: Apache-2.0
Vendor: Intel Corporation
Distribution: Edge Microvisor Toolkit
URL: https://github.com/open-edge-platform/edge-node-agents
Source0: %{url}/archive/refs/tags/%{name}/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.conf
Source2: %{name}.service
Source3: env_wrapper.sh
Source4: %{name}.sudoers
BuildRequires: golang >= 1.24.1
Requires: rpc

%global debug_package %{nil}
%global _build_id_links none
%global modulename pm_agent

%description
platform-manageability-agent detects what manageability features are available after the OS is deployed
and performs device management operations requested by users.

%prep
%setup -q
Comment thread
jagratac marked this conversation as resolved.
Outdated

%build
make pmabuild GO_MOD=vendor


%install
make install DESTDIR=%{buildroot} PREFIX=%{_prefix}

mkdir -p %{buildroot}%{_sysusersdir}
cp %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf

mkdir -p %{buildroot}%{_unitdir}
cp %{SOURCE2} %{buildroot}%{_unitdir}

install -d -m 755 %{buildroot}%{_sysconfdir}/edge-node/node/confs
install -m 644 config/platform-manageability-agent.yaml %{buildroot}%{_sysconfdir}/edge-node/node/confs/platform-manageability-agent.yaml
install -m 744 %{SOURCE3} %{buildroot}%{_sysconfdir}/edge-node/node/confs/pm-agent

mkdir -p %{buildroot}%{_sysconfdir}/sudoers.d
cp %{SOURCE5} %{buildroot}%{_sysconfdir}/sudoers.d/platform-manageability-agent

mkdir -p %{buildroot}%{_defaultlicensedir}/%{name}
cp copyright %{buildroot}%{_defaultlicensedir}/%{name}


%files
%{_bindir}/pm-agent
%{_unitdir}/%{name}.service
%{_sysusersdir}/%{name}.conf

%config %attr(-, -, bm-agents) %{_sysconfdir}/edge-node/node/confs
%config %attr(-, pm-agent, bm-agents) %{_sysconfdir}/edge-node/node/confs/platform-manageability-agent.yaml
%config %attr(-, pm-agent, bm-agents) %{_sysconfdir}/edge-node/node/confs/pm-agent
%config %{_sysconfdir}/sudoers.d/platform-manageability-agent

%license %{_defaultlicensedir}/%{name}/copyright

%pre
%sysusers_create_package %{name} %{SOURCE1}

%post
%{systemd_post %{name}.service}

%preun
%{systemd_preun %{name}.service}

%postun
%{systemd_postun_with_restart %{name}.service}

%changelog
* Thu July 17 2025 Jagrat Acharya <jagrat.acharya@intel.com> - 0.1.0-1
- Original version for Edge Microvisor Toolkit. License verified.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pm-agent ALL=(root) NOPASSWD:/usr/bin/sh,/usr/bin/rpc
10 changes: 10 additions & 0 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21548,6 +21548,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "platform-manageability-agent",
"version": "0.1.0",
"downloadUrl": "https://github.com/open-edge-platform/edge-node-agents/archive/refs/tags/platform-manageability-agent/v0.1.0.tar.gz"
}
Comment thread
jagratac marked this conversation as resolved.
}
},
{
Comment thread
sfonn marked this conversation as resolved.
"component": {
"type": "other",
Expand Down
Loading