├── common ├── VERSION ├── buf.work.yaml ├── pkg │ ├── api │ │ ├── buf.yaml │ │ ├── buf.lock │ │ └── status │ │ │ └── proto │ │ │ └── agent_status.proto │ ├── logger │ │ ├── logger_test.go │ │ └── logger.go │ └── utils │ │ ├── validate.go │ │ ├── string.go │ │ ├── convert.go │ │ └── validate_test.go ├── buf.gen.yaml └── README.md ├── node-agent ├── VERSION ├── debian │ ├── source │ │ └── format │ ├── changelog │ ├── install │ ├── node-agent.lintian-overrides │ ├── rules │ ├── copyright │ ├── control │ ├── config │ ├── node-agent.node-agent.service │ ├── dirs │ └── templates ├── configs │ ├── sudoers.d │ │ └── node-agent │ ├── incron-caddy.conf │ ├── pua.caddy │ ├── node-agent.yaml │ └── apparmor.d │ │ └── usr.bin.caddy ├── internal │ ├── types │ │ └── types.go │ └── logger │ │ └── logger.go ├── info │ └── info.go └── test │ └── test_config.yaml ├── cluster-agent ├── VERSION ├── debian │ ├── source │ │ └── format │ ├── changelog │ ├── postrm │ ├── config │ ├── rules │ ├── templates │ ├── install │ ├── cluster-agent.lintian-overrides │ ├── control │ ├── cluster-agent.service │ └── copyright ├── configs │ ├── rke2-agent.service.d │ │ └── override.conf │ ├── rke2-server.service.d │ │ └── override.conf │ ├── sudoers.d │ │ └── cluster-agent │ └── cluster-agent.yaml ├── info │ └── info.go ├── internal │ ├── logger │ │ └── logger.go │ ├── state │ │ ├── active.go │ │ ├── inactive.go │ │ ├── registering.go │ │ ├── deregistering.go │ │ └── installInProgress.go │ └── k8sbootstrap │ │ ├── k8sbootstrap_test.go │ │ └── k8sbootstrap.go ├── cmd │ └── status-server-mock │ │ └── status-server-mock.go └── test │ └── test_config.yaml ├── reporting-agent ├── VERSION ├── internal │ ├── cpu │ │ └── testdata │ │ │ ├── lscpu_with_partial_data │ │ │ ├── lscpu_with_zero_cores_per_socket │ │ │ ├── lscpu_with_zero_sockets_or_cores │ │ │ ├── lscpu_with_not_a_numbers │ │ │ ├── lscpu_with_unrelated_lines │ │ │ └── lscpu_with_spaces_and_empty_lines │ ├── memory │ │ └── testdata │ │ │ ├── dmidecode_unknown_size │ │ │ ├── dmidecode_no_modules_installed │ │ │ ├── dmidecode_dummy_lines │ │ │ ├── dmidecode_memory_different_types │ │ │ └── dmidecode_different_form_factors │ └── network │ │ └── network.go ├── config │ ├── sudoers.d │ │ └── reporting-agent │ └── reporting-agent.yaml ├── .tool-versions ├── .reuse │ └── dep5 ├── .markdownlint.yml ├── copyright └── scripts │ └── lintJsons.sh ├── in-band-manageability ├── VERSION ├── debian │ ├── dirs │ ├── source │ │ └── format │ ├── changelog │ ├── install │ ├── in-band-manageability.lintian-overrides │ ├── inbd.service │ ├── rules │ ├── control │ ├── postrm │ └── copyright ├── configs │ ├── intel_manageability.conf │ ├── inbd_schema.json │ └── firmware_tool_info.conf ├── buf.lock ├── buf.yaml ├── internal │ ├── os_updater │ │ ├── rebooter.go │ │ ├── updater.go │ │ ├── cleaner.go │ │ ├── snapshotter.go │ │ ├── ubuntu │ │ │ ├── app_source │ │ │ │ ├── constants.go │ │ │ │ └── app_source.go │ │ │ ├── os_source │ │ │ │ └── constants.go │ │ │ ├── cleaner_test.go │ │ │ ├── cleaner.go │ │ │ ├── download_test.go │ │ │ ├── download.go │ │ │ ├── network_checker.go │ │ │ └── reboot.go │ │ ├── downloader.go │ │ ├── downloader_test.go │ │ └── emt │ │ │ └── constants.go │ ├── inbc │ │ └── commands │ │ │ ├── constants.go │ │ │ ├── source_os.go │ │ │ ├── source.go │ │ │ ├── commands_test.go │ │ │ ├── source_application.go │ │ │ ├── commands.go │ │ │ ├── source_os_test.go │ │ │ └── dialer.go │ ├── fw_updater │ │ └── constants.go │ ├── inbd │ │ └── utils │ │ │ └── power_control.go │ └── common │ │ └── constants.go ├── buf.gen.yaml ├── retain-3rd-party-notices │ ├── grpc-go-NOTICE │ ├── go-yaml-NOTICE │ ├── davecgh-go-spew-LICENSE │ ├── golang-jwt-v4-LICENSE │ ├── stretchr-testify-LICENSE │ ├── stretchr-objx-LICENSE │ ├── golang-net-PATENTS │ ├── golang-text-PATENTS │ ├── golang-sys-PATENTS │ └── golang-go-programming-PATENTS ├── go.mod └── cmd │ └── inbc │ └── main.go ├── platform-update-agent ├── VERSION ├── debian │ ├── dirs │ ├── source │ │ └── format │ ├── changelog │ ├── config │ ├── templates │ ├── install │ ├── rules │ ├── postrm │ ├── control │ ├── platform-update-agent.service │ ├── copyright │ └── postinst ├── internal │ ├── aptmirror │ │ └── testdata │ │ │ └── test.list │ ├── installer │ │ └── testdata │ │ │ └── .inbm-config-success │ ├── utils │ │ ├── os_reader.go │ │ └── os_detection.go │ └── logger │ │ └── logger.go ├── trivy.yaml ├── configs │ ├── apt.conf.d │ │ └── 75platform-update-agent │ ├── sudoers.d │ │ └── platform-update-agent │ ├── apt │ │ └── apt.sources.list.template │ └── platform-update-agent.yaml ├── info │ └── info.go ├── test │ └── data │ │ └── apt_repo_list.txt ├── cmd │ └── mock-server │ │ └── mock-server.go └── mocks │ └── configs │ ├── empty-platform-update-agent.yaml │ ├── valid-platform-update-agent.yaml │ ├── platform-update-agent.yaml │ └── ubuntu-vm-test-platform-update-agent.yaml ├── hardware-discovery-agent ├── VERSION ├── test │ ├── data │ │ ├── file-dev_ipmi0 │ │ ├── dir-incorrect-nic-info-sys_class_net │ │ ├── dir-sys_class_net │ │ ├── file-sys_class_net_ens3_address │ │ ├── file-sys_class_net_ens3_device_sriov_totalvfs │ │ ├── file-sys_class_net_ens4_address │ │ ├── file-sys_class_net_ens5_address │ │ ├── file-sys_class_net_ens6_address │ │ ├── file-sys_class_net_ens6_device_sriov_numvfs │ │ ├── file-sys_class_net_ens7_address │ │ ├── file-sys_class_net_ens7_device_sriov_numvfs │ │ ├── file-sys_class_net_ens3_device_sriov_numvfs │ │ ├── dir-incorrect-vfs-sys_class_net │ │ ├── dir-no-sriov-sys_class_net │ │ ├── file-sys_class_net_ens5_device_sriov_numvfs │ │ ├── file-sys_class_net_ens7_device_sriov_totalvfs │ │ ├── dir-incorrect-total-vfs-sys_class_net │ │ ├── dir-no-sriov-total-vfs-sys_class_net │ │ ├── link-sys_class_net_docker0 │ │ ├── link-sys_devices_pci0000:00_0000:00:03.0_subsystem │ │ ├── link-sys_devices_pci0000:00_0000:00:04.0_subsystem │ │ ├── link-sys_devices_pci0000:00_0000:00:05.0_subsystem │ │ ├── link-sys_devices_pci0000:00_0000:00:06.0_subsystem │ │ ├── link-sys_devices_pci0000:00_0000:00:07.0_subsystem │ │ ├── link-sys_class_net_ens3 │ │ ├── link-sys_class_net_ens4 │ │ ├── link-sys_class_net_ens5 │ │ ├── link-sys_class_net_ens6 │ │ ├── link-sys_class_net_ens7 │ │ ├── link-no-dev-sys_class_net_ens3 │ │ ├── link-sys_devices_pci0000:00_0000:00:03.0_net_ens3_device │ │ ├── link-sys_devices_pci0000:00_0000:00:04.0_net_ens4_device │ │ ├── link-sys_devices_pci0000:00_0000:00:05.0_net_ens5_device │ │ ├── link-sys_devices_pci0000:00_0000:00:06.0_net_ens6_device │ │ ├── link-sys_devices_pci0000:00_0000:00:07.0_net_ens7_device │ │ ├── link-no-subsystem-sys_class_net_ens3 │ │ ├── link-non-pci-dev-sys_class_net_ens3 │ │ ├── mock_usb.txt │ │ ├── link-non-pci-dev-sys_devices_pci0000:00_0000:00:03.0_subsystem │ │ ├── link-no-subsystem-sys_devices_pci0000:00_0000:00:03.0_net_ens3_device │ │ ├── link-non-pci-dev-sys_devices_pci0000:00_0000:00:03.0_net_ens3_device │ │ ├── mock_usb_incorrect_usb_bus.txt │ │ ├── mock_usb_incorrect_usb_address.txt │ │ ├── mock_ip_addr_no_addr.txt │ │ ├── mock_ip_addr.txt │ │ ├── mock_ip_addr_mtu.txt │ │ ├── mock_ip_addr_prefix.txt │ │ ├── mock_ip_addr_static_ipv6.txt │ │ ├── mock_ip_addr_multi.txt │ │ ├── mock_cpu_details_noecores_noHT_onesocket.txt │ │ ├── mock_cpu_details_same_pcore_ecore_count_noHT.txt │ │ ├── mock_memory.json │ │ ├── mock_gpu_empty_features.txt │ │ ├── mock_gpu_empty_description.txt │ │ ├── mock_gpu_empty_product.txt │ │ ├── mock_gpu_empty_pci_info.txt │ │ ├── mock_gpu_empty_vendor.txt │ │ ├── mock_gpu_no_name.txt │ │ ├── mock_gpu.txt │ │ ├── mock_cpu_details_noHT_onesocket.txt │ │ ├── mock_cpu_details_no_max_mhz.txt │ │ ├── mock_gpu_name.txt │ │ ├── mock_cpu_invalid_max_mhz.txt │ │ ├── mock_cpu_details_noecores_noHT.txt │ │ ├── mock_cpu_details_noecores_onesocket.txt │ │ ├── mock_cpu_details_same_pcore_ecore_count.txt │ │ ├── mock_cpu_details_noHT.txt │ │ ├── mock_cpu_details_onesocket.txt │ │ ├── mock_cpu_invalid_socket_id.txt │ │ ├── mock_cpu_invalid_ecore_id.txt │ │ ├── mock_cpu_invalid_pcore_id.txt │ │ ├── mock_cpu_details_noecores.txt │ │ ├── mock_ipmitool.txt │ │ └── mock_cpu_details.txt │ ├── logLevel_debug_good_mock_address_config.yaml │ ├── logLevel_error_wrong_mock_address_config.yaml │ ├── logLevel_info_good_mock_address_config.yaml │ └── logLevel_info_wrong_mock_address_config.yaml ├── debian │ ├── source │ │ └── format │ ├── templates │ ├── config │ ├── postrm │ ├── hardware-discovery-agent.install │ ├── changelog │ ├── rules │ ├── hardware-discovery-agent.lintian-overrides │ ├── postinst │ ├── hardware-discovery-agent.service │ ├── control │ └── copyright ├── config │ ├── sudoers.d │ │ └── hd-agent │ └── hd-agent.yaml ├── internal │ ├── config │ │ └── testdata │ │ │ └── fuzz │ │ │ └── FuzzConfigNew │ │ │ ├── 930f49fab2367014ac1a55ba1a23bc7e612fce3b7e924a2ca67c3220fd118969 │ │ │ ├── 4a5e4b056e21e6abd563560ac7025e3885b7cac5e7249bb3a41c4497856ed31c │ │ │ └── c41256401e5700ebabf7631678aa591458d0948d206cdfb6c2896dcf896f2ace │ ├── info │ │ └── info.go │ ├── logger │ │ └── logger.go │ ├── utils │ │ ├── command.go │ │ └── command_test.go │ └── memory │ │ └── memory.go ├── requirements.txt └── cmd │ └── status-server-mock │ └── status-server-mock.go ├── platform-telemetry-agent ├── VERSION ├── debian │ ├── source │ │ └── format │ ├── templates │ ├── postrm │ ├── changelog │ ├── rules │ ├── platform-telemetry-agent.lintian-overrides │ ├── platform-telemetry-agent.service │ ├── control │ ├── platform-telemetry-agent.install │ ├── copyright │ └── postinst ├── configs │ ├── sudoers.d │ │ └── platform-telemetry-agent │ └── platform-telemetry-agent.yaml ├── requirements.txt ├── internal │ ├── info │ │ └── info.go │ └── logger │ │ └── logger.go ├── cmd │ └── status-server-mock │ │ └── status-server-mock.go └── tests │ └── config_example.yaml ├── platform-manageability-agent ├── VERSION ├── debian │ ├── source │ │ └── format │ ├── install │ ├── changelog │ ├── templates │ ├── rules │ ├── platform-manageability-agent.lintian-overrides │ ├── platform-manageability-agent.service │ ├── control │ ├── copyright │ └── postinst ├── configs │ ├── sudoers.d │ │ └── pm-agent │ └── platform-manageability-agent.yaml ├── info │ └── info.go ├── cmd │ └── status-server-mock │ │ └── status-server-mock.go ├── internal │ └── logger │ │ └── logger.go └── test │ └── test_config.yaml ├── platform-observability-agent ├── VERSION ├── debian │ ├── source │ │ └── format │ ├── platform-observability-agent.triggers │ ├── postrm │ ├── changelog │ ├── config │ ├── control │ ├── rules │ ├── copyright │ ├── templates │ ├── platform-observability-agent.platform-observability-health-check.service │ ├── platform-observability-agent.platform-observability-logging.service │ ├── platform-observability-agent.platform-observability-metrics.service │ ├── install │ └── platform-observability-agent.platform-observability-collector.service ├── configs │ ├── platform-observability-logging │ ├── platform-observability-health-check │ ├── platform-observability-collector │ ├── platform-observability-metrics │ ├── apparmor.d │ │ └── opt.fluent-bit.bin.fluent-bit │ └── sudoers.d │ │ └── platform-observability-agent ├── scripts │ ├── collect_gpu_metrics.sh │ └── core_metrics.sh └── test │ └── otelcol-test.yaml ├── .gitleaksignore ├── .github ├── CODEOWNERS ├── workflows │ ├── auto-add-labels.yml │ ├── post-merge-scorecard.yml │ ├── auto-close.yml │ └── auto-update.yml ├── labeler.yml ├── dependabot.yml └── PULL_REQUEST_TEMPLATE.md ├── SECURITY.md ├── .gitignore ├── CONTRIBUTORS.md ├── ena-manifest.yaml └── REUSE.toml /common/VERSION: -------------------------------------------------------------------------------- 1 | 1.10.0-dev 2 | -------------------------------------------------------------------------------- /node-agent/VERSION: -------------------------------------------------------------------------------- 1 | 1.10.0-dev 2 | -------------------------------------------------------------------------------- /cluster-agent/VERSION: -------------------------------------------------------------------------------- 1 | 1.9.0-dev 2 | -------------------------------------------------------------------------------- /reporting-agent/VERSION: -------------------------------------------------------------------------------- 1 | 0.1.1-dev 2 | -------------------------------------------------------------------------------- /in-band-manageability/VERSION: -------------------------------------------------------------------------------- 1 | 1.1.0-dev 2 | -------------------------------------------------------------------------------- /platform-update-agent/VERSION: -------------------------------------------------------------------------------- 1 | 1.9.0-dev 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/VERSION: -------------------------------------------------------------------------------- 1 | 1.9.0-dev 2 | -------------------------------------------------------------------------------- /node-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /platform-telemetry-agent/VERSION: -------------------------------------------------------------------------------- 1 | 1.7.0-dev 2 | -------------------------------------------------------------------------------- /cluster-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /platform-manageability-agent/VERSION: -------------------------------------------------------------------------------- 1 | 0.4.0-dev 2 | -------------------------------------------------------------------------------- /platform-observability-agent/VERSION: -------------------------------------------------------------------------------- 1 | 1.11.0-dev 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-dev_ipmi0: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /in-band-manageability/debian/dirs: -------------------------------------------------------------------------------- 1 | var/edge-node/inbd 2 | -------------------------------------------------------------------------------- /platform-update-agent/debian/dirs: -------------------------------------------------------------------------------- 1 | var/edge-node/pua 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /in-band-manageability/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /platform-update-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /platform-update-agent/internal/aptmirror/testdata/test.list: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /platform-update-agent/internal/installer/testdata/.inbm-config-success: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/dir-incorrect-nic-info-sys_class_net: -------------------------------------------------------------------------------- 1 | ens3 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/dir-sys_class_net: -------------------------------------------------------------------------------- 1 | docker0 2 | ens3 3 | lo -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens3_address: -------------------------------------------------------------------------------- 1 | 52:54:00:12:34:56 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens3_device_sriov_totalvfs: -------------------------------------------------------------------------------- 1 | 64 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens4_address: -------------------------------------------------------------------------------- 1 | 52:54:00:12:34:56 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens5_address: -------------------------------------------------------------------------------- 1 | 52:54:00:12:34:56 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens6_address: -------------------------------------------------------------------------------- 1 | 52:54:00:12:34:56 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens6_device_sriov_numvfs: -------------------------------------------------------------------------------- 1 | 2 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens7_address: -------------------------------------------------------------------------------- 1 | 52:54:00:12:34:56 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens7_device_sriov_numvfs: -------------------------------------------------------------------------------- 1 | 2 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens3_device_sriov_numvfs: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/dir-incorrect-vfs-sys_class_net: -------------------------------------------------------------------------------- 1 | docker0 2 | ens5 3 | lo -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/dir-no-sriov-sys_class_net: -------------------------------------------------------------------------------- 1 | docker0 2 | ens4 3 | lo 4 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens5_device_sriov_numvfs: -------------------------------------------------------------------------------- 1 | IncorrectData -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/file-sys_class_net_ens7_device_sriov_totalvfs: -------------------------------------------------------------------------------- 1 | IncorrectData -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/dir-incorrect-total-vfs-sys_class_net: -------------------------------------------------------------------------------- 1 | docker0 2 | ens7 3 | lo -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/dir-no-sriov-total-vfs-sys_class_net: -------------------------------------------------------------------------------- 1 | docker0 2 | ens6 3 | lo -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_class_net_docker0: -------------------------------------------------------------------------------- 1 | ../../devices/virtual/net/docker0 -------------------------------------------------------------------------------- /node-agent/configs/sudoers.d/node-agent: -------------------------------------------------------------------------------- 1 | node-agent ALL=(root) NOPASSWD: /usr/sbin/dmidecode 2 | -------------------------------------------------------------------------------- /reporting-agent/internal/cpu/testdata/lscpu_with_partial_data: -------------------------------------------------------------------------------- 1 | Architecture: x86_64 2 | CPU(s): 4 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:03.0_subsystem: -------------------------------------------------------------------------------- 1 | ../../../bus/pci -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:04.0_subsystem: -------------------------------------------------------------------------------- 1 | ../../../bus/pci -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:05.0_subsystem: -------------------------------------------------------------------------------- 1 | ../../../bus/pci -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:06.0_subsystem: -------------------------------------------------------------------------------- 1 | ../../../bus/pci -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:07.0_subsystem: -------------------------------------------------------------------------------- 1 | ../../../bus/pci -------------------------------------------------------------------------------- /platform-observability-agent/debian/platform-observability-agent.triggers: -------------------------------------------------------------------------------- 1 | activate-noawait ldconfig 2 | -------------------------------------------------------------------------------- /cluster-agent/configs/rke2-agent.service.d/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | EnvironmentFile=/etc/environment 3 | -------------------------------------------------------------------------------- /cluster-agent/configs/rke2-server.service.d/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | EnvironmentFile=/etc/environment 3 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_class_net_ens3: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:03.0/net/ens3 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_class_net_ens4: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:04.0/net/ens4 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_class_net_ens5: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:05.0/net/ens5 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_class_net_ens6: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:06.0/net/ens6 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_class_net_ens7: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:07.0/net/ens7 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-no-dev-sys_class_net_ens3: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:03.0/net/ens3 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:03.0_net_ens3_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:03.0 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:04.0_net_ens4_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:04.0 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:05.0_net_ens5_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:05.0 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:06.0_net_ens6_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:06.0 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-sys_devices_pci0000:00_0000:00:07.0_net_ens7_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:07.0 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-no-subsystem-sys_class_net_ens3: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:03.0/net/ens3 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-non-pci-dev-sys_class_net_ens3: -------------------------------------------------------------------------------- 1 | ../../devices/pci0000:00/0000:00:03.0/net/ens3 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_usb.txt: -------------------------------------------------------------------------------- 1 | Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-non-pci-dev-sys_devices_pci0000:00_0000:00:03.0_subsystem: -------------------------------------------------------------------------------- 1 | ../../../virtual/device -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-no-subsystem-sys_devices_pci0000:00_0000:00:03.0_net_ens3_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:03.0 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/link-non-pci-dev-sys_devices_pci0000:00_0000:00:03.0_net_ens3_device: -------------------------------------------------------------------------------- 1 | ../../../0000:00:03.0 -------------------------------------------------------------------------------- /reporting-agent/internal/cpu/testdata/lscpu_with_zero_cores_per_socket: -------------------------------------------------------------------------------- 1 | Architecture: x86_64 2 | Socket(s): 2 3 | Core(s) per socket: 0 -------------------------------------------------------------------------------- /reporting-agent/internal/cpu/testdata/lscpu_with_zero_sockets_or_cores: -------------------------------------------------------------------------------- 1 | Architecture: x86_64 2 | Socket(s): 0 3 | Core(s) per socket: 8 -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_usb_incorrect_usb_bus.txt: -------------------------------------------------------------------------------- 1 | Bus Incorrect Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 2 | -------------------------------------------------------------------------------- /reporting-agent/config/sudoers.d/reporting-agent: -------------------------------------------------------------------------------- 1 | reporting-agent ALL=(root) NOPASSWD:/usr/sbin/dmidecode,/usr/bin/lshw,/usr/sbin/lshw 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_usb_incorrect_usb_address.txt: -------------------------------------------------------------------------------- 1 | Bus 002 Device Incorrect: ID 1d6b:0003 Linux Foundation 3.0 root hub 2 | -------------------------------------------------------------------------------- /platform-manageability-agent/configs/sudoers.d/pm-agent: -------------------------------------------------------------------------------- 1 | pm-agent ALL=(root) NOPASSWD:SETENV:/usr/bin/rpc,/usr/bin/systemctl,/usr/sbin/modprobe 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/config/sudoers.d/hd-agent: -------------------------------------------------------------------------------- 1 | hd-agent ALL=(root) NOPASSWD:/usr/sbin/dmidecode,/usr/bin/ipmitool,/usr/bin/lshw,/usr/sbin/lshw 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/config/testdata/fuzz/FuzzConfigNew/930f49fab2367014ac1a55ba1a23bc7e612fce3b7e924a2ca67c3220fd118969: -------------------------------------------------------------------------------- 1 | go test fuzz v1 2 | []byte(" ") 3 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/config/testdata/fuzz/FuzzConfigNew/4a5e4b056e21e6abd563560ac7025e3885b7cac5e7249bb3a41c4497856ed31c: -------------------------------------------------------------------------------- 1 | go test fuzz v1 2 | []byte("#version0") 3 | -------------------------------------------------------------------------------- /in-band-manageability/configs/intel_manageability.conf: -------------------------------------------------------------------------------- 1 | { 2 | "os_updater": { 3 | "trustedRepositories": [], 4 | "proceedWithoutRollback": true 5 | } 6 | } -------------------------------------------------------------------------------- /node-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | node-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * GA release 4 | 5 | -- Node Agent Team Fri, 29 Mar 2024 16:00:33 +0000 6 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: hardware-discovery-agent/onboarding.serviceURL 2 | Type: string 3 | Default: localhost:443 4 | Description: Onboarding service URL: 5 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: telemetry-agent/telemetrymanager.serviceURL 2 | Type: string 3 | Default: localhost:443 4 | Description: Telemetry Manager service URL: -------------------------------------------------------------------------------- /cluster-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | cluster-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * GA release 4 | 5 | -- Cluster Agent Team Tue, 5 Mar 2024 16:00:33 +0000 6 | -------------------------------------------------------------------------------- /cluster-agent/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | #DEBHELPER# 6 | 7 | # Remove user on apt-get purge 8 | if [ "$1" = purge ]; then 9 | userdel cluster-agent 10 | fi 11 | -------------------------------------------------------------------------------- /platform-update-agent/trivy.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | scan: 5 | skip-files: 6 | - mocks/server-key.pem -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ip_addr_no_addr.txt: -------------------------------------------------------------------------------- 1 | 2: ens3: mtu 1500 qdisc noop state DOWN group default qlen 1000 2 | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_input high hardware-discovery-agent/onboarding.serviceURL || true 8 | db_go || true 9 | -------------------------------------------------------------------------------- /reporting-agent/internal/cpu/testdata/lscpu_with_not_a_numbers: -------------------------------------------------------------------------------- 1 | 2 | Architecture: x86_64 3 | CPU(s): notanumber 4 | Model name: Intel(R) Xeon(R) 5 | Socket(s): notanumber 6 | Core(s) per socket: notanumber -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | #DEBHELPER# 6 | 7 | # Remove user on apt-get purge 8 | if [ "$1" = purge ]; then 9 | userdel hd-agent 10 | fi 11 | 12 | 13 | -------------------------------------------------------------------------------- /hardware-discovery-agent/requirements.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # license checking 6 | reuse~=1.0.0 7 | yamllint~=1.28.0 8 | -------------------------------------------------------------------------------- /platform-telemetry-agent/configs/sudoers.d/platform-telemetry-agent: -------------------------------------------------------------------------------- 1 | platform-telemetry-agent ALL=(root) NOPASSWD: /usr/bin/mv,/usr/bin/chown,/usr/bin/systemctl,/var/lib/rancher/rke2/bin/kubectl,/usr/sbin/dmidecode -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | #DEBHELPER# 6 | 7 | # Remove user on apt-get purge 8 | if [ "$1" = purge ]; then 9 | userdel platform-telemetry-agent 10 | fi 11 | -------------------------------------------------------------------------------- /platform-update-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | platform-update-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * GA release. 4 | 5 | -- Platform Update Agent Team Fri, 29 Mar 2024 10:00:34 +0000 6 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/hardware-discovery-agent.install: -------------------------------------------------------------------------------- 1 | config/hd-agent.yaml etc/edge-node/node/confs 2 | config/apparmor.d/opt.edge-node.bin.hd-agent etc/apparmor.d 3 | config/sudoers.d/hd-agent etc/sudoers.d 4 | -------------------------------------------------------------------------------- /in-band-manageability/debian/changelog: -------------------------------------------------------------------------------- 1 | in-band-manageability (VERSION) UNRELEASED; urgency=medium 2 | 3 | * Initial release 4 | 5 | -- In-Band Manageability Team Tue, 17 Sep 2025 00:00:00 +0000 6 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | #DEBHELPER# 6 | 7 | # Remove user on apt-get purge 8 | if [ "$1" = purge ]; then 9 | userdel platform-observability-agent 10 | fi 11 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | hardware-discovery-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * GA release 4 | 5 | -- Hardware Discovery Agent Team Fri, 29 Mar 2024 16:42:33 +0000 6 | -------------------------------------------------------------------------------- /in-band-manageability/buf.lock: -------------------------------------------------------------------------------- 1 | # Generated by buf. DO NOT EDIT. 2 | version: v1 3 | deps: 4 | - remote: buf.build 5 | owner: bufbuild 6 | repository: protovalidate 7 | commit: 52f32327d4b045a79293a6ad4e7e1236 8 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/install: -------------------------------------------------------------------------------- 1 | configs/platform-manageability-agent.yaml etc/edge-node/node/confs 2 | configs/apparmor.d/opt.edge-node.bin.pm-agent etc/apparmor.d 3 | configs/sudoers.d/pm-agent etc/sudoers.d 4 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | platform-telemetry-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * GA release 4 | 5 | -- Platform Telemetry Agent Team Fri, 29 Mar 2024 16:00:33 +0000 6 | -------------------------------------------------------------------------------- /reporting-agent/internal/memory/testdata/dmidecode_unknown_size: -------------------------------------------------------------------------------- 1 | Handle 0x0001, DMI type 17, 34 bytes 2 | 3 | Memory Device 4 | Form Factor: DIMM 5 | Size: Unknown 6 | Type: DDR4 7 | Speed: Unknown 8 | Manufacturer: Samsung 9 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | platform-observability-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * GA release 4 | 5 | -- Platform Observability Agent Team Fri, 29 Mar 2024 16:00:33 +0000 6 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/changelog: -------------------------------------------------------------------------------- 1 | platform-manageability-agent (VERSION) UNRELEASED; urgency=medium 2 | 3 | * Initial release 4 | 5 | -- Platform Manageability Agent Team Wed, 09 Jul 2025 00:00:00 +0000 6 | -------------------------------------------------------------------------------- /reporting-agent/internal/cpu/testdata/lscpu_with_unrelated_lines: -------------------------------------------------------------------------------- 1 | 2 | Random header 3 | 4 | Architecture: x86_64 5 | 6 | Random: value 7 | 8 | CPU(s): 16 9 | 10 | Model name: Intel(R) Xeon(R) Platinum 11 | 12 | Footer: ignore me -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/config/testdata/fuzz/FuzzConfigNew/c41256401e5700ebabf7631678aa591458d0948d206cdfb6c2896dcf896f2ace: -------------------------------------------------------------------------------- 1 | go test fuzz v1 2 | []byte("logLevel: 0\nonboarding:\n serviceURL: 0\ntls: \n certPath: 0\n keyPath: 00") 3 | -------------------------------------------------------------------------------- /reporting-agent/.tool-versions: -------------------------------------------------------------------------------- 1 | golang 1.24.2 2 | golangci-lint 2.1.2 3 | jq 1.7.1 4 | hadolint 2.12.0 5 | helm 3.17.0 6 | kind 0.26.0 7 | markdownlint-cli2 0.17.2 8 | pipx 1.7.1 9 | shellcheck 0.10.0 10 | yamllint 1.35.1 11 | yq 4.45.1 12 | -------------------------------------------------------------------------------- /reporting-agent/internal/memory/testdata/dmidecode_no_modules_installed: -------------------------------------------------------------------------------- 1 | Handle 0x0001, DMI type 17, 34 bytes 2 | 3 | Memory Device 4 | Form Factor: DIMM 5 | Size: No Module Installed 6 | Type: DDR4 7 | Speed: Unknown 8 | Manufacturer: Samsung 9 | -------------------------------------------------------------------------------- /cluster-agent/debian/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_input high cluster-agent/cluster-orchestrator-url || true 8 | db_input low cluster-agent/heartbeat-interval || true 9 | db_go || true 10 | -------------------------------------------------------------------------------- /platform-update-agent/debian/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_input high platform-update-agent/updateServiceURL || true 8 | db_input high platform-update-agent/enaDebURL || true 9 | db_go || true 10 | -------------------------------------------------------------------------------- /node-agent/debian/install: -------------------------------------------------------------------------------- 1 | configs/node-agent.yaml etc/edge-node/node/confs 2 | configs/apparmor.d/opt.edge-node.bin.node-agent etc/apparmor.d 3 | configs/pua.caddy etc/caddy 4 | configs/incron-caddy.conf etc/incron.d 5 | configs/sudoers.d/node-agent etc/sudoers.d 6 | -------------------------------------------------------------------------------- /.gitleaksignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # Test certificates - safe to ignore. 5 | platform-manageability-agent/test/_dummy-key.pem:private-key:1 6 | platform-manageability-agent/test/_dummy-cert.pem 7 | -------------------------------------------------------------------------------- /reporting-agent/internal/memory/testdata/dmidecode_dummy_lines: -------------------------------------------------------------------------------- 1 | Random header 2 | Handle 0x0001, DMI type 17, 34 bytes 3 | 4 | Memory Device 5 | Form Factor: DIMM 6 | Size: 4 GB 7 | Type: DDR3 8 | Speed: 1600 MT/s 9 | Manufacturer: Kingston 10 | 11 | Footer: ignore me 12 | -------------------------------------------------------------------------------- /in-band-manageability/buf.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | version: v1 5 | deps: 6 | - buf.build/bufbuild/protovalidate 7 | lint: 8 | use: 9 | - DEFAULT 10 | breaking: 11 | use: 12 | - FILE 13 | -------------------------------------------------------------------------------- /node-agent/internal/types/types.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package types 5 | 6 | type Credentials struct { 7 | PrivateKey []byte 8 | CertSigningReq []byte 9 | Certificate []byte 10 | } 11 | -------------------------------------------------------------------------------- /platform-update-agent/configs/apt.conf.d/75platform-update-agent: -------------------------------------------------------------------------------- 1 | DPkg::Options {"--force-confnew";}; 2 | 3 | Acquire::https::files.internal.example.intel.com { 4 | SSLCert "/etc/edge-node/node/.apt/certs/apt-cert.pem"; 5 | SSLKey "/etc/edge-node/node/.apt/.keys/apt-key.pem"; 6 | }; 7 | -------------------------------------------------------------------------------- /cluster-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/cluster-agent PREFIX=/opt/edge-node cainstall 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_auto_build: 12 | dh_auto_build -- all 13 | -------------------------------------------------------------------------------- /node-agent/debian/node-agent.lintian-overrides: -------------------------------------------------------------------------------- 1 | node-agent binary: dir-or-file-in-opt opt/edge-node/ 2 | node-agent binary: dir-or-file-in-opt opt/edge-node/bin/ 3 | node-agent binary: dir-or-file-in-opt opt/edge-node/bin/node-agent 4 | node-agent binary: statically-linked-binary opt/edge-node/bin/node-agent 5 | -------------------------------------------------------------------------------- /in-band-manageability/debian/install: -------------------------------------------------------------------------------- 1 | configs/intel_manageability.conf etc/ 2 | configs/firmware_tool_info.conf etc/ 3 | configs/apparmor.d/usr.bin.inbd etc/apparmor.d/ 4 | configs/inbd_schema.json usr/share/ 5 | configs/firmware_tool_config_schema.json usr/share/ 6 | scripts/UpdateFirmwareBlobFwupdtool.sh usr/bin/ 7 | -------------------------------------------------------------------------------- /node-agent/configs/incron-caddy.conf: -------------------------------------------------------------------------------- 1 | /etc/intel_edge_node/tokens/release-service/access_token IN_CLOSE_WRITE RS_AT=$$(cat /etc/intel_edge_node/tokens/release-service/access_token); sed -i -e 's/header_up Authorization.*/header_up Authorization "Bearer '$$RS_AT'"/' /etc/caddy/pua.caddy; sudo systemctl reload caddy 2 | -------------------------------------------------------------------------------- /cluster-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: cluster-agent/cluster-orchestrator-url 2 | Type: string 3 | Default: localhost:443 4 | Description: Cluster orchestrator URL: 5 | 6 | Template: cluster-agent/heartbeat-interval 7 | Type: string 8 | Default: 10s 9 | Description: Interval of heartbeats sent to orchestrator: 10 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/hardware-discovery-agent PREFIX=/opt/edge-node install 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_auto_build: 12 | dh_auto_build -- all 13 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ip_addr.txt: -------------------------------------------------------------------------------- 1 | 2: ens3: mtu 1500 qdisc mq state UP group default qlen 1000 2 | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff 3 | inet 192.168.1.50/24 brd 192.168.1.255 scope global dynamic ens3 4 | valid_lft 143272sec preferred_lft 143272sec -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/platform-telemetry-agent PREFIX=/opt/edge-node install 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_auto_build: 12 | dh_auto_build -- all 13 | -------------------------------------------------------------------------------- /platform-telemetry-agent/requirements.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # OpenAPI validator 5 | openapi-spec-validator~=0.5.7 6 | 7 | # YAML linter 8 | yamllint~=1.29.0 9 | 10 | # license checking 11 | python-debian==0.1.44 12 | reuse~=1.0.0 13 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ip_addr_mtu.txt: -------------------------------------------------------------------------------- 1 | 2: ens3: mtu unknown qdisc mq state UP group default qlen 1000 2 | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff 3 | inet 192.168.1.50/24 brd 192.168.1.255 scope global dynamic ens3 4 | valid_lft 143272sec preferred_lft 143272sec -------------------------------------------------------------------------------- /platform-manageability-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: platform-manageability-agent/manageability.serviceURL 2 | Type: string 3 | Default: localhost:443 4 | Description: Onboarding service URL: 5 | 6 | Template: platform-manageability-agent/rpsAddress 7 | Type: string 8 | Default: localhost 9 | Description: RPS address: 10 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | * @cjnolan @rranjan3 @damiankopyto @jkossak @soniabha-intc 6 | 7 | # CI files 8 | .github/ @adimoft @daveroge @shanedonohue @manilk1x @cjnolan @rranjan3 @damiankopyto @jkossak @soniabha-intc @niket-intc 9 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/platform-manageability-agent PREFIX=/opt/edge-node pmainstall 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_auto_build: 12 | dh_auto_build -- all 13 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ip_addr_prefix.txt: -------------------------------------------------------------------------------- 1 | 2: ens3: mtu 1500 qdisc mq state UP group default qlen 1000 2 | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff 3 | inet 192.168.1.50/incorrect brd 192.168.1.255 scope global dynamic ens3 4 | valid_lft 143272sec preferred_lft 143272sec -------------------------------------------------------------------------------- /reporting-agent/.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: 4 | .tool-versions 5 | */testdata/* 6 | build/* 7 | config/sudoers.d/reporting-agent 8 | copyright 9 | go.mod 10 | go.sum 11 | VERSION 12 | Copyright: 2025 Intel Corporation 13 | License: Apache-2.0 14 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ip_addr_static_ipv6.txt: -------------------------------------------------------------------------------- 1 | 2: ens3: mtu 1500 qdisc mq state UP group default qlen 1000 2 | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff 3 | inet 192.168.192.168.1.50/40 brd 192.168.192.168.1.255 scope global ens3 4 | valid_lft 143272sec preferred_lft 143272sec -------------------------------------------------------------------------------- /platform-update-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: platform-update-agent/updateServiceURL 2 | Type: string 3 | Default: localhost:443 4 | Description: Maintenance Manager URL: 5 | 6 | Template: platform-update-agent/enaDebURL 7 | Type: string 8 | Default: files.internal.example.intel.com 9 | Description: Edge Node Agents Debian URL: 10 | 11 | -------------------------------------------------------------------------------- /common/buf.work.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # buf.work.yaml 6 | # docs: https://docs.buf.build/configuration/v1/buf-work-yaml 7 | # Only defines one directory, but required so that buf.yaml deps list will work 8 | 9 | version: v1 10 | directories: 11 | - pkg/api 12 | -------------------------------------------------------------------------------- /common/pkg/api/buf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | version: v1 6 | deps: 7 | - buf.build/bufbuild/protovalidate 8 | breaking: 9 | use: 10 | - FILE 11 | lint: 12 | use: 13 | - STANDARD 14 | - ENUM_FIRST_VALUE_ZERO 15 | allow_comment_ignores: true 16 | -------------------------------------------------------------------------------- /common/pkg/api/buf.lock: -------------------------------------------------------------------------------- 1 | # Generated by buf. DO NOT EDIT. 2 | version: v1 3 | deps: 4 | - remote: buf.build 5 | owner: bufbuild 6 | repository: protovalidate 7 | commit: 63bb56e204954558946a641ef0d68910 8 | digest: shake256:1ccb2153a5ff5906729567f09f3e5bb6b6de356dc875eb4d12572097b9d6f9ab773b44d88e0a4c2052abca9ca60f3edfea71b1f51bfe5ea25b32a083e8e083b6 9 | -------------------------------------------------------------------------------- /platform-update-agent/debian/install: -------------------------------------------------------------------------------- 1 | configs/platform-update-agent.yaml etc/edge-node/node/confs 2 | configs/apparmor.d/opt.edge-node.bin.platform-update-agent etc/apparmor.d 3 | configs/sudoers.d/platform-update-agent etc/sudoers.d 4 | configs/apt.conf.d/75platform-update-agent etc/apt/apt.conf.d 5 | configs/apt/apt.sources.list.template etc/edge-node/node/confs 6 | -------------------------------------------------------------------------------- /cluster-agent/debian/install: -------------------------------------------------------------------------------- 1 | configs/cluster-agent.yaml etc/edge-node/node/confs 2 | configs/apparmor.d/opt.edge-node.bin.cluster-agent etc/apparmor.d 3 | configs/sudoers.d/cluster-agent etc/sudoers.d 4 | configs/rke2-agent.service.d/override.conf etc/systemd/system/rke2-agent.service.d 5 | configs/rke2-server.service.d/override.conf etc/systemd/system/rke2-server.service.d 6 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/hardware-discovery-agent.lintian-overrides: -------------------------------------------------------------------------------- 1 | hardware-discovery-agent binary: dir-or-file-in-opt opt/edge-node/ 2 | hardware-discovery-agent binary: dir-or-file-in-opt opt/edge-node/bin/ 3 | hardware-discovery-agent binary: dir-or-file-in-opt opt/edge-node/bin/hd-agent 4 | hardware-discovery-agent: statically-linked-binary opt/edge-node/bin/hd-agent 5 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/rebooter.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package osupdater updates the OS. 7 | package osupdater 8 | 9 | // Rebooter is an interface that contains the method to reboot the OS. 10 | type Rebooter interface { 11 | Reboot() error 12 | } 13 | -------------------------------------------------------------------------------- /node-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/node-agent PREFIX=/opt/edge-node nainstall 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_installsystemd: 12 | dh_installsystemd --name=node-agent 13 | 14 | override_dh_auto_build: 15 | dh_auto_build -- all 16 | -------------------------------------------------------------------------------- /node-agent/info/info.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package info 4 | 5 | import "fmt" 6 | 7 | var version string // injected at build time 8 | var commit string // injected at build time 9 | 10 | var Component string = "Node Agent" 11 | var Version string = fmt.Sprintf("%s-%v", version, commit) 12 | -------------------------------------------------------------------------------- /cluster-agent/info/info.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package info 4 | 5 | import "fmt" 6 | 7 | var version string // injected at build time 8 | var commit string // injected at build time 9 | 10 | var Component string = "Cluster Agent" 11 | var Version string = fmt.Sprintf("%s-%v", version, commit) 12 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/updater.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package osupdater updates the OS. 7 | package osupdater 8 | 9 | // Updater is an interface that contains the method to update the OS. 10 | type Updater interface { 11 | Update() (bool, error) 12 | } 13 | -------------------------------------------------------------------------------- /cluster-agent/debian/cluster-agent.lintian-overrides: -------------------------------------------------------------------------------- 1 | # These overrides are exceptions to rules used by Lintian 2 | cluster-agent binary: dir-or-file-in-opt opt/edge-node/ 3 | cluster-agent binary: dir-or-file-in-opt opt/edge-node/bin/ 4 | cluster-agent binary: dir-or-file-in-opt opt/edge-node/bin/cluster-agent 5 | cluster-agent binary: statically-linked-binary opt/edge-node/bin/cluster-agent 6 | -------------------------------------------------------------------------------- /node-agent/internal/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package logger 4 | 5 | import ( 6 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 7 | "github.com/open-edge-platform/edge-node-agents/node-agent/info" 8 | ) 9 | 10 | var Logger = logger.New(info.Component, info.Version) 11 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/platform-manageability-agent.lintian-overrides: -------------------------------------------------------------------------------- 1 | platform-manageability-agent: dir-or-file-in-opt opt/edge-node/ 2 | platform-manageability-agent: dir-or-file-in-opt opt/edge-node/bin/ 3 | platform-manageability-agent: dir-or-file-in-opt opt/edge-node/bin/pm-agent 4 | platform-manageability-agent: shared-library-lacks-prerequisites opt/edge-node/bin/pm-agent 5 | -------------------------------------------------------------------------------- /platform-update-agent/info/info.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package info 5 | 6 | import "fmt" 7 | 8 | var version string // injected at build time 9 | var commit string // injected at build time 10 | 11 | var Component string = "Update Agent" 12 | var Version = fmt.Sprintf("%s-%v", version, commit) 13 | -------------------------------------------------------------------------------- /reporting-agent/internal/cpu/testdata/lscpu_with_spaces_and_empty_lines: -------------------------------------------------------------------------------- 1 | 2 | Architecture: x86_64 3 | 4 | CPU(s): 2 5 | 6 | Model name: Intel(R) Xeon(R) CPU 7 | 8 | Some unused line: should be ignored 9 | 10 | Vendor ID: GenuineIntel 11 | 12 | CPU family: 6 13 | 14 | Model: 42 15 | 16 | Stepping: 7 17 | 18 | Socket(s): 2 19 | 20 | Core(s) per socket: 8 21 | -------------------------------------------------------------------------------- /cluster-agent/internal/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package logger 4 | 5 | import ( 6 | "github.com/open-edge-platform/edge-node-agents/cluster-agent/info" 7 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 8 | ) 9 | 10 | var Logger = logger.New(info.Component, info.Version) 11 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ip_addr_multi.txt: -------------------------------------------------------------------------------- 1 | 2: ens3: mtu 1500 qdisc mq state UP group default qlen 1000 2 | link/ether a1:b2:c3:d4:e5:f6 brd ff:ff:ff:ff:ff:ff 3 | inet 192.168.1.25/24 brd 192.168.1.255 scope global dynamic ens3 4 | inet 192.168.5.37/24 brd 192.168.5.255 scope global ens3 5 | valid_lft 143272sec preferred_lft 143272sec -------------------------------------------------------------------------------- /platform-observability-agent/debian/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_input high platform-observability-agent/host || true 8 | db_input high platform-observability-agent/port || true 9 | db_input high platform-observability-agent/metrics-host || true 10 | db_input high platform-observability-agent/metrics-port || true 11 | db_go || true 12 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/info/info.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package info 4 | 5 | import "fmt" 6 | 7 | var version string // injected at build time 8 | var commit string // injected at build time 9 | 10 | var Component = "Hardware Discovery Agent" 11 | var Version = fmt.Sprintf("%s-%v", version, commit) 12 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/cleaner.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package osupdater updates the OS. 7 | package osupdater 8 | 9 | // Cleaner is an interface that contains the method to 10 | // clean the files after an OS update. 11 | type Cleaner interface { 12 | Clean() error 13 | } 14 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/snapshotter.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package osupdater updates the OS. 7 | package osupdater 8 | 9 | // Snapshotter is an interface that contains the method to take a snapshot of the OS. 10 | type Snapshotter interface { 11 | Snapshot() error 12 | } 13 | -------------------------------------------------------------------------------- /platform-update-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/platform-update-agent PREFIX=/opt/edge-node puainstall 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_installsystemd: 12 | dh_installsystemd --no-stop-on-upgrade 13 | 14 | override_dh_auto_build: 15 | dh_auto_build -- all 16 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_noecores_noHT_onesocket.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 0 3500.0000 4 | 2 0 3500.0000 5 | 3 0 3500.0000 6 | 4 0 3500.0000 7 | 5 0 3500.0000 8 | 6 0 3500.0000 9 | 7 0 3500.0000 10 | 8 0 3500.0000 11 | 9 0 3500.0000 12 | 10 0 3500.0000 13 | 11 0 3500.0000 14 | -------------------------------------------------------------------------------- /platform-manageability-agent/info/info.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package info 4 | 5 | import "fmt" 6 | 7 | var version string // injected at build time 8 | var commit string // injected at build time 9 | 10 | var Component string = "Platform Manageability Agent" 11 | var Version string = fmt.Sprintf("%s-%v", version, commit) 12 | -------------------------------------------------------------------------------- /platform-telemetry-agent/internal/info/info.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package info 5 | 6 | import "fmt" 7 | 8 | var version string // injected at build time 9 | var commit string // injected at build time 10 | 11 | var Component string = "Telemetry Agent" 12 | var Version string = fmt.Sprintf("%s-%v", version, commit) 13 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/app_source/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package appsource provides functionality to add an application source. 7 | package appsource 8 | 9 | const ubuntuAptSourcesListDir = "/etc/apt/sources.list.d" 10 | 11 | const linuxGPGKeyPath = "/usr/share/keyrings" 12 | -------------------------------------------------------------------------------- /platform-telemetry-agent/internal/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package logger 4 | 5 | import ( 6 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 7 | "github.com/open-edge-platform/edge-node-agents/platform-telemetry-agent/internal/info" 8 | ) 9 | 10 | var Logger = logger.New(info.Component, info.Version) 11 | -------------------------------------------------------------------------------- /reporting-agent/internal/memory/testdata/dmidecode_memory_different_types: -------------------------------------------------------------------------------- 1 | Handle 0x0001, DMI type 17, 34 bytes 2 | 3 | Memory Device 4 | Form Factor: DIMM 5 | Size: 8 GB 6 | Type: DDR4 7 | Speed: 3200 MT/s 8 | Manufacturer: Samsung 9 | 10 | Handle 0x0002, DMI type 17, 34 bytes 11 | 12 | Memory Device 13 | Form Factor: DIMM 14 | Size: 8 GB 15 | Type: DDR3 16 | Speed: 1600 MT/s 17 | Manufacturer: Kingston 18 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/logLevel_debug_good_mock_address_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | version: v0.2.0 7 | logLevel: debug 8 | onboarding: 9 | serviceURL: 'localhost:12345' 10 | interval: 15s 11 | jwt: 12 | accessTokenPath: /etc/intel_edge_node/tokens/hd-agent 13 | statusEndpoint: 'unix:///tmp/status-server.sock' 14 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/logLevel_error_wrong_mock_address_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | version: v0.2.0 7 | logLevel: error 8 | onboarding: 9 | serviceURL: 'localhost:8080' 10 | interval: 30s 11 | jwt: 12 | accessTokenPath: /etc/intel_edge_node/tokens/hd-agent 13 | statusEndpoint: 'unix:///tmp/status-server.sock' 14 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/logLevel_info_good_mock_address_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | version: v0.2.0 7 | logLevel: info 8 | onboarding: 9 | serviceURL: 'localhost:12345' 10 | interval: 30s 11 | jwt: 12 | accessTokenPath: /etc/intel_edge_node/tokens/hd-agent 13 | statusEndpoint: 'unix:///tmp/status-server.sock' 14 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/logLevel_info_wrong_mock_address_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | version: v0.2.0 7 | logLevel: info 8 | onboarding: 9 | serviceURL: 'localhost:8080' 10 | interval: 30s 11 | jwt: 12 | accessTokenPath: /etc/intel_edge_node/tokens/hd-agent 13 | statusEndpoint: 'unix:///tmp/status-server.sock' 14 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/os_source/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package ossource provides functionality to update the OS source. 7 | package ossource 8 | 9 | // UbuntuAptSourcesList is the path to the Ubuntu apt sources list file. 10 | const UbuntuAptSourcesList = "/etc/apt/sources.list" 11 | -------------------------------------------------------------------------------- /reporting-agent/internal/memory/testdata/dmidecode_different_form_factors: -------------------------------------------------------------------------------- 1 | Handle 0x0001, DMI type 17, 34 bytes 2 | 3 | Memory Device 4 | Form Factor: DIMM 5 | Size: 8 GB 6 | Type: DDR4 7 | Speed: 3200 MT/s 8 | Manufacturer: Samsung 9 | 10 | Handle 0x0002, DMI type 17, 34 bytes 11 | 12 | Memory Device 13 | Form Factor: SODIMM 14 | Size: 8 GB 15 | Type: DDR4 16 | Speed: 3200 MT/s 17 | Manufacturer: Kingston 18 | -------------------------------------------------------------------------------- /cluster-agent/configs/sudoers.d/cluster-agent: -------------------------------------------------------------------------------- 1 | cluster-agent ALL=(root) NOPASSWD: /usr/bin/sh,/usr/local/bin/rancher-system-agent-uninstall.sh,/usr/local/bin/rke2-uninstall.sh,/usr/sbin/dmidecode,/usr/sbin/lvremove,/usr/sbin/lvs,/usr/local/bin/k3s,/usr/local/bin/k3s-uninstall.sh,/usr/local/bin/k3s-agent-uninstall.sh,/var/lib/rancher/k3s/bin/k3s,/var/lib/rancher/k3s/bin/k3s-uninstall.sh,/var/lib/rancher/k3s/bin/k3s-agent-uninstall.sh 2 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package logger 4 | 5 | import ( 6 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 7 | 8 | "github.com/open-edge-platform/edge-node-agents/hardware-discovery-agent/internal/info" 9 | ) 10 | 11 | var Logger = logger.New(info.Component, info.Version) 12 | -------------------------------------------------------------------------------- /platform-update-agent/configs/sudoers.d/platform-update-agent: -------------------------------------------------------------------------------- 1 | platform-update-agent ALL=(root) NOPASSWD:SETENV: /usr/bin/inbc,/usr/bin/apt,/usr/bin/truncate,/usr/sbin/reboot,/usr/sbin/dmidecode,/usr/sbin/update-grub,/usr/bin/systemctl,/usr/bin/caddy,/usr/bin/ls,/boot/efi/EFI/Linux/,/boot/efi/loader/entries/,/boot/efi/loader/,/usr/bin/ls,/usr/bin/mkdir,/usr/bin/stat,/usr/bin/chmod,/usr/bin/cat,/tmp/,/usr/bin/echo,/usr/bin/cp,/usr/sbin/reboot 2 | -------------------------------------------------------------------------------- /reporting-agent/config/reporting-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | k8s: 5 | k3sKubectlPath: "/var/lib/rancher/k3s/bin/k3s kubectl" 6 | k3sKubeConfigPath: "/etc/rancher/k3s/k3s.yaml" 7 | rke2KubectlPath: "/var/lib/rancher/rke2/bin/kubectl" 8 | rke2KubeConfigPath: "/etc/rancher/rke2/rke2.yaml" 9 | backend: 10 | backoff: 11 | maxTries: 20 12 | -------------------------------------------------------------------------------- /platform-update-agent/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | #DEBHELPER# 4 | 5 | if [ "$1" = purge ]; then 6 | userdel platform-update-agent 7 | rm -f /etc/apparmor.d/opt.edge-node.bin.platform-update-agent /etc/default/grub.d/90-platform-update-agent.cfg /etc/edge-node/node/confs/platform-update-agent.yaml /etc/apt/sources.list.d/pua.list 8 | rm -rf /var/edge-node/pua 9 | echo "Successfully purged platform-update-agent" 10 | fi 11 | -------------------------------------------------------------------------------- /common/pkg/logger/logger_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package logger_test 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/stretchr/testify/assert" 9 | 10 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 11 | ) 12 | 13 | func TestNew(t *testing.T) { 14 | log := logger.New("Test Agent", "v1.23") 15 | assert.NotNil(t, log) 16 | } 17 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/platform-telemetry-agent.lintian-overrides: -------------------------------------------------------------------------------- 1 | # These overrides are exceptions to rules used by Lintian 2 | platform-telemetry-agent: dir-or-file-in-opt opt/edge-node/bin/platform-telemetry-agent 3 | platform-telemetry-agent: dir-or-file-in-opt opt/edge-node/ 4 | platform-telemetry-agent: dir-or-file-in-opt opt/edge-node/bin/ 5 | platform-telemetry-agent: statically-linked-binary opt/edge-node/bin/platform-telemetry-agent 6 | -------------------------------------------------------------------------------- /in-band-manageability/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | version: v1 5 | 6 | plugins: 7 | - plugin: go 8 | out: . 9 | opt: 10 | - module=github.com/open-edge-platform/edge-node-agents/in-band-manageability 11 | - plugin: go-grpc 12 | out: . 13 | opt: 14 | - module=github.com/open-edge-platform/edge-node-agents/in-band-manageability 15 | -------------------------------------------------------------------------------- /cluster-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: cluster-agent 2 | Maintainer: Cluster Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: cluster-agent 9 | Architecture: any 10 | Depends: ${misc:Depends}, apparmor-utils, curl 11 | Description: installs/uninstalls orchestration software on an edge node 12 | using command obtained from Cluster Orchestrator. 13 | -------------------------------------------------------------------------------- /platform-observability-agent/configs/platform-observability-logging: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | while true 6 | do 7 | if [ -e /run/platform-observability-agent/agent-logs.sock ]; then 8 | echo "Starting Platform Observability Logging Service" 9 | break 10 | else 11 | echo "Waiting on collector service to start" 12 | sleep 10 13 | fi 14 | done 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /platform-observability-agent/configs/platform-observability-health-check: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | while true 6 | do 7 | if [ -e /run/platform-observability-agent/agent-logs.sock ]; then 8 | echo "Starting Platform Observability Health Check Service" 9 | break 10 | else 11 | echo "Waiting on collector service to start" 12 | sleep 10 13 | fi 14 | done 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /cluster-agent/cmd/status-server-mock/status-server-mock.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "log" 8 | 9 | ssmock "github.com/open-edge-platform/edge-node-agents/common/pkg/status-server-mock" 10 | ) 11 | 12 | func main() { 13 | err := ssmock.RunMockStatusServer() 14 | if err != nil { 15 | log.Fatalf("Error running status server mock: %v", err) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /platform-observability-agent/configs/platform-observability-collector: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | while true 6 | do 7 | if [ -f /etc/intel_edge_node/tokens/platform-observability-agent/access_token ]; then 8 | echo "Starting Platform Observability Collector Service" 9 | break 10 | else 11 | echo "Waiting for token" 12 | sleep 10 13 | fi 14 | done 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /platform-observability-agent/configs/platform-observability-metrics: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | while true 6 | do 7 | if [ -e /run/platform-observability-agent/platform-observability-agent.sock ]; then 8 | echo "Starting Platform Observability Metrics Service" 9 | break 10 | else 11 | echo "Waiting on collector service to start" 12 | sleep 10 13 | fi 14 | done 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /platform-update-agent/test/data/apt_repo_list.txt: -------------------------------------------------------------------------------- 1 | deb http://pl.archive.ubuntu.com/ubuntu/ jammy main universe multiverse restricted 2 | deb http://pl.archive.ubuntu.com/ubuntu/ jammy-updates main universe multiverse restricted 3 | deb http://pl.archive.ubuntu.com/ubuntu/ jammy-backports main universe multiverse restricted 4 | deb http://security.ubuntu.com/ubuntu jammy-security main universe multiverse restricted 5 | deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable 6 | -------------------------------------------------------------------------------- /hardware-discovery-agent/cmd/status-server-mock/status-server-mock.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "log" 8 | 9 | ssmock "github.com/open-edge-platform/edge-node-agents/common/pkg/status-server-mock" 10 | ) 11 | 12 | func main() { 13 | err := ssmock.RunMockStatusServer() 14 | if err != nil { 15 | log.Fatalf("Error running status server mock: %v", err) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /platform-telemetry-agent/cmd/status-server-mock/status-server-mock.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "log" 8 | 9 | ssmock "github.com/open-edge-platform/edge-node-agents/common/pkg/status-server-mock" 10 | ) 11 | 12 | func main() { 13 | err := ssmock.RunMockStatusServer() 14 | if err != nil { 15 | log.Fatalf("Error running status server mock: %v", err) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/platform-telemetry-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Telemetry Agent 3 | 4 | [Service] 5 | ExecStart=/opt/edge-node/bin/platform-telemetry-agent -config /etc/edge-node/node/confs/platform-telemetry-agent.yaml 6 | StandardOutput=journal 7 | StandardError=journal 8 | RestartSec=60 9 | Restart=on-failure 10 | User=platform-telemetry-agent 11 | Group=bm-agents 12 | CPUQuota=20% 13 | MemoryMax=128M 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /platform-manageability-agent/cmd/status-server-mock/status-server-mock.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "log" 8 | 9 | ssmock "github.com/open-edge-platform/edge-node-agents/common/pkg/status-server-mock" 10 | ) 11 | 12 | func main() { 13 | err := ssmock.RunMockStatusServer() 14 | if err != nil { 15 | log.Fatalf("Error running status server mock: %v", err) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /platform-update-agent/configs/apt/apt.sources.list.template: -------------------------------------------------------------------------------- 1 | deb jammy main restricted 2 | deb jammy-updates main restricted 3 | deb jammy universe 4 | deb jammy-updates universe 5 | deb jammy multiverse 6 | deb jammy-updates multiverse 7 | deb jammy-backports main restricted universe multiverse 8 | deb jammy-security main restricted 9 | deb jammy-security universe 10 | deb jammy-security multiverse 11 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_same_pcore_ecore_count_noHT.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 0 3500.0000 4 | 2 0 3500.0000 5 | 3 0 3500.0000 6 | 4 0 3500.0000 7 | 5 0 3500.0000 8 | 6 0 3500.0000 9 | 7 0 3500.0000 10 | 8 0 2600.0000 11 | 9 0 2600.0000 12 | 10 0 2600.0000 13 | 11 0 2600.0000 14 | 12 0 2600.0000 15 | 13 0 2600.0000 16 | 14 0 2600.0000 17 | 15 0 2600.0000 18 | -------------------------------------------------------------------------------- /in-band-manageability/debian/in-band-manageability.lintian-overrides: -------------------------------------------------------------------------------- 1 | in-band-manageability binary: dir-or-file-in-opt opt/edge-node/ 2 | in-band-manageability binary: dir-or-file-in-opt opt/edge-node/bin/ 3 | in-band-manageability binary: dir-or-file-in-opt opt/edge-node/bin/inbc 4 | in-band-manageability binary: dir-or-file-in-opt opt/edge-node/bin/inbd 5 | in-band-manageability binary: statically-linked-binary opt/edge-node/bin/inbc 6 | in-band-manageability binary: statically-linked-binary opt/edge-node/bin/inbd 7 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: platform-telemetry-agent 2 | Maintainer: Platform Telemetry Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: platform-telemetry-agent 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, apparmor-utils 11 | Description: telemetry-agent collect telemetry data to telemetry manager 12 | Collected telemetry data consist of cpu usage, memory usage and etc. 13 | -------------------------------------------------------------------------------- /cluster-agent/internal/state/active.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package state 5 | 6 | type Active struct { 7 | sm *StateMachine 8 | } 9 | 10 | func (s *Active) Register() error { 11 | return s.sm.incorrectActionRequest() 12 | } 13 | 14 | func (s *Active) Deregister() error { 15 | s.sm.set(s.sm.deregistering) 16 | return s.sm.currentState.Deregister() 17 | } 18 | 19 | func (s *Active) State() string { 20 | return "ACTIVE" 21 | } 22 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_memory.json: -------------------------------------------------------------------------------- 1 | { 2 | "memory": [ 3 | { 4 | "range": "0x0000000000000000-0x00000000efffffff", 5 | "size": 4026531840, 6 | "state": "online", 7 | "removable": true, 8 | "block": "0-29" 9 | },{ 10 | "range": "0x0000000100000000-0x000000040fffffff", 11 | "size": 13153337344, 12 | "state": "online", 13 | "removable": true, 14 | "block": "32-129" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/platform-telemetry-agent.install: -------------------------------------------------------------------------------- 1 | configs/platform-telemetry-agent.yaml /etc/edge-node/node/confs/ 2 | configs/telegraf-host-gold.yaml /etc/edge-node/node/confs/ 3 | configs/telegraf-cluster-gold.yaml /etc/edge-node/node/confs/ 4 | configs/fluentbit-host-gold.yaml /etc/edge-node/node/confs/ 5 | configs/fluentbit-cluster-gold.yaml /etc/edge-node/node/confs/ 6 | configs/apparmor.d/opt.edge-node.bin.platform-telemetry-agent etc/apparmor.d 7 | configs/sudoers.d/platform-telemetry-agent etc/sudoers.d 8 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_empty_features.txt: -------------------------------------------------------------------------------- 1 | *-display 2 | description: VGA compatible controller 3 | product: Graphics Controller 4 | vendor: Graphics 5 | physical id: 0 6 | bus info: pci@0000:03:00.0 7 | version: 04 8 | width: 32 bits 9 | clock: 66MHz 10 | configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16 11 | resources: irq:16 memory:91000000-91ffffff memory:92808000-9280bfff memory:92000000-927fffff memory:c0000-dffff 12 | -------------------------------------------------------------------------------- /platform-manageability-agent/internal/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package logger provides centralized logging functionality for the Platform Manageability Agent 5 | package logger 6 | 7 | import ( 8 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 9 | 10 | "github.com/open-edge-platform/edge-node-agents/platform-manageability-agent/info" 11 | ) 12 | 13 | var Logger = logger.New(info.Component, info.Version) 14 | -------------------------------------------------------------------------------- /cluster-agent/debian/cluster-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Cluster Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/cluster-agent/README.md 4 | 5 | [Service] 6 | ExecStart=/opt/edge-node/bin/cluster-agent -config /etc/edge-node/node/confs/cluster-agent.yaml 7 | StandardOutput=journal 8 | StandardError=journal 9 | RestartSec=60 10 | Restart=on-failure 11 | User=cluster-agent 12 | Group=bm-agents 13 | CPUQuota=20% 14 | MemoryMax=128M 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /hardware-discovery-agent/config/hd-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | version: v0.3.0 7 | logLevel: info 8 | onboarding: 9 | serviceURL: 'localhost:443' 10 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 11 | metricsInterval: 10s 12 | interval: 30s 13 | jwt: 14 | accessTokenPath: /etc/intel_edge_node/tokens/hd-agent/access_token 15 | statusEndpoint: 'unix:///run/node-agent/node-agent.sock' 16 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | . /usr/share/debconf/confmodule 4 | 5 | 6 | db_get hardware-discovery-agent/onboarding.serviceURL 7 | if [ ! -z "$RET" ]; then 8 | sed -i "s/^ serviceURL: '.*'/ serviceURL: '$RET'/" /etc/edge-node/node/confs/hd-agent.yaml 9 | fi 10 | 11 | groupadd -f bm-agents --system 12 | 13 | id -u hd-agent &>/dev/null || useradd hd-agent --system -g bm-agents -s /sbin/nologin 14 | 15 | apparmor_parser -rK /etc/apparmor.d/opt.edge-node.bin.hd-agent 16 | 17 | #DEBHELPER# 18 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/cleaner_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package ubuntu 5 | 6 | import ( 7 | "testing" 8 | 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestCleaner_Clean(t *testing.T) { 13 | // Create a Cleaner instance 14 | cleaner := Cleaner{} 15 | 16 | // Call the Clean method 17 | err := cleaner.Clean() 18 | 19 | // Assertions 20 | assert.NoError(t, err, "Clean should not return an error") 21 | } 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 5 | # Security Policy 6 | Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. 7 | 8 | ## Reporting a Vulnerability 9 | Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). 10 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_empty_description.txt: -------------------------------------------------------------------------------- 1 | *-display 2 | product: Graphics Controller 3 | vendor: Graphics 4 | physical id: 0 5 | bus info: pci@0000:03:00.0 6 | version: 04 7 | width: 32 bits 8 | clock: 66MHz 9 | capabilities: pm vga_controller bus_master cap_list rom fb 10 | configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16 11 | resources: irq:16 memory:91000000-91ffffff memory:92808000-9280bfff memory:92000000-927fffff memory:c0000-dffff 12 | -------------------------------------------------------------------------------- /node-agent/configs/pua.caddy: -------------------------------------------------------------------------------- 1 | http://localhost:60444 { 2 | bind 127.0.0.1 3 | reverse_proxy https://files-rs.internal.example.intel.com { 4 | header_up Authorization "Bearer RS_AT" 5 | header_up Host {upstream_hostport} 6 | } 7 | log { 8 | level DEBUG 9 | format filter { 10 | wrap console 11 | fields { 12 | resp_headers delete 13 | request>headers delete 14 | request>tls delete 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /reporting-agent/.markdownlint.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # The rule definition can be found here: 5 | # https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md 6 | 7 | default: true 8 | MD004: 9 | style: dash 10 | MD010: 11 | # Code blocks may have hard tabs. 12 | code_blocks: false 13 | MD013: false # Disable line length checking. 14 | MD024: false # Allow duplicate headers. 15 | MD026: 16 | punctuation: ".,;:!。,;:!" 17 | MD029: 18 | style: one 19 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_empty_product.txt: -------------------------------------------------------------------------------- 1 | *-display 2 | description: VGA compatible controller 3 | vendor: Graphics 4 | physical id: 0 5 | bus info: pci@0000:03:00.0 6 | version: 04 7 | width: 32 bits 8 | clock: 66MHz 9 | capabilities: pm vga_controller bus_master cap_list rom fb 10 | configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16 11 | resources: irq:16 memory:91000000-91ffffff memory:92808000-9280bfff memory:92000000-927fffff memory:c0000-dffff 12 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: platform-observability-agent 2 | Maintainer: Platform Observability Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: platform-observability-agent 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, apparmor-utils, jq, ipmitool, smartmontools, rasdaemon 11 | Description: Platform Observability Agent is a common log scraper 12 | handling logs from all Edge Node Agents. 13 | -------------------------------------------------------------------------------- /platform-update-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: platform-update-agent 2 | Maintainer: Platform Update Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: platform-update-agent 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, apparmor-utils, lxc, needrestart 11 | Description: Platform update agent updates OS & Edge Node Agents packages 12 | Platform update agent main responsibility is to update OS & Edge Node Agents packages. 13 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_empty_pci_info.txt: -------------------------------------------------------------------------------- 1 | *-display 2 | description: VGA compatible controller 3 | product: Graphics Controller 4 | vendor: Graphics 5 | physical id: 0 6 | version: 04 7 | width: 32 bits 8 | clock: 66MHz 9 | capabilities: pm vga_controller bus_master cap_list rom fb 10 | configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16 11 | resources: irq:16 memory:91000000-91ffffff memory:92808000-9280bfff memory:92000000-927fffff memory:c0000-dffff 12 | -------------------------------------------------------------------------------- /in-band-manageability/debian/inbd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=INBM Daemon Service 3 | Requires=network.target 4 | 5 | [Service] 6 | # ExecStart command is only run when everything else has loaded 7 | Type=idle 8 | User=root 9 | EnvironmentFile=-/etc/environment 10 | ExecStart=/usr/bin/inbd -s /var/run/inbd.sock 11 | StandardOutput=journal 12 | StandardError=journal 13 | RestartSec=5s 14 | Restart=on-failure 15 | WorkingDirectory=/etc/systemd/system/ 16 | Group=inbd 17 | CPUQuota=20% 18 | MemoryMax=128M 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /cluster-agent/internal/state/inactive.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package state 5 | 6 | type Inactive struct { 7 | sm *StateMachine 8 | } 9 | 10 | func (s *Inactive) Register() error { 11 | s.sm.set(s.sm.registering) 12 | return s.sm.currentState.Register() 13 | } 14 | 15 | func (s *Inactive) Deregister() error { 16 | s.sm.set(s.sm.deregistering) 17 | return s.sm.currentState.Deregister() 18 | } 19 | 20 | func (s *Inactive) State() string { 21 | return "INACTIVE" 22 | } 23 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/hardware-discovery-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Hardware Discovery Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/hardware-discovery-agent/README.md 4 | 5 | [Service] 6 | ExecStart=/opt/edge-node/bin/hd-agent -config /etc/edge-node/node/confs/hd-agent.yaml 7 | StandardOutput=journal 8 | StandardError=journal 9 | RestartSec=60 10 | Restart=on-failure 11 | User=hd-agent 12 | Group=bm-agents 13 | CPUQuota=20% 14 | MemoryMax=128M 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_empty_vendor.txt: -------------------------------------------------------------------------------- 1 | *-display 2 | description: VGA compatible controller 3 | product: Graphics Controller 4 | physical id: 0 5 | bus info: pci@0000:03:00.0 6 | version: 04 7 | width: 32 bits 8 | clock: 66MHz 9 | capabilities: pm vga_controller bus_master cap_list rom fb 10 | configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16 11 | resources: irq:16 memory:91000000-91ffffff memory:92808000-9280bfff memory:92000000-927fffff memory:c0000-dffff 12 | -------------------------------------------------------------------------------- /in-band-manageability/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) DESTDIR=$$(pwd)/debian/in-band-manageability PREFIX=/usr install 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_installsystemd: 12 | dh_installsystemd --name=inbd 13 | 14 | override_dh_auto_build: 15 | $(MAKE) generate-proto 16 | $(MAKE) inbcbuild inbdbuild copy-licenses 17 | 18 | override_dh_auto_test: 19 | # Skip tests during package build due to timeout issues 20 | @echo "Skipping tests during package build" 21 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/app_source/app_source.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package appsource provides functionality to add an application source. 7 | package appsource 8 | 9 | // Manager is an interface that defines the methods to add an application source. 10 | type Manager interface { 11 | Add(sourceListFileName string, sources []string, gpgKeyURI string, gpgKeyName string) error 12 | Remove(fileName string, gpgKeyName string) error 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/auto-add-labels.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Labeler 6 | 7 | on: 8 | pull_request: 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.ref }} 12 | cancel-in-progress: true 13 | 14 | permissions: {} 15 | 16 | jobs: 17 | label: 18 | permissions: 19 | contents: read 20 | pull-requests: write 21 | runs-on: ubuntu-latest 22 | steps: 23 | - uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1 24 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_no_name.txt: -------------------------------------------------------------------------------- 1 | (prog-if 00 [VGA controller]) 2 | DeviceName: Embedded Video 3 | Subsystem: Graphics Controller 4 | Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16, NUMA node 0 5 | Memory at 91000000 (32-bit, prefetchable) [size=16M] 6 | Memory at 92808000 (32-bit, non-prefetchable) [size=16K] 7 | Memory at 92000000 (32-bit, non-prefetchable) [size=8M] 8 | Expansion ROM at 000c0000 [virtual] [disabled] [size=128K] 9 | Capabilities: [dc] Power Management version 3 10 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu.txt: -------------------------------------------------------------------------------- 1 | *-display 2 | description: VGA compatible controller 3 | product: Graphics Controller 4 | vendor: Graphics 5 | physical id: 0 6 | bus info: pci@0000:03:00.0 7 | version: 04 8 | width: 32 bits 9 | clock: 66MHz 10 | capabilities: pm vga_controller bus_master cap_list rom fb 11 | configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16 12 | resources: irq:16 memory:91000000-91ffffff memory:92808000-9280bfff memory:92000000-927fffff memory:c0000-dffff 13 | -------------------------------------------------------------------------------- /platform-update-agent/debian/platform-update-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Platform Update Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-update-agent/README.md 4 | 5 | [Service] 6 | ExecStart=/opt/edge-node/bin/platform-update-agent -config /etc/edge-node/node/confs/platform-update-agent.yaml 7 | StandardOutput=journal 8 | StandardError=journal 9 | RestartSec=60 10 | Restart=on-failure 11 | CPUQuota=20% 12 | MemoryMax=128M 13 | User=platform-update-agent 14 | Group=bm-agents 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_noHT_onesocket.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 0 3500.0000 4 | 2 0 3500.0000 5 | 3 0 3500.0000 6 | 4 0 3500.0000 7 | 5 0 3500.0000 8 | 6 0 3500.0000 9 | 7 0 3500.0000 10 | 8 0 3500.0000 11 | 9 0 3500.0000 12 | 10 0 3500.0000 13 | 11 0 3500.0000 14 | 12 0 2600.0000 15 | 13 0 2600.0000 16 | 14 0 2600.0000 17 | 15 0 2600.0000 18 | 16 0 2600.0000 19 | 17 0 2600.0000 20 | 18 0 2600.0000 21 | 19 0 2600.0000 22 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | // Context Timeouts 10 | const clientDialTimeoutInSeconds = 5 11 | const sourceTimeoutInSeconds = 15 12 | const emtSoftwareUpdateTimerInSeconds = 360 13 | const defaultSoftwareUpdateTimerInSeconds = 660 14 | const configTimeoutInSeconds = 15 15 | const firmwareUpdateTimerInSeconds = 90 16 | const queryTimeoutInSeconds = 15 17 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/platform-manageability-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Platform Manageability Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-manageability-agent/README.md 4 | 5 | [Service] 6 | ExecStart=/opt/edge-node/bin/pm-agent -config /etc/edge-node/node/confs/platform-manageability-agent.yaml 7 | StandardOutput=journal 8 | StandardError=journal 9 | RestartSec=60 10 | Restart=on-failure 11 | User=pm-agent 12 | Group=bm-agents 13 | CPUQuota=20% 14 | MemoryMax=128M 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /platform-update-agent/internal/utils/os_reader.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils 5 | 6 | import ( 7 | "os" 8 | ) 9 | 10 | // FileReader defines an interface for reading files. 11 | type FileReader interface { 12 | ReadFile(filename string) ([]byte, error) 13 | } 14 | 15 | // RealFileReader is the implementation of FileReader that reads from the disk. 16 | type RealFileReader struct{} 17 | 18 | func (r *RealFileReader) ReadFile(filename string) ([]byte, error) { 19 | return os.ReadFile(filename) 20 | } 21 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_install: 6 | $(MAKE) INSTALL_DIR=$$(pwd)/debian/platform-observability-agent install 7 | 8 | override_dh_builddeb: 9 | dh_builddeb -- -Zxz 10 | 11 | override_dh_installsystemd: 12 | dh_installsystemd --name=platform-observability-logging 13 | dh_installsystemd --name=platform-observability-health-check 14 | dh_installsystemd --name=platform-observability-metrics 15 | dh_installsystemd --name=platform-observability-collector 16 | 17 | override_dh_auto_build: 18 | dh_auto_build -- clean 19 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: platform-manageability-agent 2 | Maintainer: Platform Manageability Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: platform-manageability-agent 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends} 11 | Description: Platform Manageability Agent manages platform-level manageability 12 | features for Edge Nodes. It provides a unified interface for managing 13 | hardware, firmware, and platform configurations on Edge Node devices. 14 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: hardware-discovery-agent 2 | Maintainer: Hardware Discovery Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: hardware-discovery-agent 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, apparmor-utils, dmidecode, udev, usbutils, ipmitool, lshw, pciutils 11 | Description: hd-agent reports host hardware information to Edge Infrastructure Manager 12 | Collected hardware description consist of cpu, memory, disks, 13 | network and usb devices. 14 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_no_max_mhz.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 - 3 | 1 0 - 4 | 2 0 - 5 | 3 0 - 6 | 4 0 - 7 | 5 0 - 8 | 6 0 - 9 | 7 0 - 10 | 8 0 - 11 | 9 0 - 12 | 10 0 - 13 | 11 0 - 14 | 12 0 - 15 | 13 0 - 16 | 14 0 - 17 | 15 0 - 18 | 16 0 - 19 | 17 0 - 20 | 18 0 - 21 | 19 0 - 22 | 20 0 - 23 | 21 0 - 24 | 22 0 - 25 | 23 0 - 26 | -------------------------------------------------------------------------------- /node-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2023 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/downloader.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package osupdater updates the OS. 7 | package osupdater 8 | 9 | // Downloader is an interface that contains the method to download the update. 10 | type Downloader interface { 11 | Download() error 12 | } 13 | 14 | // OSDownloader is the struct to hold parameters to download the OS update 15 | type OSDownloader struct{} 16 | 17 | // Download is an abstract downloader method 18 | func (d *OSDownloader) Download() error { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /node-agent/debian/control: -------------------------------------------------------------------------------- 1 | Source: node-agent 2 | Maintainer: Node Agent Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: node-agent 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, apparmor-utils, caddy, incron 11 | Description: Node Agent registers and authenticates the Edge Node with 12 | the Edge Infrastructure Manager service. It also creates and renews 13 | tokens for other agents running on the Edge Node. It reports status 14 | of Edge Node to the Edge Infrastructure Manager as it onboards. 15 | -------------------------------------------------------------------------------- /reporting-agent/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2025 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. 11 | -------------------------------------------------------------------------------- /cluster-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2023 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. 11 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_gpu_name.txt: -------------------------------------------------------------------------------- 1 | 03:00.0 VGA compatible controller: Graphics Controller (prog-if 00 [VGA controller]) 2 | DeviceName: Embedded Video 3 | Subsystem: Graphics Controller 4 | Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16, NUMA node 0 5 | Memory at 91000000 (32-bit, prefetchable) [size=16M] 6 | Memory at 92808000 (32-bit, non-prefetchable) [size=16K] 7 | Memory at 92000000 (32-bit, non-prefetchable) [size=8M] 8 | Expansion ROM at 000c0000 [virtual] [disabled] [size=128K] 9 | Capabilities: [dc] Power Management version 3 10 | -------------------------------------------------------------------------------- /node-agent/debian/config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_input high node-agent/onboarding.serviceURL || true 8 | db_input low node-agent/onboarding.enabled || true 9 | db_input low node-agent/onboarding.heartbeatInterval || true 10 | db_input low node-agent/auth.accessTokenURL || true 11 | db_input low node-agent/auth.rsTokenURL || true 12 | db_input low node-agent/proxy.aptSourceURL || true 13 | db_input low node-agent/proxy.aptSourceProxyPort || true 14 | db_input low node-agent/proxy.aptSourceFilesRSRoot || true 15 | db_input low node-agent/auth.RSType || true 16 | db_go || true 17 | -------------------------------------------------------------------------------- /platform-update-agent/cmd/mock-server/mock-server.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "flag" 8 | "fmt" 9 | 10 | mock_server "github.com/open-edge-platform/edge-node-agents/platform-update-agent/cmd/mock-server/mock-server" 11 | ) 12 | 13 | func main() { 14 | var serverType mock_server.ServerType 15 | 16 | flag.Var(&serverType, "server", "Server type (UBUNTU or EMT)") 17 | flag.Parse() 18 | 19 | fmt.Printf("Selected server type: %v\n", serverType.String()) 20 | 21 | mock_server.StartMockServer(serverType) 22 | } 23 | -------------------------------------------------------------------------------- /common/pkg/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package logger 5 | 6 | import ( 7 | "os" 8 | 9 | log "github.com/sirupsen/logrus" 10 | ) 11 | 12 | func init() { 13 | log.SetFormatter(&log.TextFormatter{FullTimestamp: true}) 14 | log.SetOutput(os.Stdout) 15 | log.SetLevel(log.InfoLevel) 16 | } 17 | 18 | // New creates a new log entry with the specified component and version. 19 | func New(component, version string) *log.Entry { 20 | return log.WithFields(log.Fields{ 21 | "component": component, 22 | "version": version, 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /hardware-discovery-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2022 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2023 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. -------------------------------------------------------------------------------- /platform-update-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2023 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. 11 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_invalid_max_mhz.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 invalid 3 | 1 0 invalid 4 | 2 0 invalid 5 | 3 0 invalid 6 | 4 0 invalid 7 | 5 0 invalid 8 | 6 0 invalid 9 | 7 0 invalid 10 | 8 0 invalid 11 | 9 0 invalid 12 | 10 0 invalid 13 | 11 0 invalid 14 | 12 0 invalid 15 | 13 0 invalid 16 | 14 0 invalid 17 | 15 0 invalid 18 | 16 0 invalid 19 | 17 0 invalid 20 | 18 0 invalid 21 | 19 0 invalid 22 | 20 0 invalid 23 | 21 0 invalid 24 | 22 0 invalid 25 | 23 0 invalid 26 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. 11 | -------------------------------------------------------------------------------- /platform-manageability-agent/test/test_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: v0.1.0 6 | logLevel: info 7 | GUID: 'aaaaaaaa-0000-1111-2222-bbbbbbbbcccc' 8 | manageability: 9 | enabled: true 10 | serviceURL: 'localhost:12345' 11 | heartbeatInterval: 10s 12 | rpsAddress: 'localhost:12345' 13 | statusEndpoint: 'unix:///tmp/status-server.sock' 14 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 15 | metricsInterval: 10s 16 | accessTokenPath: /etc/intel_edge_node/tokens/platform-manageability-agent/access_token -------------------------------------------------------------------------------- /platform-observability-agent/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright (C) 2023 Intel Corporation 2 | 3 | This software and the related documents are Intel copyrighted materials, and 4 | your use of them is governed by the express license under which they were 5 | provided to you ("License"). Unless the License provides otherwise, you may not 6 | use, modify, copy, publish, distribute, disclose or transmit this software or 7 | the related documents without Intel's prior written permission. 8 | 9 | This software and the related documents are provided as is, with no express or 10 | implied warranties, other than those that are expressly stated in the License. 11 | -------------------------------------------------------------------------------- /in-band-manageability/debian/control: -------------------------------------------------------------------------------- 1 | Source: in-band-manageability 2 | Maintainer: In-Band Manageability Team 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 1.0.0 6 | Build-Depends: debhelper-compat (= 12) 7 | 8 | Package: in-band-manageability 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, apparmor-utils 11 | Description: Intel In-Band Manageability Tools 12 | This package contains the inbc CLI and inbd daemon for Intel In-Band Manageability. 13 | The tools provide firmware updates, OS updates, configuration management, and 14 | power control capabilities for Intel-based edge devices. 15 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/grpc-go-NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2014 gRPC authors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /platform-update-agent/mocks/configs/empty-platform-update-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.1.0' 6 | logLevel: info 7 | GUID: '00000000-0000-0000-0000-000000000000' 8 | updateServiceURL: 'localhost:8089' 9 | metadataPath: '/tmp/metadata.json' 10 | INBCLogsPath: '/var/log/inbm-update-status.log' 11 | INBCGranularLogsPath: '/var/log/inbm-update-log.log' 12 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 13 | metricsInterval: 10s 14 | tickerInterval: 10s 15 | jwt: 16 | accessTokenPath: '../../mocks/access_token' 17 | -------------------------------------------------------------------------------- /platform-update-agent/mocks/configs/valid-platform-update-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.1.0' 6 | logLevel: info 7 | GUID: '00000000-0000-0000-0000-000000000000' 8 | updateServiceURL: 'localhost:8089' 9 | metadataPath: '/tmp/metadata.json' 10 | INBCLogsPath: '/var/log/inbm-update-status.log' 11 | INBCGranularLogsPath: '/var/log/inbm-update-log.log' 12 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 13 | metricsInterval: 10s 14 | tickerInterval: 10s 15 | jwt: 16 | accessTokenPath: '../../mocks/access_token' 17 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/go-yaml-NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /node-agent/debian/node-agent.node-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Node Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/node-agent/README.md 4 | 5 | [Service] 6 | EnvironmentFile=/etc/environment 7 | ExecStart=/opt/edge-node/bin/node-agent -config /etc/edge-node/node/confs/node-agent.yaml 8 | StandardOutput=journal 9 | StandardError=journal 10 | RestartSec=60 11 | Restart=on-failure 12 | User=node-agent 13 | Group=bm-agents 14 | CPUQuota=20% 15 | MemoryMax=128M 16 | UMask=0007 17 | RuntimeDirectory=node-agent 18 | RuntimeDirectoryMode=0750 19 | RuntimeDirectoryPreserve=yes 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: platform-observability-agent/host 2 | Type: string 3 | Default: localhost.com 4 | Description: Edge Infrastructure Manager observability HOST: 5 | 6 | Template: platform-observability-agent/port 7 | Type: string 8 | Default: 443 9 | Description: Edge Infrastructure Manager observability PORT: 10 | 11 | Template: platform-observability-agent/metrics-host 12 | Type: string 13 | Default: localhost.com 14 | Description: Central observability stack metrics HOST: 15 | 16 | Template: platform-observability-agent/metrics-port 17 | Type: string 18 | Default: 443 19 | Description: Central observability stack metrics PORT: 20 | -------------------------------------------------------------------------------- /cluster-agent/test/test_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.5.0' 6 | 7 | # Globally unique identifier read from motherboard. Might be obtained with: 8 | # sudo cat /sys/class/dmi/id/product_uuid 9 | GUID: '00000000-0000-0000-0000-000000000000' 10 | 11 | # Connection parameters 12 | clusterOrchestratorURL: 'localhost:12345' 13 | heartbeat: '10s' 14 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 15 | metricsInterval: 10s 16 | statusEndpoint: 'unix:////tmp/status-server.sock' 17 | jwt: 18 | accessTokenPath: '/etc/intel_edge_node/tokens/cluster-agent' 19 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_noecores_noHT.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 1 3500.0000 4 | 2 0 3500.0000 5 | 3 1 3500.0000 6 | 4 0 3500.0000 7 | 5 1 3500.0000 8 | 6 0 3500.0000 9 | 7 1 3500.0000 10 | 8 0 3500.0000 11 | 9 1 3500.0000 12 | 10 0 3500.0000 13 | 11 1 3500.0000 14 | 12 0 3500.0000 15 | 13 1 3500.0000 16 | 14 0 3500.0000 17 | 15 1 3500.0000 18 | 16 0 3500.0000 19 | 17 1 3500.0000 20 | 18 0 3500.0000 21 | 19 1 3500.0000 22 | 20 0 3500.0000 23 | 21 1 3500.0000 24 | 22 0 3500.0000 25 | 23 1 3500.0000 26 | -------------------------------------------------------------------------------- /in-band-manageability/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | #DEBHELPER# 4 | 5 | if [ "$1" = purge ]; then 6 | # Remove group 7 | groupdel inbd 2>/dev/null || true 8 | 9 | # Remove configuration files and directories 10 | rm -f /etc/intel_manageability.conf 11 | rm -f /etc/firmware_tool_info.conf 12 | #rm -rf /etc/intel_edge_node 13 | rm -f /usr/share/inbd_schema.json 14 | rm -f /usr/share/firmware_tool_config_schema.json 15 | 16 | # Remove AppArmor profile 17 | rm -f /etc/apparmor.d/usr.bin.inbd 18 | 19 | # Remove runtime directories 20 | rm -rf /var/edge-node/inbd 21 | 22 | echo "Successfully purged in-band-manageability" 23 | fi 24 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_noecores_onesocket.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 0 3500.0000 4 | 2 0 3500.0000 5 | 3 0 3500.0000 6 | 4 0 3500.0000 7 | 5 0 3500.0000 8 | 6 0 3500.0000 9 | 7 0 3500.0000 10 | 8 0 3500.0000 11 | 9 0 3500.0000 12 | 10 0 3500.0000 13 | 11 0 3500.0000 14 | 12 0 3500.0000 15 | 13 0 3500.0000 16 | 14 0 3500.0000 17 | 15 0 3500.0000 18 | 16 0 3500.0000 19 | 17 0 3500.0000 20 | 18 0 3500.0000 21 | 19 0 3500.0000 22 | 20 0 3500.0000 23 | 21 0 3500.0000 24 | 22 0 3500.0000 25 | 23 0 3500.0000 26 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/cleaner.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package ubuntu updates the Ubuntu OS. 7 | package ubuntu 8 | 9 | import ( 10 | common "github.com/open-edge-platform/edge-node-agents/in-band-manageability/internal/common" 11 | ) 12 | 13 | // Cleaner is the concrete implementation of the Cleaner interface 14 | // for the Ubuntu OS. 15 | type Cleaner struct { 16 | CommandExecutor common.Executor 17 | Path string 18 | } 19 | 20 | // Clean method for Ubuntu 21 | func (u *Cleaner) Clean() error { 22 | // No clean up needed for Ubuntu 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /node-agent/debian/dirs: -------------------------------------------------------------------------------- 1 | etc/edge-node/node/confs 2 | etc/intel_edge_node 3 | etc/intel_edge_node/client-credentials 4 | etc/intel_edge_node/tokens 5 | etc/intel_edge_node/tokens/attestation-manager 6 | etc/intel_edge_node/tokens/cluster-agent 7 | etc/intel_edge_node/tokens/connect-agent 8 | etc/intel_edge_node/tokens/hd-agent 9 | etc/intel_edge_node/tokens/node-agent 10 | etc/intel_edge_node/tokens/platform-observability-agent 11 | etc/intel_edge_node/tokens/platform-telemetry-agent 12 | etc/intel_edge_node/tokens/platform-update-agent 13 | etc/intel_edge_node/tokens/platform-manageability-agent 14 | etc/intel_edge_node/tokens/prometheus 15 | etc/intel_edge_node/tokens/release-service 16 | run/node-agent 17 | -------------------------------------------------------------------------------- /platform-update-agent/mocks/configs/platform-update-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.1.0' 6 | logLevel: info 7 | GUID: '00000000-0000-0000-0000-000000000000' 8 | updateServiceURL: 'localhost:8089' 9 | metadataPath: '/var/edge-node/pua/metadata.json' 10 | INBCLogsPath: '/var/log/inbm-update-status.log' 11 | INBCGranularLogsPath: '/var/log/inbm-update-log.log' 12 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 13 | metricsInterval: 10s 14 | tickerInterval: 10s 15 | jwt: 16 | accessTokenPath: '/etc/intel_edge_node/tokens/platform-update-agent/access_token' 17 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_same_pcore_ecore_count.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 0 3500.0000 4 | 2 0 3500.0000 5 | 3 0 3500.0000 6 | 4 0 3500.0000 7 | 5 0 3500.0000 8 | 6 0 3500.0000 9 | 7 0 3500.0000 10 | 8 0 3500.0000 11 | 9 0 3500.0000 12 | 10 0 3500.0000 13 | 11 0 3500.0000 14 | 12 0 3500.0000 15 | 13 0 3500.0000 16 | 14 0 3500.0000 17 | 15 0 3500.0000 18 | 16 0 2600.0000 19 | 17 0 2600.0000 20 | 18 0 2600.0000 21 | 19 0 2600.0000 22 | 20 0 2600.0000 23 | 21 0 2600.0000 24 | 22 0 2600.0000 25 | 23 0 2600.0000 26 | -------------------------------------------------------------------------------- /platform-manageability-agent/configs/platform-manageability-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: v0.1.0 6 | logLevel: info 7 | GUID: 'aaaaaaaa-0000-1111-2222-bbbbbbbbcccc' 8 | manageability: 9 | enabled: true 10 | serviceURL: 'infra.test.edgeorch.intel.com:443' 11 | heartbeatInterval: 10s 12 | rpsAddress: 'rps.test.edgeorch.intel.com' 13 | statusEndpoint: 'unix:///run/node-agent/node-agent.sock' 14 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 15 | metricsInterval: 10s 16 | accessTokenPath: /etc/intel_edge_node/tokens/platform-manageability-agent/access_token 17 | -------------------------------------------------------------------------------- /common/pkg/utils/validate.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils 5 | 6 | import "net/url" 7 | 8 | // NoNullByteString checks if the provided string does not contain any null bytes. 9 | func NoNullByteString(s string) bool { 10 | for _, b := range []byte(s) { 11 | if b == 0 { 12 | return false 13 | } 14 | } 15 | return true 16 | } 17 | 18 | // NoNullByteURL checks if the provided URL string does not contain any null bytes. 19 | func NoNullByteURL(u string) bool { 20 | s, err := url.PathUnescape(u) 21 | if err != nil { 22 | return false 23 | } 24 | if !NoNullByteString(s) { 25 | return false 26 | } 27 | return true 28 | } 29 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/download_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package ubuntu 5 | 6 | import ( 7 | "testing" 8 | 9 | pb "github.com/open-edge-platform/edge-node-agents/in-band-manageability/pkg/api/inbd/v1" 10 | "github.com/stretchr/testify/assert" 11 | ) 12 | 13 | func TestDownloader_Download(t *testing.T) { 14 | // Create a Downloader instance 15 | downloader := Downloader{ 16 | Request: &pb.UpdateSystemSoftwareRequest{}, 17 | } 18 | 19 | // Call the Download method 20 | err := downloader.Download() 21 | 22 | // Assertions 23 | assert.NoError(t, err, "Download should not return an error") 24 | } 25 | -------------------------------------------------------------------------------- /common/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # buf.gen.yaml 6 | # docs: https://docs.buf.build/configuration/v1/buf-gen-yaml 7 | 8 | version: v1 9 | 10 | plugins: 11 | 12 | # go - https://pkg.go.dev/google.golang.org/protobuf 13 | - plugin: go 14 | out: pkg/api 15 | opt: 16 | - paths=source_relative 17 | 18 | # go grpc - https://pkg.go.dev/google.golang.org/grpc 19 | - plugin: go-grpc 20 | out: pkg/api 21 | opt: 22 | - paths=source_relative 23 | 24 | # docs - https://github.com/pseudomuto/protoc-gen-doc 25 | - plugin: doc 26 | out: docs 27 | opt: markdown,agent_status.md 28 | strategy: all 29 | -------------------------------------------------------------------------------- /platform-update-agent/mocks/configs/ubuntu-vm-test-platform-update-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.1.0' 6 | logLevel: debug 7 | GUID: '00000000-0000-0000-0000-000000000000' 8 | updateServiceURL: 'localhost:8089' 9 | metadataPath: '/home/ubuntu/pua-metadata.json' 10 | INBCLogsPath: '/var/log/inbm-update-status.log' 11 | INBCGranularLogsPath: '/var/log/inbm-update-log.log' 12 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 13 | metricsInterval: 10000s 14 | tickerInterval: 5s 15 | jwt: 16 | accessTokenPath: '../../mocks/access_token' 17 | immediateDownloadWindow: 10s 18 | downloadWindow: 10s 19 | -------------------------------------------------------------------------------- /cluster-agent/configs/cluster-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.5.0' 6 | 7 | # Globally unique identifier read from motherboard. Might be obtained with: 8 | # sudo cat /sys/class/dmi/id/product_uuid 9 | GUID: '00000000-0000-0000-0000-000000000000' 10 | 11 | logLevel: 'debug' 12 | 13 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 14 | metricsInterval: 10s 15 | statusEndpoint: 'unix:///run/node-agent/node-agent.sock' 16 | # Connection parameters 17 | clusterOrchestratorURL: 'localhost:443' 18 | heartbeat: '10s' 19 | jwt: 20 | accessTokenPath: '/etc/intel_edge_node/tokens/cluster-agent/access_token' 21 | -------------------------------------------------------------------------------- /common/pkg/utils/string.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils 5 | 6 | import "strings" 7 | 8 | // TrimSpace removes leading and trailing whitespace from the string. 9 | func TrimSpace(s string) string { 10 | return strings.TrimSpace(s) 11 | } 12 | 13 | // TrimSpaceInBytes converts a byte slice to a string and trims leading and trailing whitespace. 14 | func TrimSpaceInBytes(b []byte) string { 15 | return TrimSpace(string(b)) 16 | } 17 | 18 | // TrimPrefix removes the specified prefix from the string and trims any leading or trailing whitespace. 19 | func TrimPrefix(s, prefix string) string { 20 | return strings.TrimSpace(strings.TrimPrefix(s, prefix)) 21 | } 22 | -------------------------------------------------------------------------------- /.github/workflows/post-merge-scorecard.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Post-Merge Scorecard CI 6 | 7 | on: 8 | push: 9 | branches: 10 | - main 11 | workflow_dispatch: 12 | 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | call-scorecard: 18 | permissions: 19 | security-events: write # required for SARIF upload 20 | id-token: write 21 | contents: read 22 | 23 | uses: open-edge-platform/orch-ci/.github/workflows/post-merge-scorecard.yml@20b640842e63420b06b3ff4247e608228e14c74a # 2026.0.1 24 | with: 25 | project_folder: "." 26 | secrets: 27 | SYS_EMF_GH_TOKEN: ${{ secrets.SYS_EMF_GH_TOKEN }} 28 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/download.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package ubuntu updates the Ubuntu OS. 7 | package ubuntu 8 | 9 | import ( 10 | "fmt" 11 | 12 | pb "github.com/open-edge-platform/edge-node-agents/in-band-manageability/pkg/api/inbd/v1" 13 | ) 14 | 15 | // Downloader is the concrete implementation of the IDownloader interface 16 | // for the Ubuntu OS. 17 | type Downloader struct { 18 | Request *pb.UpdateSystemSoftwareRequest 19 | } 20 | 21 | // Download method for Ubuntu 22 | func (u *Downloader) Download() error { 23 | fmt.Println("Debian-based OS does not require a file download to perform a software update") 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /platform-observability-agent/scripts/collect_gpu_metrics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SPDX-FileCopyrightText: 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | JSON=$(test -h /usr/bin/jq || /usr/bin/jq -n '') 6 | 7 | # gather metrics from all discrete GPUs (Server & Client) 8 | for id in $(test -h /usr/bin/xpu-smi || test -h /usr/bin/sed || sudo /usr/bin/xpu-smi discovery --dump=1 | /usr/bin/sed '1d') 9 | do 10 | METRICS=$(test -h /usr/bin/xpu-smi || /usr/bin/xpu-smi stats --json -d "$id") 11 | JSON=$(test -h /usr/bin/echo || test -h /usr/bin/jq || /usr/bin/echo "$JSON" | /usr/bin/jq --argjson gpu"$id" "${METRICS}" '. += $ARGS.named') 12 | done 13 | 14 | # TODO: gather metrics from all integrated GPUs 15 | 16 | test -h /usr/bin/echo || /usr/bin/echo "$JSON" 17 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/source_os.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | import ( 10 | "github.com/spf13/cobra" 11 | ) 12 | 13 | // SourceOSCmd returns a cobra command for the Source OS command 14 | func SourceOSCmd() *cobra.Command { 15 | cmd := &cobra.Command{ 16 | Use: "os", 17 | Short: "Modifies the source files for OS Updates", 18 | Long: "Source command is used to creates a new /etc/apt/sources.list file with only the sources provided.", 19 | } 20 | 21 | // Add subcommands to source OS command 22 | cmd.AddCommand(UpdateOSSourceCmd()) 23 | 24 | return cmd 25 | } 26 | -------------------------------------------------------------------------------- /cluster-agent/internal/state/registering.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package state 5 | 6 | import ( 7 | "github.com/open-edge-platform/edge-node-agents/common/pkg/utils" 8 | ) 9 | 10 | type Registering struct { 11 | sm *StateMachine 12 | tF string 13 | } 14 | 15 | func (s *Registering) Register() error { 16 | s.sm.installCmd, s.sm.uninstallCmd = s.sm.client.RegisterToClusterOrch(utils.GetAuthContext(s.sm.ctx, s.tF), s.sm.guid) 17 | 18 | s.sm.set(s.sm.installInProgress) 19 | return s.sm.currentState.Register() 20 | } 21 | 22 | func (s *Registering) Deregister() error { 23 | return s.sm.incorrectActionRequest() 24 | } 25 | 26 | func (s *Registering) State() string { 27 | return "REGISTERING" 28 | } 29 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/source.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | import ( 10 | "github.com/spf13/cobra" 11 | ) 12 | 13 | // SourceCmd returns a cobra command for the Source command 14 | func SourceCmd() *cobra.Command { 15 | cmd := &cobra.Command{ 16 | Use: "source", 17 | Short: "Modifies the source files for Updates", 18 | Long: "Source command is used to modify the application and OS files used for performing updates.", 19 | } 20 | 21 | // Add subcommands to createCmd 22 | cmd.AddCommand(SourceApplicationCmd()) 23 | cmd.AddCommand(SourceOSCmd()) 24 | 25 | return cmd 26 | } 27 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/platform-observability-agent.platform-observability-health-check.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Platform Observability Health Check Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-observability-agent/README.md 4 | 5 | [Service] 6 | Type=simple 7 | EnvironmentFile=-/etc/sysconfig/fluent-bit 8 | EnvironmentFile=-/etc/default/fluent-bit 9 | ExecStart=/etc/edge-node/node/confs/platform-observability-health-check /opt/health-check/bin/fluent-bit -c /etc/health-check/health-check.conf 10 | StandardOutput=journal 11 | StandardError=journal 12 | RestartSec=60 13 | Restart=on-failure 14 | User=platform-observability-agent 15 | Group=bm-agents 16 | CPUQuota=20% 17 | MemoryMax=128M 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/platform-observability-agent.platform-observability-logging.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Platform Observability Logging Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-observability-agent/README.md 4 | 5 | [Service] 6 | Type=simple 7 | EnvironmentFile=-/etc/sysconfig/fluent-bit 8 | EnvironmentFile=-/etc/default/fluent-bit 9 | ExecStart=/etc/edge-node/node/confs/platform-observability-logging /opt/fluent-bit/bin/fluent-bit -c /etc/fluent-bit/fluent-bit.conf 10 | StandardOutput=journal 11 | StandardError=journal 12 | RestartSec=60 13 | Restart=on-failure 14 | User=platform-observability-agent 15 | Group=bm-agents 16 | CPUQuota=20% 17 | MemoryMax=128M 18 | LimitNOFILE=10000 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /cluster-agent/internal/k8sbootstrap/k8sbootstrap_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Unit Tests for package k8sbootstrap: Testing DownloadInstallScript and InstallScript 5 | package k8sbootstrap 6 | 7 | import ( 8 | "context" 9 | "testing" 10 | 11 | "github.com/stretchr/testify/assert" 12 | ) 13 | 14 | // Testing successful install script .sh function 15 | func TestExecRunSuccess(t *testing.T) { 16 | err := Execute(context.Background(), "echo Hello World") 17 | assert.NoError(t, err) 18 | } 19 | 20 | // Testing failure install script .sh function 21 | func TestExecRunFailCommand(t *testing.T) { 22 | err := Execute(context.Background(), "non-existing-command") 23 | assert.Error(t, err) 24 | assert.Contains(t, "exit status 127", err.Error()) 25 | } 26 | -------------------------------------------------------------------------------- /cluster-agent/internal/state/deregistering.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package state 5 | 6 | import ( 7 | "github.com/open-edge-platform/edge-node-agents/common/pkg/utils" 8 | ) 9 | 10 | type Deregistering struct { 11 | sm *StateMachine 12 | tF string 13 | } 14 | 15 | func (s *Deregistering) Register() error { 16 | return s.sm.incorrectActionRequest() 17 | } 18 | 19 | func (s *Deregistering) Deregister() error { 20 | if s.sm.uninstallCmd == "" { 21 | s.sm.installCmd, s.sm.uninstallCmd = s.sm.client.RegisterToClusterOrch(utils.GetAuthContext(s.sm.ctx, s.tF), s.sm.guid) 22 | } 23 | 24 | s.sm.set(s.sm.uninstallInProgress) 25 | return s.sm.currentState.Deregister() 26 | } 27 | 28 | func (s *Deregistering) State() string { 29 | return "DEREGISTERING" 30 | } 31 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/commands_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | import ( 10 | "fmt" 11 | "testing" 12 | ) 13 | 14 | func TestMust_NoError(t *testing.T) { 15 | // Test must function with no error 16 | defer func() { 17 | if r := recover(); r != nil { 18 | t.Errorf("must panicked unexpectedly: %v", r) 19 | } 20 | }() 21 | must(nil) // Should not panic 22 | } 23 | 24 | func TestMust_WithError(t *testing.T) { 25 | // Test must function with an error 26 | defer func() { 27 | if r := recover(); r == nil { 28 | t.Errorf("must did not panic when it should have") 29 | } 30 | }() 31 | must(fmt.Errorf("test error")) // Should panic 32 | } 33 | -------------------------------------------------------------------------------- /platform-observability-agent/configs/apparmor.d/opt.fluent-bit.bin.fluent-bit: -------------------------------------------------------------------------------- 1 | abi , 2 | 3 | include 4 | 5 | /opt/fluent-bit/bin/fluent-bit { 6 | include 7 | include 8 | 9 | /etc/edge-node/node/confs/platform-observability-logging ix, 10 | /etc/fluent-bit/fluent-bit.conf r, 11 | /opt/fluent-bit/bin/fluent-bit mr, 12 | /run/log/journal/ r, 13 | /run/platform-observability-agent/agent-logs.sock rw, 14 | /sys/kernel/mm/transparent_hugepage/enabled r, 15 | /usr/bin/dash ix, 16 | /var/log/apt/history.log r, 17 | /var/log/cloud-init.log r, 18 | /var/log/inbm-update-status.log r, 19 | /var/log/journal/ r, 20 | /var/log/journal/** r, 21 | owner /var/log/edge-node/poa/ r, 22 | owner /var/log/edge-node/poa/* r, 23 | owner /var/log/edge-node/poa/** rw, 24 | 25 | } 26 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/davecgh-go-spew-LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /platform-update-agent/configs/platform-update-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.1.0' 6 | logLevel: info 7 | GUID: '00000000-0000-0000-0000-000000000000' 8 | updateServiceURL: 'localhost:8089' 9 | metadataPath: '/var/edge-node/pua/metadata.json' 10 | INBCLogsPath: '/var/log/inbm-update-status.log' 11 | INBCGranularLogsPath: '/var/log/inbm-update-log.log' 12 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 13 | metricsInterval: 10s 14 | statusEndpoint: 'unix:///run/node-agent/node-agent.sock' 15 | tickerInterval: 20s 16 | jwt: 17 | accessTokenPath: '/etc/intel_edge_node/tokens/platform-update-agent/access_token' 18 | immediateDownloadWindow: 10m 19 | downloadWindow: 6h 20 | releaseServiceFQDN: 'https://files-rs.internal.example.intel.com' 21 | -------------------------------------------------------------------------------- /platform-observability-agent/configs/sudoers.d/platform-observability-agent: -------------------------------------------------------------------------------- 1 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/aa-status 2 | platform-observability-agent ALL=(root) NOPASSWD: /usr/bin/ps 3 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/ufw 4 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/smartctl 5 | platform-observability-agent ALL=(root) NOPASSWD: /usr/bin/ipmitool 6 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/pqos -r --iface-os --mon-file-type=csv --mon-interval=* 7 | platform-observability-agent ALL=(root) NOPASSWD: /usr/bin/xpu-smi 8 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/lvs * 9 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/pvs * 10 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/vgs * 11 | platform-observability-agent ALL=(root) NOPASSWD: /usr/sbin/dmidecode 12 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_noHT.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 1 3500.0000 4 | 2 0 3500.0000 5 | 3 1 3500.0000 6 | 4 0 3500.0000 7 | 5 1 3500.0000 8 | 6 0 3500.0000 9 | 7 1 3500.0000 10 | 8 0 3500.0000 11 | 9 1 3500.0000 12 | 10 0 3500.0000 13 | 11 1 3500.0000 14 | 12 0 3500.0000 15 | 13 1 3500.0000 16 | 14 0 3500.0000 17 | 15 1 3500.0000 18 | 16 0 3500.0000 19 | 17 1 3500.0000 20 | 18 0 3500.0000 21 | 19 1 3500.0000 22 | 20 0 3500.0000 23 | 21 1 3500.0000 24 | 22 0 3500.0000 25 | 23 1 3500.0000 26 | 24 0 2600.0000 27 | 25 1 2600.0000 28 | 26 0 2600.0000 29 | 27 1 2600.0000 30 | 28 0 2600.0000 31 | 29 1 2600.0000 32 | 30 0 2600.0000 33 | 31 1 2600.0000 34 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_onesocket.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 0 3500.0000 4 | 2 0 3500.0000 5 | 3 0 3500.0000 6 | 4 0 3500.0000 7 | 5 0 3500.0000 8 | 6 0 3500.0000 9 | 7 0 3500.0000 10 | 8 0 3500.0000 11 | 9 0 3500.0000 12 | 10 0 3500.0000 13 | 11 0 3500.0000 14 | 12 0 3500.0000 15 | 13 0 3500.0000 16 | 14 0 3500.0000 17 | 15 0 3500.0000 18 | 16 0 3500.0000 19 | 17 0 3500.0000 20 | 18 0 3500.0000 21 | 19 0 3500.0000 22 | 20 0 3500.0000 23 | 21 0 3500.0000 24 | 22 0 3500.0000 25 | 23 0 3500.0000 26 | 24 0 2600.0000 27 | 25 0 2600.0000 28 | 26 0 2600.0000 29 | 27 0 2600.0000 30 | 28 0 2600.0000 31 | 29 0 2600.0000 32 | 30 0 2600.0000 33 | 31 0 2600.0000 34 | -------------------------------------------------------------------------------- /in-band-manageability/configs/inbd_schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "type": "object", 4 | "properties": { 5 | "os_updater": { 6 | "type": "object", 7 | "properties": { 8 | "trustedRepositories": { 9 | "type": "array", 10 | "items": { 11 | "type": "string", 12 | "format": "uri" 13 | }, 14 | "description": "A list of trusted repository URLs." 15 | }, 16 | "proceedWithoutRollback": { 17 | "type": "boolean", 18 | "description": "Indicates whether to proceed with updates without rollback support." 19 | } 20 | }, 21 | "required": ["trustedRepositories", "proceedWithoutRollback"], 22 | "additionalProperties": false 23 | } 24 | }, 25 | "required": ["os_updater"], 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/source_application.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | import ( 10 | "github.com/spf13/cobra" 11 | ) 12 | 13 | // SourceApplicationCmd returns a cobra command for the Source Application command 14 | func SourceApplicationCmd() *cobra.Command { 15 | cmd := &cobra.Command{ 16 | Use: "application", 17 | Short: "Modifies the source files for Application Updates", 18 | Long: `Source command is used to modify the application files used for performing application updates.`, 19 | } 20 | 21 | // Add subcommands to Source Application command 22 | cmd.AddCommand(AddApplicationSourceCmd()) 23 | cmd.AddCommand(RemoveApplicationSourceCmd()) 24 | 25 | return cmd 26 | } 27 | -------------------------------------------------------------------------------- /cluster-agent/internal/state/installInProgress.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package state 5 | 6 | import "context" 7 | 8 | type InstallInProgress struct { 9 | sm *StateMachine 10 | execute func(ctx context.Context, command string) error 11 | } 12 | 13 | func (s *InstallInProgress) Register() error { 14 | log.Info("Start kubernetes engine installation script") 15 | 16 | err := s.execute(s.sm.ctx, s.sm.installCmd) 17 | if err != nil { 18 | s.sm.set(s.sm.inactive) 19 | return err 20 | } 21 | 22 | log.Info("kubernetes engine installation script executed successfully") 23 | 24 | s.sm.set(s.sm.active) 25 | return nil 26 | } 27 | 28 | func (s *InstallInProgress) Deregister() error { 29 | return s.sm.incorrectActionRequest() 30 | } 31 | 32 | func (s *InstallInProgress) State() string { 33 | return "INSTALL_IN_PROGRESS" 34 | } 35 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/utils/command.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | package utils 6 | 7 | import ( 8 | "fmt" 9 | "os/exec" 10 | "strings" 11 | ) 12 | 13 | type CmdExecutor = func(name string, args ...string) *exec.Cmd 14 | 15 | // ReadFromCommand executes a command in the operating system and returns the output, 16 | // 17 | // if return status != 0, then it will return with error message 18 | // 19 | // It returns the output from stdout and error if exist. 20 | func ReadFromCommand(executor CmdExecutor, command string, args ...string) (stdout []byte, err error) { 21 | var errbuf strings.Builder 22 | 23 | cmd := executor(command, args...) 24 | cmd.Stderr = &errbuf 25 | out, err := cmd.Output() 26 | if err != nil { 27 | return nil, fmt.Errorf("%v; %w", errbuf.String(), err) 28 | } 29 | 30 | return out, nil 31 | } 32 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/platform-observability-agent.platform-observability-metrics.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Platform Observability Metrics Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-observability-agent/README.md 4 | 5 | [Service] 6 | Type=simple 7 | AmbientCapabilities=CAP_SYS_RAWIO CAP_DAC_READ_SEARCH CAP_SYS_ADMIN 8 | Environment="SF_OCSP_RESPONSE_CACHE_DIR=/opt/telegraf/" 9 | EnvironmentFile=-/etc/sysconfig/telegraf 10 | EnvironmentFile=-/etc/default/telegraf 11 | ExecStart=/etc/edge-node/node/confs/platform-observability-metrics /opt/telegraf/bin/telegraf --config /etc/telegraf/telegraf.d/poa-telegraf.conf 12 | StandardOutput=null 13 | StandardError=journal 14 | RestartSec=60 15 | Restart=on-failure 16 | User=platform-observability-agent 17 | Group=bm-agents 18 | CPUQuota=20% 19 | MemoryMax=256M 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_invalid_socket_id.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 invalid 3500.0000 3 | 1 invalid 3500.0000 4 | 2 invalid 3500.0000 5 | 3 invalid 3500.0000 6 | 4 invalid 3500.0000 7 | 5 invalid 3500.0000 8 | 6 invalid 3500.0000 9 | 7 invalid 3500.0000 10 | 8 invalid 3500.0000 11 | 9 invalid 3500.0000 12 | 10 invalid 3500.0000 13 | 11 invalid 3500.0000 14 | 12 invalid 3500.0000 15 | 13 invalid 3500.0000 16 | 14 invalid 3500.0000 17 | 15 invalid 3500.0000 18 | 16 invalid 3500.0000 19 | 17 invalid 3500.0000 20 | 18 invalid 3500.0000 21 | 19 invalid 3500.0000 22 | 20 invalid 3500.0000 23 | 21 invalid 3500.0000 24 | 22 invalid 3500.0000 25 | 23 invalid 3500.0000 26 | 24 invalid 2600.0000 27 | 25 invalid 2600.0000 28 | 26 invalid 2600.0000 29 | 27 invalid 2600.0000 30 | 28 invalid 2600.0000 31 | 29 invalid 2600.0000 32 | 30 invalid 2600.0000 33 | 31 invalid 2600.0000 34 | -------------------------------------------------------------------------------- /platform-manageability-agent/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_get platform-manageability-agent/manageability.serviceURL 8 | if [ ! -z "$RET" ]; then 9 | sed -i "s/^ serviceURL: '.*'/ serviceURL: '$RET'/" /etc/edge-node/node/confs/platform-manageability-agent.yaml 10 | fi 11 | 12 | db_get platform-manageability-agent/rpsAddress 13 | if [ ! -z "$RET" ]; then 14 | sed -i "s/^rpsAddress: '.*'/rpsAddress: '$RET'/" /etc/edge-node/node/confs/platform-manageability-agent.yaml 15 | fi 16 | 17 | # Create system group if it doesn't exist 18 | groupadd -f bm-agents --system 19 | 20 | # Create system user if it doesn't exist 21 | id -u pm-agent >/dev/null 2>&1 || useradd pm-agent --system -g bm-agents -s /sbin/nologin 22 | 23 | GUID="$(cat /sys/class/dmi/id/product_uuid)" 24 | sed -i "s/^GUID: '.*'/GUID: '$GUID'/" /etc/edge-node/node/confs/platform-manageability-agent.yaml 25 | 26 | #DEBHELPER# 27 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/commands.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | var ( 10 | // Common flags 11 | ) 12 | 13 | // Panic on error, because the error is known statically never to occur. If it 14 | // does, then a programming error occurred, not a user or runtime error, such 15 | // as a race condition. 16 | // 17 | // This helper exists for when the Go type system is not sufficiently strong or 18 | // not sufficiently used. 19 | // 20 | // In the case of Cobra, it is useful when checking the return of 21 | // MarkFlagRequired-type function. The function should only error if there is a 22 | // typo in the code or the flag is created out of order. 23 | func must(err error) { 24 | if err != nil { 25 | panic("PROGRAMMING ERROR: " + err.Error()) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/network_checker.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package ubuntu updates the Ubuntu OS. 7 | package ubuntu 8 | 9 | import ( 10 | "log" 11 | 12 | common "github.com/open-edge-platform/edge-node-agents/in-band-manageability/internal/common" 13 | ) 14 | 15 | // CheckNetworkConnection verifies if there is an active network connection. 16 | func CheckNetworkConnection(cmdExecutor common.Executor) bool { 17 | cmd := []string{common.IPCmd, "route", "show", "default"} 18 | 19 | stdout, _, err := cmdExecutor.Execute(cmd) 20 | if err != nil { 21 | log.Println("Error running command:", err) 22 | return false 23 | } 24 | if len(stdout) == 0 { 25 | log.Println("No default gateway detected in output.") 26 | return false 27 | } 28 | log.Println("Default gateway is present. Network connection is likely active.") 29 | return true 30 | } 31 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/downloader_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package osupdater 5 | 6 | import ( 7 | "testing" 8 | 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestOSDownloader_Download_Success(t *testing.T) { 13 | // Create an instance of OSDownloader 14 | downloader := &OSDownloader{} 15 | 16 | // Call the Download method 17 | err := downloader.Download() 18 | 19 | // Assert that no error is returned 20 | assert.NoError(t, err, "Download should not return an error") 21 | } 22 | 23 | func TestOSDownloader_InterfaceImplementation(t *testing.T) { 24 | // Ensure OSDownloader implements the Downloader interface 25 | var downloader Downloader = &OSDownloader{} 26 | 27 | // Call the Download method through the interface 28 | err := downloader.Download() 29 | 30 | // Assert that no error is returned 31 | assert.NoError(t, err, "Download should not return an error") 32 | } 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # build folder 5 | build/ 6 | build/artifacts 7 | 8 | # build artifacts 9 | venv_hdagent/ 10 | vendor/ 11 | rpm/BUILD/ 12 | rpm/RPMS/ 13 | rpm/SRPMS/ 14 | rpm/SOURCES/ 15 | artifacts/* 16 | assets/ 17 | intel-inb-manageability/ 18 | 19 | # test files 20 | coverage.* 21 | junit_report.xml 22 | int_coverage.* 23 | jint_report.xml 24 | helm-unittest-output.xml 25 | *.log 26 | fuzz_config* 27 | 28 | # Default ignored files 29 | /shelf/ 30 | /workspace.xml 31 | 32 | # Editor-based HTTP Client requests 33 | /httpRequests/ 34 | 35 | # Datasource local storage ignored files 36 | /dataSources/ 37 | /dataSources.local.xml 38 | /.run/ 39 | /.idea/ 40 | 41 | # editors 42 | *.sw[a-p] 43 | *~ 44 | .netrwhist 45 | .vscode/* 46 | 47 | # patches 48 | *.orig 49 | *.rej 50 | 51 | # OS Generated files 52 | .DS_Store 53 | .DS_Store? 54 | .Spotlight-V100 55 | .Trashes 56 | ._* 57 | Icon 58 | Thumbs.db 59 | ehthumbs.db 60 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/install: -------------------------------------------------------------------------------- 1 | configs/fluent-bit.conf etc/fluent-bit 2 | configs/platform-observability-logging etc/edge-node/node/confs 3 | configs/apparmor.d/opt.fluent-bit.bin.fluent-bit etc/apparmor.d 4 | configs/sudoers.d/platform-observability-agent etc/sudoers.d 5 | 6 | configs/health-check.conf etc/health-check 7 | configs/platform-observability-health-check etc/edge-node/node/confs 8 | configs/apparmor.d/opt.health-check.bin.fluent-bit etc/apparmor.d 9 | 10 | configs/poa-telegraf.conf etc/telegraf/telegraf.d/ 11 | configs/platform-observability-metrics etc/edge-node/node/confs 12 | configs/apparmor.d/opt.telegraf.bin.telegraf etc/apparmor.d 13 | perfmon/ /etc/telegraf/ 14 | scripts/collect_gpu_metrics.sh opt/telegraf/bin/ 15 | scripts/collect_disk_info.sh opt/telegraf/bin/ 16 | scripts/core_metrics.sh opt/telegraf/bin/ 17 | 18 | configs/otelcol.yaml etc/otelcol 19 | configs/platform-observability-collector etc/edge-node/node/confs 20 | configs/apparmor.d/opt.otelcol.bin.otelcol etc/apparmor.d 21 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_invalid_ecore_id.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 1 3500.0000 4 | 2 0 3500.0000 5 | 3 1 3500.0000 6 | 4 0 3500.0000 7 | 5 1 3500.0000 8 | 6 0 3500.0000 9 | 7 1 3500.0000 10 | 8 0 3500.0000 11 | 9 1 3500.0000 12 | 10 0 3500.0000 13 | 11 1 3500.0000 14 | 12 0 3500.0000 15 | 13 1 3500.0000 16 | 14 0 3500.0000 17 | 15 1 3500.0000 18 | 16 0 3500.0000 19 | 17 1 3500.0000 20 | 18 0 3500.0000 21 | 19 1 3500.0000 22 | 20 0 3500.0000 23 | 21 1 3500.0000 24 | 22 0 3500.0000 25 | 23 1 3500.0000 26 | invalid 0 2600.0000 27 | invalid 1 2600.0000 28 | invalid 0 2600.0000 29 | invalid 1 2600.0000 30 | 28 0 2600.0000 31 | 29 1 2600.0000 32 | 30 0 2600.0000 33 | 31 1 2600.0000 34 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_invalid_pcore_id.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 1 3500.0000 4 | invalid 0 3500.0000 5 | invalid 1 3500.0000 6 | 4 0 3500.0000 7 | 5 1 3500.0000 8 | invalid 0 3500.0000 9 | invalid 1 3500.0000 10 | 8 0 3500.0000 11 | 9 1 3500.0000 12 | invalid 0 3500.0000 13 | invalid 1 3500.0000 14 | 12 0 3500.0000 15 | 13 1 3500.0000 16 | 14 0 3500.0000 17 | 15 1 3500.0000 18 | 16 0 3500.0000 19 | 17 1 3500.0000 20 | 18 0 3500.0000 21 | 19 1 3500.0000 22 | 20 0 3500.0000 23 | 21 1 3500.0000 24 | 22 0 3500.0000 25 | 23 1 3500.0000 26 | 24 0 2600.0000 27 | 25 1 2600.0000 28 | 26 0 2600.0000 29 | 27 1 2600.0000 30 | 28 0 2600.0000 31 | 29 1 2600.0000 32 | 30 0 2600.0000 33 | 31 1 2600.0000 34 | -------------------------------------------------------------------------------- /in-band-manageability/internal/fw_updater/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package fwupdater provides the implementation for updating the firmware. 7 | package fwupdater 8 | 9 | const firmwareToolInfoFilePath = "/etc/firmware_tool_info.conf" 10 | 11 | const firmwareToolInfoSchemaFilePath = "/usr/share/firmware_tool_config_schema.json" 12 | 13 | // FirmwareToolInfo is the matching firmware tool information for the platform. 14 | type FirmwareToolInfo struct { 15 | Name string `json:"name"` 16 | ToolOptions bool `json:"tool_options"` 17 | GUID bool `json:"guid"` 18 | BiosVendor string `json:"bios_vendor"` 19 | FirmwareTool string `json:"firmware_tool"` 20 | FirmwareToolArgs string `json:"firmware_tool_args"` 21 | FirmwareToolCheckArgs string `json:"firmware_tool_check_args"` 22 | FirmwareFileType string `json:"firmware_file_type"` 23 | } 24 | -------------------------------------------------------------------------------- /platform-observability-agent/debian/platform-observability-agent.platform-observability-collector.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Platform Observability Collector Agent 3 | Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-observability-agent/README.md 4 | 5 | [Service] 6 | Type=simple 7 | EnvironmentFile=-/etc/sysconfig/otelcol 8 | EnvironmentFile=-/etc/default/otelcol 9 | Environment=TENANT_ID=not-set 10 | EnvironmentFile=-/etc/intel_edge_node/tenantId 11 | ExecStart=/etc/edge-node/node/confs/platform-observability-collector /opt/otelcol/bin/otelcol --config=/etc/otelcol/otelcol.yaml 12 | StandardOutput=journal 13 | StandardError=journal 14 | RestartSec=60 15 | Restart=on-failure 16 | User=platform-observability-agent 17 | Group=bm-agents 18 | CPUQuota=20% 19 | MemoryMax=512M 20 | UMask=0007 21 | RuntimeDirectory=platform-observability-agent platform-observability-agent/fluent-bit 22 | RuntimeDirectoryMode=0755 23 | RuntimeDirectoryPreserve=yes 24 | 25 | [Install] 26 | WantedBy=multi-user.target 27 | -------------------------------------------------------------------------------- /common/pkg/utils/convert.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils 5 | 6 | import ( 7 | "fmt" 8 | "regexp" 9 | "strconv" 10 | "strings" 11 | ) 12 | 13 | var ( 14 | sizeRegexp = regexp.MustCompile(`^(\d+)\s*(MB|GB|TB)$`) 15 | ) 16 | 17 | // ParseSizeToMB converts a size string (e.g., "16 GB", "1024 MB", "1 TB") to MB. 18 | func ParseSizeToMB(sizeStr string) (uint64, error) { 19 | sizeStr = strings.TrimSpace(sizeStr) 20 | matches := sizeRegexp.FindStringSubmatch(sizeStr) 21 | if len(matches) != 3 { 22 | return 0, fmt.Errorf("invalid size format: %s", sizeStr) 23 | } 24 | 25 | size, err := strconv.ParseUint(matches[1], 10, 64) 26 | if err != nil { 27 | return 0, err 28 | } 29 | 30 | unit := matches[2] 31 | switch unit { 32 | case "MB": 33 | return size, nil 34 | case "GB": 35 | return size * 1024, nil 36 | case "TB": 37 | return size * 1024 * 1024, nil 38 | default: 39 | return 0, fmt.Errorf("unknown size unit: %s", unit) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /in-band-manageability/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: in-band-manageability 3 | Source: https://github.com/open-edge-platform/edge-node-agents 4 | 5 | Files: * 6 | Copyright: 2025 Intel Corporation 7 | License: Apache-2.0 8 | 9 | License: Apache-2.0 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at 13 | . 14 | http://www.apache.org/licenses/LICENSE-2.0 15 | . 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. 21 | . 22 | On Debian systems, the complete text of the Apache version 2.0 license 23 | can be found in "/usr/share/common-licenses/Apache-2.0". 24 | -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/ubuntu/reboot.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package ubuntu updates the Ubuntu OS. 7 | package ubuntu 8 | 9 | import ( 10 | "log" 11 | 12 | common "github.com/open-edge-platform/edge-node-agents/in-band-manageability/internal/common" 13 | "github.com/open-edge-platform/edge-node-agents/in-band-manageability/internal/inbd/utils" 14 | pb "github.com/open-edge-platform/edge-node-agents/in-band-manageability/pkg/api/inbd/v1" 15 | ) 16 | 17 | // Rebooter is the concrete implementation of the Updater interface 18 | // for the Ubuntu OS. 19 | type Rebooter struct { 20 | CommandExecutor common.Executor 21 | Request *pb.UpdateSystemSoftwareRequest 22 | } 23 | 24 | // Reboot method for Ubuntu 25 | func (u *Rebooter) Reboot() error { 26 | if u.Request.DoNotReboot { 27 | log.Println("Reboot is disabled. Skipping reboot.") 28 | return nil 29 | } 30 | 31 | return utils.RebootSystem(u.CommandExecutor) 32 | } 33 | -------------------------------------------------------------------------------- /cluster-agent/internal/k8sbootstrap/k8sbootstrap.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // package k8sbootstrap provides facilities to bootstrap k8s on the node on which is running 5 | package k8sbootstrap 6 | 7 | import ( 8 | "context" 9 | "os/exec" 10 | "strings" 11 | "time" 12 | 13 | "github.com/open-edge-platform/edge-node-agents/cluster-agent/internal/logger" 14 | "github.com/sirupsen/logrus" 15 | ) 16 | 17 | var ( 18 | execCommand = exec.CommandContext 19 | log = logger.Logger 20 | ) 21 | 22 | func Execute(ctx context.Context, command string) error { 23 | args := []string{"-o", "pipefail", "-c", command} 24 | log.Infof("Executing: bash %v", strings.Join(args, " ")) 25 | cmd := execCommand(ctx, "bash", args...) 26 | cmd.WaitDelay = 10 * time.Millisecond 27 | cmd.Stdout = log.Logger.WriterLevel(logrus.InfoLevel) 28 | cmd.Stderr = log.Logger.WriterLevel(logrus.ErrorLevel) 29 | 30 | if err := cmd.Run(); err != nil { 31 | return err 32 | } 33 | 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /platform-observability-agent/test/otelcol-test.yaml: -------------------------------------------------------------------------------- 1 | # Configuration for the OpenTelemetry Collector service 2 | receivers: 3 | otlp: 4 | protocols: 5 | grpc: 6 | endpoint: /run/platform-observability-agent/platform-observability-agent.sock 7 | transport: unix 8 | 9 | processors: 10 | memory_limiter: 11 | check_interval: 1s 12 | limit_mib: 400 13 | spike_limit_mib: 80 14 | batch: 15 | timeout: 30s 16 | 17 | exporters: 18 | file: 19 | path: /tmp/otelcol_metrics.log 20 | otlphttp: 21 | endpoint: https://testhost.com:553/otlp/v1/metrics 22 | metrics_endpoint: https://testhost.com:553/oltp/v1/metrics 23 | logs_endpoint: https://testhost.com:553/v1/logs 24 | headers: 25 | "X-Scope-OrgID": "edgenode-system" 26 | tls: 27 | min_version: "1.3" 28 | max_version: "1.3" 29 | cipher_suites: 30 | - TLS_AES_256_GCM_SHA384 31 | 32 | service: 33 | pipelines: 34 | metrics: 35 | receivers: [otlp] 36 | processors: [memory_limiter, batch] 37 | exporters: [file] 38 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/utils/command_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | package utils_test 4 | 5 | import ( 6 | "os/exec" 7 | "testing" 8 | 9 | "github.com/stretchr/testify/assert" 10 | "github.com/stretchr/testify/require" 11 | 12 | "github.com/open-edge-platform/edge-node-agents/hardware-discovery-agent/internal/utils" 13 | ) 14 | 15 | func TestReadFromCommandSuccess(t *testing.T) { 16 | output, err := utils.ReadFromCommand(exec.Command, "true") 17 | require.NoError(t, err) 18 | assert.Equal(t, "", string(output)) 19 | } 20 | 21 | func TestReadFromCommandSuccessWithOutput(t *testing.T) { 22 | expected := "This is expected output" 23 | output, err := utils.ReadFromCommand(exec.Command, "echo", "-n", expected) 24 | require.NoError(t, err) 25 | assert.Equal(t, expected, string(output)) 26 | } 27 | 28 | func TestReadFromCommandFailure(t *testing.T) { 29 | output, err := utils.ReadFromCommand(exec.Command, "false") 30 | require.Error(t, err) 31 | assert.NotEmpty(t, err.Error()) 32 | assert.Empty(t, string(output)) 33 | } 34 | -------------------------------------------------------------------------------- /node-agent/test/test_config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.2.0' 6 | 7 | logLevel: info 8 | GUID: 'aaaaaaaa-0000-1111-2222-bbbbbbbbcccc' 9 | onboarding: 10 | serviceURL: localhost:8080 11 | enabled: true 12 | heartbeatInterval: 10s 13 | status: 14 | endpoint: '/tmp/node-agent.sock' 15 | serviceClients: [ hd-agent, cluster-agent, platform-update-agent, platform-telemetry-agent ] 16 | outboundClients: [ platform-observability-collector, platform-observability-health-check, platform-observability-logging, platform-observability-metrics ] 17 | networkEndpoints: 18 | - name: caddy 19 | url: https://localhost:60444/edge-node.asc 20 | auth: 21 | accessTokenURL: keycloak.edgeorch.intel.com 22 | rsTokenURL: token-provider.edgeorch.intel.com 23 | accessTokenPath: /etc/intel_edge_node/tokens/node-agent 24 | clientCredsPath: /etc/intel_edge_node/client-credentials 25 | tokenClients: [ node-agent, hd-agent, cluster-agent, platform-update-agent, platform-observability-agent, platform-telemetry-agent, prometheus ] 26 | -------------------------------------------------------------------------------- /reporting-agent/scripts/lintJsons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # Check if PATHS_TO_EXCLUDE is provided as an argument 6 | if [ -z "$1" ]; then 7 | PATHS_TO_EXCLUDE="" 8 | else 9 | PATHS_TO_EXCLUDE="$1" 10 | fi 11 | 12 | # Find all JSON files in the current directory recursively and exclude the ones explicitly provided 13 | if [ -n "$PATHS_TO_EXCLUDE" ]; then 14 | JSONS_TO_SCAN=$(find . -name "*.json" | grep -vE "$PATHS_TO_EXCLUDE") 15 | else 16 | JSONS_TO_SCAN=$(find . -name "*.json") 17 | fi 18 | 19 | # Initialize a flag to track if any errors are found 20 | error_found=0 21 | 22 | jq --version 23 | 24 | # Check if each JSON file is valid and pretty printed 25 | for json_file in $JSONS_TO_SCAN; do 26 | if ! jq . "$json_file" | diff -q - "$json_file" > /dev/null; then 27 | echo "\"$json_file\" is not pretty printed. To pretty-print: jq . \"$json_file\" > tmp && mv tmp \"$json_file\"" 28 | error_found=1 29 | fi 30 | done 31 | 32 | # Return error code 1 if any errors were found 33 | if [ $error_found -eq 1 ]; then 34 | exit 1 35 | fi 36 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | CI 🤖: 5 | - changed-files: 6 | - any-glob-to-any-file: ".github/**" 7 | 8 | root: 9 | - changed-files: 10 | - any-glob-to-any-file: "*" 11 | 12 | cluster-agent: 13 | - changed-files: 14 | - any-glob-to-any-file: "cluster-agent/**" 15 | 16 | common: 17 | - changed-files: 18 | - any-glob-to-any-file: "common/**" 19 | 20 | hardware-discovery-agent: 21 | - changed-files: 22 | - any-glob-to-any-file: "hardware-discovery-agent/**" 23 | 24 | node-agent: 25 | - changed-files: 26 | - any-glob-to-any-file: "node-agent/**" 27 | 28 | platform-observability-agent: 29 | - changed-files: 30 | - any-glob-to-any-file: "platform-observability-agent/**" 31 | 32 | platform-telemetry-agent: 33 | - changed-files: 34 | - any-glob-to-any-file: "platform-telemetry-agent/**" 35 | 36 | platform-update-agent: 37 | - changed-files: 38 | - any-glob-to-any-file: "platform-update-agent/**" 39 | 40 | reporting-agent: 41 | - changed-files: 42 | - any-glob-to-any-file: "reporting-agent/**" 43 | -------------------------------------------------------------------------------- /hardware-discovery-agent/internal/memory/memory.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | package memory 6 | 7 | import ( 8 | "encoding/json" 9 | "fmt" 10 | 11 | "github.com/open-edge-platform/edge-node-agents/hardware-discovery-agent/internal/utils" 12 | ) 13 | 14 | type memory struct { 15 | Size int `json:"size"` 16 | State string `json:"state"` 17 | } 18 | 19 | type memories struct { 20 | Memory []memory `json:"memory"` 21 | } 22 | 23 | func GetMemory(executor utils.CmdExecutor) (uint64, error) { 24 | var dataStruct memories 25 | var total uint64 26 | 27 | dataBytes, err := utils.ReadFromCommand(executor, "lsmem", "-J", "-b") 28 | if err != nil { 29 | return 0, fmt.Errorf("failed to read data from command; error: %w", err) 30 | } 31 | 32 | err = json.Unmarshal(dataBytes, &dataStruct) 33 | if err != nil { 34 | return 0, fmt.Errorf("failed to unmarshal data; error: %w", err) 35 | } 36 | 37 | for _, mem := range dataStruct.Memory { 38 | if mem.State == "online" { 39 | total += uint64(mem.Size) 40 | } 41 | } 42 | 43 | return total, nil 44 | } 45 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/golang-jwt-v4-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Dave Grijalva 2 | Copyright (c) 2021 golang-jwt maintainers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /platform-update-agent/internal/logger/logger.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package logger provides a global singleton logger instance that is safe for concurrent use by multiple goroutines. 5 | // It offers a method to retrieve the logger instance and another to set a new logger instance in a thread-safe manner. 6 | package logger 7 | 8 | import ( 9 | "sync" 10 | 11 | "github.com/open-edge-platform/edge-node-agents/common/pkg/logger" 12 | "github.com/open-edge-platform/edge-node-agents/platform-update-agent/info" 13 | "github.com/sirupsen/logrus" 14 | ) 15 | 16 | var ( 17 | loggerInstance *logrus.Entry 18 | mu sync.Mutex 19 | ) 20 | 21 | // Logger provides a global singleton logger instance. 22 | func Logger() *logrus.Entry { 23 | mu.Lock() 24 | defer mu.Unlock() 25 | if loggerInstance == nil { 26 | loggerInstance = logger.New(info.Component, info.Version) 27 | } 28 | return loggerInstance 29 | } 30 | 31 | // SetLogger sets a new logger instance in a thread-safe manner. 32 | func SetLogger(newLogger *logrus.Entry) { 33 | mu.Lock() 34 | defer mu.Unlock() 35 | loggerInstance = newLogger 36 | } 37 | -------------------------------------------------------------------------------- /common/README.md: -------------------------------------------------------------------------------- 1 | 5 | # Common 6 | 7 | ## Overview 8 | 9 | This folder contains common code that is shared across all of the Edge Node Agents. It provides: 10 | 11 | - Agent Status API 12 | - Message Logger 13 | - Agent Metrics Provider 14 | - Unit Test and other Common Utilities 15 | 16 | ## Develop 17 | 18 | To develop the common code, the following prerequisites are required: 19 | 20 | - [Go programming language](https://go.dev) 21 | - [Golangci-lint](https://github.com/golangci/golangci-lint) 22 | 23 | The required Go version for the agents is outlined [here](https://github.com/open-edge-platform/edge-node-agents/blob/main/common/go.mod). 24 | 25 | ## Commands for Development 26 | 27 | - **Generate updated protobuf files**: 28 | 29 | ``` 30 | make buf-gen 31 | ``` 32 | 33 | - **Run unit tests**: 34 | 35 | ``` 36 | make test 37 | ``` 38 | 39 | - **Run linters**: 40 | 41 | ``` 42 | make lint 43 | ``` 44 | 45 | - **Get code coverage from unit tests**: 46 | 47 | ``` 48 | make cover 49 | ``` 50 | 51 | ## License 52 | 53 | Apache-2.0 54 | -------------------------------------------------------------------------------- /platform-telemetry-agent/tests/config_example.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.2.0' 6 | logLevel: info 7 | configpath: 8 | telegraf: /etc/telegraf/telegraf.conf 9 | fluentbit: /etc/fluent-bit/fluent-bit.conf 10 | 11 | configroot: ../../configs/ 12 | telegrafgoldhost: telegraf-host-gold.yaml 13 | telegrafgoldcluster: telegraf-cluster-gold.yaml 14 | fluentbitgoldhost: fluentbit-host-gold.yaml 15 | fluentbitgoldcluster: fluentbit-cluster-gold.yaml 16 | tmpdir: /tmp/ 17 | global: 18 | #nodeid is guid, example: ec289fa3-1c7a-95dd-b3d4-9344c2c47778 19 | nodeid: aaaaaaaa-0000-1111-2222-bbbbbbbbcccc 20 | updateinterval: 2 21 | developerMode: false 22 | statusEndpoint: 'unix:////tmp/status-server.sock' 23 | server: 24 | address: 0.0.0.0 25 | port: 5001 26 | token: "/etc/intel_edge_node/tokens/platform-telemetry-agent/access_token" 27 | misc: 28 | telegrafConfigMap: "get configmap telegraf-config -n observability -o jsonpath='{.data.telegraf\\.conf}'" 29 | fluentbitConfigMap: "get configmap fluent-bit-config -n observability -o jsonpath='{.data.fluent-bit\\.conf}'" -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | 5 | # Contributors 6 | 7 | ## Special thanks for all the people who had helped this project so far 8 | 9 | - [Andrea-Campanella](https://github.com/Andrea-Campanella) 10 | - [amr-mokhtar](https://github.com/amr-mokhtar) 11 | - [cjnolan](https://github.com/cjnolan) 12 | - [damiankopyto](https://github.com/damiankopyto) 13 | - [daniele-moro](https://github.com/daniele-moro) 14 | - [ikyrycho](https://github.com/ikyrycho) 15 | - [jkossak](https://github.com/jkossak) 16 | - [krishnajs](https://github.com/krishnajs) 17 | - [ktaube26](https://github.com/ktaube26) 18 | - [niket-intc](https://github.com/niket-intc) 19 | - [osinstom](https://github.com/osinstom) 20 | - [Paiadhithi](https://github.com/Paiadhithi) 21 | - [PalashGoelIntel](https://github.com/PalashGoelIntel) 22 | - [pierventre](https://github.com/pierventre) 23 | - [pudelkom](https://github.com/pudelkom) 24 | - [raphaelvrosa](https://github.com/raphaelvrosa) 25 | - [rranjan3](https://github.com/rranjan3) 26 | - [soniabha-intc](https://github.com/soniabha-intc) 27 | - [tmatenko](https://github.com/tmatenko) 28 | - [zdw](https://github.com/zdw) 29 | -------------------------------------------------------------------------------- /in-band-manageability/configs/firmware_tool_info.conf: -------------------------------------------------------------------------------- 1 | { 2 | "firmware_component": { 3 | "firmware_products": [ 4 | { 5 | "name": "Default string", 6 | "tool_options": true, 7 | "bios_vendor": "American Megatrends Inc.", 8 | "firmware_tool": "/opt/afulnx/afulnx_64", 9 | "firmware_file_type": "xx" 10 | }, 11 | { 12 | "name": "Alder Lake Client Platform", 13 | "guid": true, 14 | "bios_vendor": "Intel Corporation", 15 | "firmware_tool": "fwupdate", 16 | "firmware_tool_args": "--apply", 17 | "firmware_tool_check_args": "-s", 18 | "firmware_file_type": "xx" 19 | }, 20 | { 21 | "name": "Arrow Lake Client Platform", 22 | "guid": true, 23 | "bios_vendor": "Intel Corp.", 24 | "firmware_tool": "/usr/bin/UpdateFirmwareBlobFwupdtool.sh", 25 | "firmware_file_type": "xx" 26 | }, 27 | { 28 | "name": "Raptor Lake Client Platform", 29 | "guid": true, 30 | "bios_vendor": "Intel Corp.", 31 | "firmware_tool": "/usr/bin/UpdateFirmwareBlobFwupdtool.sh", 32 | "firmware_file_type": "xx" 33 | } 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbd/utils/power_control.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package utils provides utility functions. 7 | package utils 8 | 9 | import ( 10 | "fmt" 11 | "time" 12 | 13 | common "github.com/open-edge-platform/edge-node-agents/in-band-manageability/internal/common" 14 | ) 15 | 16 | // RebootSystem reboots the system using the provided command executor. 17 | func RebootSystem(cmdExecutor common.Executor) error { 18 | fmt.Println("Rebooting ") 19 | 20 | time.Sleep(2 * time.Second) 21 | 22 | _, _, err := cmdExecutor.Execute([]string{common.RebootCmd}) 23 | if err != nil { 24 | return fmt.Errorf("reboot failed: %s", err) 25 | } 26 | 27 | return nil 28 | } 29 | 30 | // ShutdownSystem shuts down the system using the provided command executor. 31 | func ShutdownSystem(cmdExecutor common.Executor) error { 32 | fmt.Print("Shutting down ") 33 | 34 | time.Sleep(2 * time.Second) 35 | 36 | _, _, err := cmdExecutor.Execute([]string{common.ShutdownCmd, "now"}) // Shutdown immediately 37 | if err != nil { 38 | return fmt.Errorf("shutdown failed: %s", err) 39 | } 40 | 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /node-agent/debian/templates: -------------------------------------------------------------------------------- 1 | Template: node-agent/onboarding.serviceURL 2 | Type: string 3 | Default: localhost:443 4 | Description: Onboarding service URL: 5 | 6 | Template: node-agent/onboarding.enabled 7 | Type: boolean 8 | Default: true 9 | Description: Onboarding service Heartbeat enabled: 10 | 11 | Template: node-agent/onboarding.heartbeatInterval 12 | Type: string 13 | Default: 10s 14 | Description: Onboarding service Heartbeat interval: 15 | 16 | Template: node-agent/auth.accessTokenURL 17 | Type: string 18 | Default: localhost:443 19 | Description: Orchestrator access token URL: 20 | 21 | Template: node-agent/auth.rsTokenURL 22 | Type: string 23 | Default: localhost:443 24 | Description: Release service token URL: 25 | 26 | Template: node-agent/proxy.aptSourceURL 27 | Type: string 28 | Default: localhost:443 29 | Description: Apt source URL: 30 | 31 | Template: node-agent/proxy.aptSourceProxyPort 32 | Type: string 33 | Default: 60444 34 | Description: Apt source proxy port: 35 | 36 | Template: node-agent/proxy.aptSourceFilesRSRoot 37 | Type: string 38 | Default: files-edge-orch 39 | Description: Apt source files root: 40 | 41 | Template: node-agent/auth.RSType 42 | Type: string 43 | Default: auth 44 | Description: Registry type: -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/stretchr-testify-LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /in-band-manageability/internal/os_updater/emt/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package emt provides the implementation for updating the EMT OS. 7 | package emt 8 | 9 | const ( 10 | // FAIL is a possible value for the update status. 11 | FAIL = "FAIL" 12 | // SUCCESS is a possible value for the update status. 13 | SUCCESS = "SUCCESS" 14 | ) 15 | 16 | // Failure reasons for granular log 17 | const ( 18 | FAILURE_REASON_UNSPECIFIED = "unspecified" 19 | FAILURE_REASON_DOWNLOAD = "download" 20 | FAILURE_REASON_INSUFFICIENT_STORAGE = "insufficientstorage" 21 | FAILURE_REASON_RS_AUTHENTICATION = "rsauthentication" 22 | FAILURE_REASON_SIGNATURE_CHECK = "signaturecheck" 23 | FAILURE_REASON_UT_WRITE = "utwrite" 24 | FAILURE_REASON_BOOT_CONFIGURATION = "utbootconfiguration" 25 | FAILURE_REASON_BOOTLOADER = "bootloader" 26 | FAILURE_REASON_CRITICAL_SERVICES = "criticalservices" 27 | FAILURE_REASON_INBM = "inbm" 28 | FAILURE_REASON_OS_COMMIT = "oscommit" 29 | FAILURE_REASON_UPDATE_TOOL = "updatetool" // For Ubuntu apt/package manager failures 30 | ) 31 | -------------------------------------------------------------------------------- /in-band-manageability/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/open-edge-platform/edge-node-agents/in-band-manageability 2 | 3 | go 1.24.1 4 | 5 | require ( 6 | buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1 7 | github.com/stretchr/testify v1.11.1 8 | github.com/xeipuuv/gojsonschema v1.2.0 9 | google.golang.org/grpc v1.76.0 10 | google.golang.org/protobuf v1.36.10 11 | ) 12 | 13 | require ( 14 | github.com/davecgh/go-spew v1.1.1 // indirect 15 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 16 | github.com/pmezard/go-difflib v1.0.0 // indirect 17 | github.com/spf13/pflag v1.0.10 // indirect 18 | github.com/stretchr/objx v0.5.3 // indirect 19 | github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect 20 | github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect 21 | gopkg.in/yaml.v3 v3.0.1 // indirect 22 | ) 23 | 24 | require ( 25 | github.com/golang-jwt/jwt/v4 v4.5.2 26 | github.com/spf13/afero v1.15.0 27 | github.com/spf13/cobra v1.10.1 28 | golang.org/x/net v0.46.0 // indirect 29 | golang.org/x/sys v0.37.0 30 | golang.org/x/text v0.30.0 // indirect 31 | google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff // indirect 32 | ) 33 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/source_os_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | import ( 10 | "testing" 11 | 12 | "github.com/stretchr/testify/assert" 13 | ) 14 | 15 | func TestSourceOSCmd(t *testing.T) { 16 | cmd := SourceOSCmd() 17 | 18 | assert.Equal(t, "os", cmd.Use, "command use should be 'os'") 19 | assert.Equal(t, "Modifies the source files for OS Updates", cmd.Short, "command short description should match") 20 | assert.Equal(t, "Source command is used to creates a new /etc/apt/sources.list file with only the sources provided.", cmd.Long, "command long description should match") 21 | 22 | subcommands := cmd.Commands() 23 | assert.Len(t, subcommands, 1, "there should be 1 subcommand") 24 | 25 | updateCmd := subcommands[0] 26 | assert.Equal(t, "update", updateCmd.Use, "subcommand should be 'update'") 27 | } 28 | 29 | func TestUpdateOSSourceSubCmd(t *testing.T) { 30 | cmd := UpdateOSSourceCmd() 31 | assert.NotNil(t, cmd, "UpdateOSSourceCmd should not be nil") 32 | assert.Equal(t, "update", cmd.Use, "command use should be 'update'") 33 | } 34 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/stretchr-objx-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2014 Stretchr, Inc. 4 | Copyright (c) 2017-2018 objx contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /.github/workflows/auto-close.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Stale Pull Requests 6 | 7 | # After 30 days of no activity on a PR, the PR should be marked as stale, 8 | # a comment made on the PR informing the author of the new status, 9 | # and closed after 15 days if there is no further activity from the change to stale state. 10 | on: 11 | schedule: 12 | - cron: '30 1 * * *' # run every day 13 | workflow_dispatch: {} 14 | 15 | permissions: {} 16 | 17 | jobs: 18 | stale-auto-close: 19 | permissions: 20 | contents: read 21 | pull-requests: write 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1 25 | with: 26 | repo-token: ${{ secrets.SYS_EMF_GH_TOKEN }} 27 | stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Make a comment or update the PR to avoid closing the PR after 15 days.' 28 | days-before-pr-stale: 30 29 | days-before-pr-close: 15 30 | remove-pr-stale-when-updated: 'true' 31 | close-pr-message: 'This pull request was automatically closed due to inactivity' 32 | -------------------------------------------------------------------------------- /.github/workflows/auto-update.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | 6 | name: Auto Update PR 7 | 8 | # On push to the main branch and support branches, update any branches that are out of date 9 | # and have auto-merge enabled. If the branch is currently out of date with the base branch, 10 | # it must be first manually updated and then will be kept up to date on future runs. 11 | on: 12 | push: 13 | branches: 14 | - main 15 | - release-* 16 | 17 | permissions: {} 18 | 19 | concurrency: 20 | group: ${{ github.workflow }}-${{ github.ref }} 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | update-pull-requests: 25 | permissions: 26 | contents: read 27 | pull-requests: write 28 | runs-on: ubuntu-latest 29 | 30 | steps: 31 | - name: Checkout repository 32 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 33 | with: 34 | persist-credentials: false 35 | 36 | - name: Update pull requests 37 | uses: open-edge-platform/orch-ci/.github/actions/pr_updater@20b640842e63420b06b3ff4247e608228e14c74a # 2026.0.1 38 | with: 39 | github_token: ${{ secrets.SYS_EMF_GH_TOKEN }} 40 | -------------------------------------------------------------------------------- /platform-update-agent/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | . /usr/share/debconf/confmodule 4 | 5 | db_get platform-update-agent/updateServiceURL 6 | if [ ! -z "$RET" ]; then 7 | sed -i "s/^updateServiceURL: '.*'/updateServiceURL: '$RET'/" /etc/edge-node/node/confs/platform-update-agent.yaml 8 | fi 9 | 10 | db_get platform-update-agent/enaDebURL 11 | if [ ! -z "$RET" ]; then 12 | sed -i "s/^Acquire::https::.* {/Acquire::https::$RET {/" /etc/apt/apt.conf.d/75platform-update-agent 13 | fi 14 | 15 | sed -i "s/^GUID: '.*'/GUID: '$(cat /sys/class/dmi/id/product_uuid)'/" /etc/edge-node/node/confs/platform-update-agent.yaml 16 | 17 | groupadd -f bm-agents --system 18 | 19 | id -u platform-update-agent >/dev/null 2>&1 || useradd --system --shell /sbin/nologin -g bm-agents platform-update-agent 20 | 21 | apparmor_parser -rK /etc/apparmor.d/opt.edge-node.bin.platform-update-agent 22 | 23 | chmod 740 /var/edge-node/pua 24 | chown platform-update-agent:bm-agents /var/edge-node/pua 25 | 26 | touch /etc/default/grub.d/90-platform-update-agent.cfg 27 | chown platform-update-agent:bm-agents /etc/default/grub.d/90-platform-update-agent.cfg 28 | 29 | touch /etc/apt/sources.list.d/pua.list 30 | chown platform-update-agent:bm-agents /etc/apt/sources.list.d/pua.list 31 | #DEBHELPER# 32 | -------------------------------------------------------------------------------- /in-band-manageability/internal/inbc/commands/dialer.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package commands are the commands that are used by the INBC tool. 7 | package commands 8 | 9 | import ( 10 | "context" 11 | "fmt" 12 | "net" 13 | 14 | pb "github.com/open-edge-platform/edge-node-agents/in-band-manageability/pkg/api/inbd/v1" 15 | "google.golang.org/grpc" 16 | "google.golang.org/grpc/credentials/insecure" 17 | ) 18 | 19 | // Dialer is a type for dialing a gRPC client 20 | type Dialer func(ctx context.Context, addr string) (pb.InbServiceClient, *grpc.ClientConn, error) 21 | 22 | // Dial returns a new gRPC client 23 | func Dial(ctx context.Context, addr string) (pb.InbServiceClient, grpc.ClientConnInterface, error) { 24 | dialer := func(ctx context.Context, addr string) (net.Conn, error) { 25 | // cut off the unix:// part 26 | addr = addr[7:] 27 | return net.Dial("unix", addr) 28 | } 29 | 30 | conn, err := grpc.NewClient("unix://"+addr, 31 | grpc.WithTransportCredentials(insecure.NewCredentials()), 32 | grpc.WithContextDialer(dialer)) 33 | if err != nil { 34 | return nil, nil, fmt.Errorf("%w", err) 35 | } 36 | 37 | return pb.NewInbServiceClient(conn), conn, nil 38 | } 39 | -------------------------------------------------------------------------------- /ena-manifest.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | --- 4 | metadata: 5 | schemaVersion: 2.0.0 6 | release: 1.5.0-dev 7 | repository: 8 | codename: 3.1 9 | component: main 10 | packages: 11 | - name: cluster-agent 12 | version: 1.8.4 13 | ociArtifact: edge-orch/en/deb/cluster-agent 14 | - name: hardware-discovery-agent 15 | version: 1.8.1 16 | ociArtifact: edge-orch/en/deb/hardware-discovery-agent 17 | - name: node-agent 18 | version: 1.9.1 19 | ociArtifact: edge-orch/en/deb/node-agent 20 | - name: platform-manageability-agent 21 | version: 0.3.1 22 | ociArtifact: edge-orch/en/deb/platform-manageability-agent 23 | - name: platform-observability-agent 24 | version: 1.10.2 25 | ociArtifact: edge-orch/en/deb/platform-observability-agent 26 | - name: platform-telemetry-agent 27 | version: 1.6.2 28 | ociArtifact: edge-orch/en/deb/platform-telemetry-agent 29 | - name: platform-update-agent 30 | version: 1.8.4 31 | ociArtifact: edge-orch/en/deb/platform-update-agent 32 | - name: caddy 33 | version: 2.7.6 34 | ociArtifact: edge-orch/en/deb/caddy 35 | - name: in-band-manageability 36 | version: 1.0.8 37 | ociArtifact: edge-orch/en/deb/in-band-manageability 38 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details_noecores.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 1 3500.0000 4 | 2 0 3500.0000 5 | 3 1 3500.0000 6 | 4 0 3500.0000 7 | 5 1 3500.0000 8 | 6 0 3500.0000 9 | 7 1 3500.0000 10 | 8 0 3500.0000 11 | 9 1 3500.0000 12 | 10 0 3500.0000 13 | 11 1 3500.0000 14 | 12 0 3500.0000 15 | 13 1 3500.0000 16 | 14 0 3500.0000 17 | 15 1 3500.0000 18 | 16 0 3500.0000 19 | 17 1 3500.0000 20 | 18 0 3500.0000 21 | 19 1 3500.0000 22 | 20 0 3500.0000 23 | 21 1 3500.0000 24 | 22 0 3500.0000 25 | 23 1 3500.0000 26 | 24 0 3500.0000 27 | 25 1 3500.0000 28 | 26 0 3500.0000 29 | 27 1 3500.0000 30 | 28 0 3500.0000 31 | 29 1 3500.0000 32 | 30 0 3500.0000 33 | 31 1 3500.0000 34 | 32 0 3500.0000 35 | 33 1 3500.0000 36 | 34 0 3500.0000 37 | 35 1 3500.0000 38 | 36 0 3500.0000 39 | 37 1 3500.0000 40 | 38 0 3500.0000 41 | 39 1 3500.0000 42 | 40 0 3500.0000 43 | 41 1 3500.0000 44 | 42 0 3500.0000 45 | 43 1 3500.0000 46 | 44 0 3500.0000 47 | 45 1 3500.0000 48 | 46 0 3500.0000 49 | 47 1 3500.0000 50 | -------------------------------------------------------------------------------- /platform-telemetry-agent/configs/platform-telemetry-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: 'v0.2.0' 6 | logLevel: info 7 | configpath: 8 | telegraf: /etc/telegraf/telegraf.d/poa-telegraf.conf 9 | fluentbit: /etc/fluent-bit/fluent-bit.conf 10 | 11 | configroot: /etc/edge-node/node/confs/ 12 | telegrafgoldhost: telegraf-host-gold.yaml 13 | telegrafgoldcluster: telegraf-cluster-gold.yaml 14 | fluentbitgoldhost: fluentbit-host-gold.yaml 15 | fluentbitgoldcluster: fluentbit-cluster-gold.yaml 16 | tmpdir: /tmp/ 17 | global: 18 | #nodeid is guid, example: ec289fa3-1c7a-95dd-b3d4-9344c2c47778 19 | nodeid: aaaaaaaa-0000-1111-2222-bbbbbbbbcccc 20 | updateinterval: 60 21 | developerMode: false 22 | statusEndpoint: 'unix:///run/node-agent/node-agent.sock' 23 | server: 24 | address: localhost 25 | port: 443 26 | token: "/etc/intel_edge_node/tokens/platform-telemetry-agent/access_token" 27 | misc: 28 | telegrafConfigMap: "get configmap telegraf-config -n observability -o jsonpath='{.data.telegraf\\.conf}'" 29 | fluentbitConfigMap: "get configmap fluent-bit-config -n observability -o jsonpath='{.data.fluent-bit\\.conf}'" 30 | fileOwner: "platform-observability-agent" 31 | -------------------------------------------------------------------------------- /platform-telemetry-agent/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . /usr/share/debconf/confmodule 6 | 7 | db_get telemetry-agent/telemetrymanager.serviceURL 8 | 9 | if [ ! -z "$RET" ]; then 10 | extracted_host=$(echo "$RET" | cut -d: -f1) 11 | echo "$extracted_host" 12 | sed -i "s/address: localhost/address: $extracted_host/" /etc/edge-node/node/confs/platform-telemetry-agent.yaml 13 | extracted_port=$(echo "$RET" | cut -d: -f2) 14 | sed -i "s/port: 5000/port: $extracted_port/" /etc/edge-node/node/confs/platform-telemetry-agent.yaml 15 | fi 16 | 17 | GUID="$(cat /sys/class/dmi/id/product_uuid)" 18 | sed -i "s/nodeid: aaaaaaaa-0000-1111-2222-bbbbbbbbcccc/nodeid: $GUID/" /etc/edge-node/node/confs/platform-telemetry-agent.yaml 19 | 20 | groupadd -f bm-agents --system 21 | id -u platform-telemetry-agent >/dev/null 2>&1 || useradd --system --shell /sbin/nologin -g bm-agents platform-telemetry-agent 22 | 23 | # Clean up any old KUBECONFIG entries from previous versions 24 | sed -i '/^KUBECONFIG=/d' /etc/environment 25 | 26 | # Clean up any old kubectl PATH entries from previous versions 27 | sed -i 's|:/var/lib/rancher/rke2/bin||g' /etc/environment 28 | sed -i 's|/var/lib/rancher/rke2/bin:||g' /etc/environment 29 | 30 | apparmor_parser -rK /etc/apparmor.d/opt.edge-node.bin.platform-telemetry-agent 31 | 32 | #DEBHELPER# 33 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | version: 2 6 | updates: 7 | - package-ecosystem: "gomod" 8 | directories: 9 | - "/cluster-agent" 10 | - "/common" 11 | - "/hardware-discovery-agent" 12 | - "/node-agent" 13 | - "/platform-telemetry-agent" 14 | - "/platform-update-agent" 15 | schedule: 16 | interval: daily 17 | open-pull-requests-limit: 3 18 | commit-message: 19 | prefix: "[gomod] " 20 | groups: 21 | dependencies: 22 | patterns: 23 | - "*" 24 | exclude-patterns: 25 | - "*open-edge-platform*" 26 | internal-dependencies: 27 | patterns: 28 | - "*open-edge-platform*" 29 | - package-ecosystem: "gomod" 30 | directories: 31 | - "/reporting-agent" 32 | schedule: 33 | interval: daily 34 | open-pull-requests-limit: 10 35 | commit-message: 36 | prefix: "[gomod][reporting-agent] " 37 | - package-ecosystem: "github-actions" 38 | directories: 39 | - "/" # this enables searching only in /.github/workflows directory 40 | schedule: 41 | interval: daily 42 | open-pull-requests-limit: 10 43 | commit-message: 44 | prefix: "[gha] " 45 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | version = 1 5 | 6 | [[annotations]] 7 | path = [ 8 | "**/VERSION", 9 | "**/config/apparmor.d/**", 10 | "**/config/sudoers.d/**", 11 | "**/configs/apparmor.d/**", 12 | "**/configs/sudoers.d/**", 13 | "**/configs/**.caddy", 14 | "**/configs/**.conf", 15 | "**/configs/fluentbit-cluster-gold.yaml", 16 | "**/configs/fluentbit-host-gold.yaml", 17 | "**/configs/otelcol.yaml", 18 | "**/configs/telegraf-cluster-gold.yaml", 19 | "**/configs/telegraf-host-gold.yaml", 20 | "**/configs/apt/**", 21 | "**/configs/apt.conf.d/**", 22 | "**/debian/**", 23 | "**/go.mod", 24 | "**/go.sum", 25 | "**/testdata/**", 26 | "**/mocks/**", 27 | "**/pkg/api/buf.lock", 28 | "**/pkg/api/status/proto/agent_status_grpc.pb.go", 29 | "**/release/data/sources_for_maintenance_manager.json", 30 | "**/test/**", 31 | "**/.github/workflows/**", 32 | "**/.tool-versions", 33 | "**/copyright", 34 | "ci/**", 35 | "ci/scripts/**", 36 | "in-band-manageability/buf.lock", 37 | "in-band-manageability/configs/**", 38 | "in-band-manageability/retain-3rd-party-notices/**" 39 | ] 40 | precedence = "aggregate" 41 | SPDX-FileCopyrightText = "2025 Intel Corporation" 42 | SPDX-License-Identifier = "Apache-2.0" 43 | -------------------------------------------------------------------------------- /node-agent/configs/node-agent.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | --- 5 | version: v0.10.0 6 | logLevel: info 7 | GUID: 'aaaaaaaa-0000-1111-2222-bbbbbbbbcccc' 8 | onboarding: 9 | enabled: true 10 | serviceURL: infra.test.edgeorch.intel.com:443 11 | heartbeatInterval: 10s 12 | status: 13 | endpoint: '/run/node-agent/node-agent.sock' 14 | serviceClients: [ hardware-discovery-agent, cluster-agent, platform-manageability-agent, platform-update-agent, platform-telemetry-agent ] 15 | outboundClients: [ platform-observability-collector, platform-observability-health-check, platform-observability-logging, platform-observability-metrics ] 16 | networkEndpoints: 17 | - name: client-proxy 18 | url: http://localhost:60444/files-edge-orch/edge-node.asc 19 | metricsEndpoint: 'unix:///run/platform-observability-agent/platform-observability-agent.sock' 20 | metricsInterval: 10s 21 | auth: 22 | accessTokenURL: keycloak.edgeorch.intel.com 23 | rsTokenURL: token-provider.edgeorch.intel.com 24 | accessTokenPath: /etc/intel_edge_node/tokens 25 | clientCredsPath: /etc/intel_edge_node/client-credentials 26 | tokenClients: [ node-agent, hd-agent, cluster-agent, platform-update-agent, platform-observability-agent, platform-telemetry-agent, prometheus, connect-agent, attestation-manager, platform-manageability-agent ] 27 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | ### Description 15 | 16 | Please include a summary of the changes and the related issue. List any dependencies that are required for this change. 17 | 18 | Fixes # (issue) 19 | 20 | ### Any Newly Introduced Dependencies 21 | 22 | Please describe any newly introduced 3rd party dependencies in this change. List their name, license information and how they are used in the project. 23 | 24 | ### How Has This Been Tested? 25 | 26 | Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration 27 | 28 | ### Checklist: 29 | 30 | - [ ] I agree to use the APACHE-2.0 license for my code changes 31 | - [ ] I have not introduced any 3rd party dependency changes 32 | - [ ] I have performed a self-review of my code 33 | -------------------------------------------------------------------------------- /node-agent/configs/apparmor.d/usr.bin.caddy: -------------------------------------------------------------------------------- 1 | # Last Modified: Tue Mar 19 17:01:52 2024 2 | abi , 3 | 4 | include 5 | 6 | /usr/bin/caddy { 7 | include 8 | include 9 | include 10 | 11 | capability net_admin, 12 | capability net_bind_service, 13 | 14 | network inet dgram, 15 | network inet stream, 16 | network inet6 stream, 17 | /etc/caddy/ r, 18 | /etc/caddy/Caddyfile r, 19 | /etc/caddy/pua.caddy r, 20 | /etc/hosts r, 21 | /etc/machine-id r, 22 | /etc/nsswitch.conf r, 23 | /etc/passwd r, 24 | /proc/sys/net/core/somaxconn r, 25 | /run/systemd/notify rw, 26 | /run/systemd/resolve/stub-resolv.conf r, 27 | /sys/kernel/mm/transparent_hugepage/hpage_pmd_size r, 28 | /usr/bin/caddy mr, 29 | owner /proc/*/cpuset r, 30 | owner /var/lib/caddy/.config/ w, 31 | owner /var/lib/caddy/.config/caddy/ w, 32 | owner /var/lib/caddy/.config/caddy/autosave.json w, 33 | owner /var/lib/caddy/.local/ w, 34 | owner /var/lib/caddy/.local/share/ w, 35 | owner /var/lib/caddy/.local/share/caddy/ w, 36 | owner /var/lib/caddy/.local/share/caddy/instance.uuid rw, 37 | owner /var/lib/caddy/.local/share/caddy/last_clean.json rw, 38 | owner /var/lib/caddy/.local/share/caddy/locks/ w, 39 | owner /var/lib/caddy/.local/share/caddy/locks/storage_clean.lock rw, 40 | 41 | } -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_ipmitool.txt: -------------------------------------------------------------------------------- 1 | Set in Progress : Set Complete 2 | th Type Support : MD5 3 | Auth Type Enable : Callback : MD5 4 | : User : MD5 5 | : Operator : MD5 6 | : Admin : MD5 7 | : OEM : 8 | IP Address Source : DHCP Address 9 | IP Address : 192.168.1.50 10 | Subnet Mask : 255.255.255.0 11 | MAC Address : a1:b2:c3:d4:e5:f6 12 | SNMP Community String : public 13 | IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10 14 | BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled 15 | Gratituous ARP Intrvl : 2.0 seconds 16 | Default Gateway IP : 192.168.1.1 17 | Default Gateway MAC : 00:00:00:00:00:00 18 | Backup Gateway IP : 0.0.0.0 19 | Backup Gateway MAC : 00:00:00:00:00:00 20 | 802.1q VLAN ID : Disabled 21 | 802.1q VLAN Priority : 0 22 | RMCP+ Cipher Suites : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14 23 | Cipher Suite Priv Max : Xaaaaaaaaaaaaaa 24 | : X=Cipher Suite Unused 25 | : c=CALLBACK 26 | : u=USER 27 | : o=OPERATOR 28 | : a=ADMIN 29 | : O=OEM 30 | Bad Password Threshold : Not Available -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/golang-net-PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. -------------------------------------------------------------------------------- /platform-observability-agent/scripts/core_metrics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SPDX-FileCopyrightText: 2025 Intel Corporation 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | SOCKETS=$(test -h /usr/bin/lscpu || test -h /usr/bin/grep || test -h /usr/bin/cut || /usr/bin/lscpu | /usr/bin/grep -i 'Socket(s)' | /usr/bin/cut -d':' -f2) 6 | if [ "${SOCKETS}" = "" ]; then 7 | SOCKETS=0 8 | fi 9 | CORES=$(test -h /usr/bin/lscpu || test -h /usr/bin/grep || test -h /usr/bin/cut || /usr/bin/lscpu | /usr/bin/grep -i 'core(s)' | /usr/bin/cut -d':' -f2) 10 | if [ "${CORES}" = "" ]; then 11 | CORES=0 12 | fi 13 | 14 | TOTAL_CORES=$((CORES*SOCKETS)) 15 | 16 | THREADS=$(test -h /usr/bin/lscpu || test -h /usr/bin/grep || test -h /usr/bin/cut || /usr/bin/lscpu | /usr/bin/grep -i 'CPU(s)' | /usr/bin/cut -d':' -f2) 17 | # shellcheck disable=SC2086 18 | TOTAL_THREADS=$(test -h /usr/bin/echo || test -h /usr/bin/cut || /usr/bin/echo $THREADS | /usr/bin/cut -d ' ' -f1) 19 | if [ "${TOTAL_THREADS}" = "" ]; then 20 | TOTAL_THREADS=0 21 | fi 22 | 23 | HT_STATUS=$(test -h /usr/bin/cat || test -h /sys/devices/system/cpu/smt/active || /usr/bin/cat /sys/devices/system/cpu/smt/active) 24 | if [ "${HT_STATUS}" = "" ]; then 25 | HT_STATUS=0 26 | fi 27 | 28 | METRICS="{\"cores\": \"$TOTAL_CORES\", \"threads\": \"$TOTAL_THREADS\", \"hyper_threading_status\": \"$HT_STATUS\"}" 29 | 30 | test -h /usr/bin/echo || test -h /usr/bin/jq || /usr/bin/echo "$METRICS" | /usr/bin/jq 31 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/golang-text-PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/golang-sys-PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /common/pkg/api/status/proto/agent_status.proto: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | syntax = "proto3"; 5 | 6 | // buf:lint:ignore PACKAGE_DIRECTORY_MATCH 7 | package agent_status_proto.v1; 8 | 9 | import "buf/validate/validate.proto"; 10 | import "google/protobuf/struct.proto"; 11 | 12 | option go_package = ".;agent_status"; 13 | 14 | message ReportStatusRequest { 15 | string agent_name = 1 [(buf.validate.field).string = { 16 | pattern: "^[a-z]+(-[a-z]+)*$" 17 | max_len: 40 18 | }]; // Agent name to optionally call out on UI 19 | Status status = 2; // Binary ready/non-ready 20 | google.protobuf.Struct detail = 3; // For future use if the status is complex 21 | } 22 | 23 | message GetStatusIntervalRequest { 24 | string agent_name = 1 [(buf.validate.field).string = { 25 | pattern: "^[a-z]+(-[a-z]+)*$" 26 | max_len: 40 27 | }]; // Agent name for future use for registration 28 | } 29 | 30 | message GetStatusIntervalResponse { 31 | int32 interval_seconds = 1; // Interval in seconds 32 | } 33 | 34 | enum Status { 35 | STATUS_UNSPECIFIED = 0; 36 | STATUS_READY = 1; 37 | STATUS_NOT_READY = 2; 38 | } 39 | 40 | message ReportStatusResponse {} 41 | 42 | service StatusService { 43 | rpc ReportStatus(ReportStatusRequest) returns (ReportStatusResponse); 44 | rpc GetStatusInterval(GetStatusIntervalRequest) returns (GetStatusIntervalResponse); 45 | } 46 | -------------------------------------------------------------------------------- /in-band-manageability/retain-3rd-party-notices/golang-go-programming-PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /platform-update-agent/internal/utils/os_detection.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils 5 | 6 | import ( 7 | "bufio" 8 | "fmt" 9 | "strings" 10 | ) 11 | 12 | func DetectOS(reader FileReader, forcedOS string) (string, error) { 13 | if forcedOS != "" { 14 | switch forcedOS { 15 | case "ubuntu": 16 | return "ubuntu", nil 17 | case "emt": 18 | return "emt", nil 19 | case "debian": 20 | return "debian", nil 21 | default: 22 | return "", fmt.Errorf("unsupported forced OS: %s", forcedOS) 23 | } 24 | } 25 | 26 | content, err := reader.ReadFile("/etc/os-release") 27 | if err != nil { 28 | return "", fmt.Errorf("failed to open /etc/os-release: %v", err) 29 | } 30 | 31 | scanner := bufio.NewScanner(strings.NewReader(string(content))) 32 | var osId string 33 | for scanner.Scan() { 34 | line := scanner.Text() 35 | if strings.HasPrefix(line, "ID=") { 36 | osId = strings.Trim(strings.TrimPrefix(line, "ID="), `"'`) 37 | break 38 | } 39 | } 40 | 41 | if err := scanner.Err(); err != nil { 42 | return "", fmt.Errorf("failed to read /etc/os-release: %v", err) 43 | } 44 | 45 | switch osId { 46 | case "ubuntu": 47 | return "ubuntu", nil 48 | case "Edge Microvisor Toolkit": 49 | return "emt", nil 50 | case "debian": 51 | return "debian", nil 52 | default: 53 | return "", fmt.Errorf("unsupported OS: %s", osId) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /in-band-manageability/internal/common/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Package common provides utilities used by multiple packages 7 | package common 8 | 9 | // RebootCmd is the command used to reboot the system. 10 | // This is used by the EMT and Ubuntu OS updaters. 11 | const RebootCmd = "/usr/sbin/reboot" 12 | 13 | // ShutdownCmd is the command used to shutdown the system. 14 | const ShutdownCmd = "/usr/sbin/shutdown" 15 | 16 | // TruncateCmd is the command used to truncate the state file. 17 | const TruncateCmd = "truncate" 18 | 19 | // OsUpdateToolPathCmd is the command to execute the OS update tool script. 20 | // OsUpdateTool will be changed in 3.1 release. Have to change the name and API call. 21 | // Check https://github.com/intel-sandbox/os.linux.tiberos.ab-update.go/blob/main/README.md 22 | const OsUpdateToolCmd = "/usr/bin/os-update-tool.sh" 23 | 24 | // GPGCmd is the command to execute the GPG tool for signature verification. 25 | const GPGCmd = "/usr/bin/gpg" 26 | 27 | // IPCmd is the command to execute the ip tool. 28 | const IPCmd = "ip" 29 | 30 | // SnapperCmd is the command to execute the snapper tool. 31 | const SnapperCmd = "snapper" 32 | 33 | // AptGetCmd is the command to execute the apt-get tool. 34 | const AptGetCmd = "/usr/bin/apt-get" 35 | 36 | // DpkgCmd is the command to execute the dpkg tool. 37 | const DpkgCmd = "/usr/bin/dpkg" 38 | -------------------------------------------------------------------------------- /reporting-agent/internal/network/network.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package network 5 | 6 | import ( 7 | "encoding/json" 8 | "errors" 9 | "fmt" 10 | 11 | "github.com/open-edge-platform/edge-node-agents/common/pkg/utils" 12 | ) 13 | 14 | // Devices represents a network device with its serial number. 15 | type Devices struct { 16 | Serial string `json:"serial"` 17 | } 18 | 19 | // GetNetworkSerials retrieves the serial numbers of network devices using the `lshw` command. 20 | func GetNetworkSerials(executor utils.CmdExecutor) ([]string, error) { 21 | lshwOutput, err := utils.ReadFromCommand(executor, "sudo", "lshw", "-json", "-class", "network") 22 | if err != nil { 23 | return nil, fmt.Errorf("failed to read network devices: %w", err) 24 | } 25 | serials := make([]Devices, 0) 26 | // Double check on the expected system if the output format is always an array 27 | // and not a dict or a single object. 28 | if err = json.Unmarshal(lshwOutput, &serials); err != nil { 29 | return nil, fmt.Errorf("unable to unmarshal network serials: %w", err) 30 | } 31 | 32 | serialStrings := make([]string, 0, len(serials)) 33 | for _, d := range serials { 34 | if d.Serial != "" { 35 | serialStrings = append(serialStrings, d.Serial) 36 | } 37 | } 38 | if len(serialStrings) == 0 { 39 | return nil, errors.New("no network serials found") 40 | } 41 | 42 | return serialStrings, nil 43 | } 44 | -------------------------------------------------------------------------------- /common/pkg/utils/validate_test.go: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2025 Intel Corporation 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils_test 5 | 6 | import ( 7 | "testing" 8 | 9 | "github.com/stretchr/testify/assert" 10 | 11 | "github.com/open-edge-platform/edge-node-agents/common/pkg/utils" 12 | ) 13 | 14 | func TestNoNullByteString(t *testing.T) { 15 | assert.True(t, utils.NoNullByteString("/etc/test/go")) 16 | assert.False(t, utils.NoNullByteString("/etc/test\000/go")) 17 | assert.False(t, utils.NoNullByteString("\000")) 18 | assert.False(t, utils.NoNullByteString("/etc/test\x00/go")) 19 | assert.False(t, utils.NoNullByteString("\x00")) 20 | assert.False(t, utils.NoNullByteString("/etc/test\u0000/go")) 21 | assert.False(t, utils.NoNullByteString("\u0000")) 22 | assert.True(t, utils.NoNullByteString("http://asdf.com.%00.com")) 23 | } 24 | 25 | func TestNoNullByteURL(t *testing.T) { 26 | assert.True(t, utils.NoNullByteURL("http://asdf.com")) 27 | assert.False(t, utils.NoNullByteURL("asdf.%00.com")) 28 | assert.False(t, utils.NoNullByteURL("asdf\x00com")) 29 | assert.False(t, utils.NoNullByteURL("asdf\000com")) 30 | assert.True(t, utils.NoNullByteURL("https://here%40.com%26")) 31 | assert.False(t, utils.NoNullByteURL("https://here%00.com%26")) 32 | assert.True(t, utils.NoNullByteURL("here.com/%26name=xyz")) 33 | assert.False(t, utils.NoNullByteURL("here.com/%2/name=xyz")) 34 | assert.False(t, utils.NoNullByteURL("here.com/%00name=xyz")) 35 | } 36 | -------------------------------------------------------------------------------- /hardware-discovery-agent/test/data/mock_cpu_details.txt: -------------------------------------------------------------------------------- 1 | CPU SOCKET MAXMHZ 2 | 0 0 3500.0000 3 | 1 1 3500.0000 4 | 2 0 3500.0000 5 | 3 1 3500.0000 6 | 4 0 3500.0000 7 | 5 1 3500.0000 8 | 6 0 3500.0000 9 | 7 1 3500.0000 10 | 8 0 3500.0000 11 | 9 1 3500.0000 12 | 10 0 3500.0000 13 | 11 1 3500.0000 14 | 12 0 3500.0000 15 | 13 1 3500.0000 16 | 14 0 3500.0000 17 | 15 1 3500.0000 18 | 16 0 3500.0000 19 | 17 1 3500.0000 20 | 18 0 3500.0000 21 | 19 1 3500.0000 22 | 20 0 3500.0000 23 | 21 1 3500.0000 24 | 22 0 3500.0000 25 | 23 1 3500.0000 26 | 24 0 3500.0000 27 | 25 1 3500.0000 28 | 26 0 3500.0000 29 | 27 1 3500.0000 30 | 28 0 3500.0000 31 | 29 1 3500.0000 32 | 30 0 3500.0000 33 | 31 1 3500.0000 34 | 32 0 3500.0000 35 | 33 1 3500.0000 36 | 34 0 3500.0000 37 | 35 1 3500.0000 38 | 36 0 3500.0000 39 | 37 1 3500.0000 40 | 38 0 3500.0000 41 | 39 1 3500.0000 42 | 40 0 3500.0000 43 | 41 1 3500.0000 44 | 42 0 3500.0000 45 | 43 1 3500.0000 46 | 44 0 3500.0000 47 | 45 1 3500.0000 48 | 46 0 3500.0000 49 | 47 1 3500.0000 50 | 48 0 2600.0000 51 | 49 1 2600.0000 52 | 50 0 2600.0000 53 | 51 1 2600.0000 54 | 52 0 2600.0000 55 | 53 1 2600.0000 56 | 54 0 2600.0000 57 | 55 1 2600.0000 58 | -------------------------------------------------------------------------------- /in-band-manageability/cmd/inbc/main.go: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: (C) 2025 Intel Corporation 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | package main 6 | 7 | import ( 8 | "fmt" 9 | "os" 10 | 11 | "github.com/spf13/cobra" 12 | 13 | "github.com/open-edge-platform/edge-node-agents/in-band-manageability/internal/inbc/commands" 14 | ) 15 | 16 | // Version is set with linker flags at build time. 17 | var Version string 18 | 19 | func main() { 20 | // Root command and persistent flags 21 | rootCmd := &cobra.Command{ 22 | Use: "inbc", 23 | Short: "INBC - CLI for Intel Manageability", 24 | Version: Version, 25 | Long: `INBC is a CLI to access and perform manageability commands.`, 26 | } 27 | verbose := rootCmd.PersistentFlags().BoolP("verbose", "v", false, "Enable verbose logging") 28 | 29 | // Add subcommands 30 | rootCmd.AddCommand(commands.SOTACmd(), commands.SourceCmd(), commands.FOTACmd()) 31 | 32 | rootCmd.AddCommand(commands.ConfigLoadCmd()) 33 | rootCmd.AddCommand(commands.ConfigGetCmd()) 34 | rootCmd.AddCommand(commands.ConfigSetCmd()) 35 | rootCmd.AddCommand(commands.ConfigAppendCmd()) 36 | rootCmd.AddCommand(commands.ConfigRemoveCmd()) 37 | rootCmd.AddCommand(commands.RestartCmd()) 38 | rootCmd.AddCommand(commands.ShutdownCmd()) 39 | 40 | rootCmd.AddCommand(commands.QueryCmd()) 41 | 42 | // Execute CLI 43 | if err := rootCmd.Execute(); err != nil { 44 | if *verbose { 45 | fmt.Println(err) 46 | } 47 | os.Exit(1) 48 | } 49 | } 50 | --------------------------------------------------------------------------------