From 2de81d9c24cede946fb9aca7886d29b8addc90df Mon Sep 17 00:00:00 2001 From: punam biswal Date: Wed, 1 Oct 2025 12:52:53 +0530 Subject: [PATCH 1/5] Install PMA only for VPRO capable system Signed-off-by: punam biswal --- onboarding-manager/pkg/cloudinit/99_infra.cfg | 17 +- .../pkg/platformbundle/ubuntu-22.04/Installer | 187 ++++++++++-------- 2 files changed, 121 insertions(+), 83 deletions(-) diff --git a/onboarding-manager/pkg/cloudinit/99_infra.cfg b/onboarding-manager/pkg/cloudinit/99_infra.cfg index 6aee6ccd4..23208b28d 100644 --- a/onboarding-manager/pkg/cloudinit/99_infra.cfg +++ b/onboarding-manager/pkg/cloudinit/99_infra.cfg @@ -105,6 +105,17 @@ write_files: - path: /etc/intel_edge_node/orch-ca-cert/orch-ca.crt # CA cert path used by Prometheus content: | {{- .CA_CERT | nindent 6 }} + - path: /opt/edge-node/node/platform_manageability_agent.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -i "AMT Pro Corporate"; then + echo "vPro detected, installing platform-manageability-agent.service" + VPRO_ENABLE=true + else + echo "vPro not detected, skipping platform-manageability-agent.service" + VPRO_ENABLE=false + fi - path: /etc/edge-node/node/agent_variables content: | CLUSTER_ORCH_URL={{ .ORCH_CLUSTER }} @@ -224,10 +235,14 @@ runcmd: export http_proxy https_proxy ftp_proxy socks_server no_proxy {{- if not .RUN_AS_STANDALONE }} {{- if .IS_MICROVISOR }} + bash /opt/edge-node/node/platform_manageability_agent.sh chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + if [ "$VPRO_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer index cefe33468..8aa3fb336 100644 --- a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer +++ b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer @@ -65,6 +65,91 @@ print_error_on_console() { trap 'print_error_on_console ${LINENO}' ERR +install_lms_rpc(){ + if grep -q "install_lms_rpc done" "$SCRIPT_DIR"/$STATUS_FILENAME; then + echo "Skipping install_lms_rpc" + else + # Download, build and install LMS + LMS_VERSION="2506.0.0.0" + expected_checksum="bfdcbfb6b2a739321998a0772767c1532ede70f4bd38cdbe48488b59d118a086" + + curl -fsSL --connect-timeout 30 --max-time 300 \ + "https://github.com/intel/lms/archive/refs/tags/v${LMS_VERSION}.tar.gz" \ + -o "v${LMS_VERSION}.tar.gz" + + if [ -f "v${LMS_VERSION}.tar.gz" ]; then + actual_checksum=$(sha256sum "v${LMS_VERSION}.tar.gz" | awk '{print $1}') + if [ "$actual_checksum" != "$expected_checksum" ]; then + echo "ERROR: Checksum mismatch. Expected: $expected_checksum, Got: $actual_checksum" + rm -f "v${LMS_VERSION}.tar.gz" + exit 1 + fi + echo "Checksum verification successful." + + tar -xzf "v${LMS_VERSION}.tar.gz" + rm -f "v${LMS_VERSION}.tar.gz" + cd "lms-${LMS_VERSION}" || exit 1 + + export LMS_ROOT="$PWD" + mkdir -p build && cd build || exit 1 + + cmake -Wno-dev -DBUILD_SHARED_LIBS=OFF -DNETWORK_NM=OFF \ + -DNETWORK_CN=OFF -DCMAKE_INSTALL_PREFIX=/usr "$LMS_ROOT" + + if ! make -j"$(($(nproc) / 2))"; then + echo "ERROR: LMS build failed" + exit 1 + fi + + # Create package without sudo, then install with sudo + if ! make package; then + echo "ERROR: LMS package creation failed" + exit 1 + fi + + if [ -f "./lms-2506.0.0-Linux.deb" ]; then + echo "LMS package built successfully" + if sudo apt-get install -y -o Dpkg::Options::="--force-confnew" "./lms-2506.0.0-Linux.deb"; then + echo "LMS package installed successfully" + sudo systemctl stop lms.service + sudo systemctl disable lms.service + sudo systemctl mask lms.service + rm -f "lms-2506.0.0-Linux.deb" + else + echo "WARNING: Failed to install LMS package. Platform manageability features may not work properly." + echo "Continuing with installation..." + fi + else + echo "ERROR: LMS package not found. Build failed." + exit 1 + fi + else + echo "ERROR: Failed to download LMS source. Aborting installation." + exit 1 + fi + + #Download RPC binary + echo "Download RPC binary" + expected_checksum="609b3a69f6534005ca0bf62b12b04c1d18cbc28decc6cf2d5d03d0bc521d9de8" + curl -LO "https://github.com/device-management-toolkit/rpc-go/releases/download/v2.48.2/rpc_linux_x64.tar.gz" + + if [ -f "rpc_linux_x64.tar.gz" ]; then + actual_checksum=$(sha256sum "rpc_linux_x64.tar.gz" | awk '{print $1}') + if [ "$actual_checksum" != "$expected_checksum" ]; then + echo "Checksum mismatch. File may be corrupted." + fi + echo "Checksum verification successful." + tar -xvf rpc_linux_x64.tar.gz -C /usr/bin + rm -rf rpc_linux_x64.tar.gz + mv /usr/bin/rpc_linux_x64 /usr/bin/rpc + else + echo "Downloaded file does not exist. Aborting installation." + exit 1 + fi + echo "install_lms_rpc done" | tee -a "$SCRIPT_DIR"/$STATUS_FILENAME + fi +} + get_rs_token() { if [ "$RS_TYPE" == "auth" ]; then # Temp file to store response @@ -178,6 +263,18 @@ install_node_agent(){ echo "User '$USERNAME' added successfully." fi + + if [ -s "/opt/edge-node/node/platform_manageability_agent.sh" ]; then + source /opt/edge-node/node/platform_manageability_agent.sh + else + echo "/opt/edge-node/node/platform_manageability_agent.sh file does not exists" + exit 1 + fi + if [ "$VPRO_ENABLE" = "true" ]; then + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + + fi + echo "node-agent node-agent/onboarding.serviceURL string ${HW_INVENTORY_URL}" | debconf-set-selections echo "node-agent node-agent/auth.accessTokenURL string ${NODE_ACCESS_URL}" | debconf-set-selections echo "node-agent node-agent/auth.rsTokenURL string ${NODE_RS_URL}" | debconf-set-selections @@ -320,86 +417,7 @@ install_other_agents() { echo "platform-update-agent platform-update-agent/enaDebURL string ${CADDY_APT_PROXY_URL}" | debconf-set-selections echo "platform-update-agent platform-update-agent/updateServiceURL string ${UPDATE_SERVICE_URL}" | debconf-set-selections echo "telemetry-agent telemetry-agent/telemetrymanager.serviceURL string ${TELEMETRY_MANAGER_URL}" | debconf-set-selections - echo "platform-manageability-agent platform-manageability-agent/manageability.serviceURL string ${PLATFORM_MANAGEABILITY_URL}" | debconf-set-selections - echo "platform-manageability-agent platform-manageability-agent/rpsAddress string ${RPS_ADDRESS}" | debconf-set-selections - - # Download, build and install LMS - LMS_VERSION="2506.0.0.0" - expected_checksum="bfdcbfb6b2a739321998a0772767c1532ede70f4bd38cdbe48488b59d118a086" - - curl -fsSL --connect-timeout 30 --max-time 300 \ - "https://github.com/intel/lms/archive/refs/tags/v${LMS_VERSION}.tar.gz" \ - -o "v${LMS_VERSION}.tar.gz" - - if [ -f "v${LMS_VERSION}.tar.gz" ]; then - actual_checksum=$(sha256sum "v${LMS_VERSION}.tar.gz" | awk '{print $1}') - if [ "$actual_checksum" != "$expected_checksum" ]; then - echo "ERROR: Checksum mismatch. Expected: $expected_checksum, Got: $actual_checksum" - rm -f "v${LMS_VERSION}.tar.gz" - exit 1 - fi - echo "Checksum verification successful." - - tar -xzf "v${LMS_VERSION}.tar.gz" - rm -f "v${LMS_VERSION}.tar.gz" - cd "lms-${LMS_VERSION}" || exit 1 - - export LMS_ROOT="$PWD" - mkdir -p build && cd build || exit 1 - - cmake -Wno-dev -DBUILD_SHARED_LIBS=OFF -DNETWORK_NM=OFF \ - -DNETWORK_CN=OFF -DCMAKE_INSTALL_PREFIX=/usr "$LMS_ROOT" - - if ! make -j"$(($(nproc) / 2))"; then - echo "ERROR: LMS build failed" - exit 1 - fi - - # Create package without sudo, then install with sudo - if ! make package; then - echo "ERROR: LMS package creation failed" - exit 1 - fi - - if [ -f "./lms-2506.0.0-Linux.deb" ]; then - echo "LMS package built successfully" - if sudo apt-get install -y -o Dpkg::Options::="--force-confnew" "./lms-2506.0.0-Linux.deb"; then - echo "LMS package installed successfully" - sudo systemctl stop lms.service - sudo systemctl disable lms.service - sudo systemctl mask lms.service - rm -f "lms-2506.0.0-Linux.deb" - else - echo "WARNING: Failed to install LMS package. Platform manageability features may not work properly." - echo "Continuing with installation..." - fi - else - echo "ERROR: LMS package not found. Build failed." - exit 1 - fi - else - echo "ERROR: Failed to download LMS source. Aborting installation." - exit 1 - fi - - #Download RPC binary - echo "Download RPC binary" - expected_checksum="609b3a69f6534005ca0bf62b12b04c1d18cbc28decc6cf2d5d03d0bc521d9de8" - curl -LO "https://github.com/device-management-toolkit/rpc-go/releases/download/v2.48.2/rpc_linux_x64.tar.gz" - - if [ -f "rpc_linux_x64.tar.gz" ]; then - actual_checksum=$(sha256sum "rpc_linux_x64.tar.gz" | awk '{print $1}') - if [ "$actual_checksum" != "$expected_checksum" ]; then - echo "Checksum mismatch. File may be corrupted." - fi - echo "Checksum verification successful." - tar -xvf rpc_linux_x64.tar.gz -C /usr/bin - rm -rf rpc_linux_x64.tar.gz - mv /usr/bin/rpc_linux_x64 /usr/bin/rpc - else - echo "Downloaded file does not exist. Aborting installation." - exit 1 - fi + apt-get update apt-get install -y -o Dpkg::Options::="--force-confnew" \ cluster-agent="$CLUSTER_AGENT_VERSION" \ @@ -415,8 +433,12 @@ install_other_agents() { tpm-provision="$TPM_PROVISION_VERSION" \ inbc-program="$INBC_PROGRAM_VERSION" \ platform-update-agent="$PLATFORM_UPDATE_AGENT_VERSION" \ - platform-telemetry-agent="$PLATFORM_TELEMETRY_AGENT_VERSION" \ - platform-manageability-agent="$PLATFORM_MANAGEABILITY_AGENT_VERSION" + platform-telemetry-agent="$PLATFORM_TELEMETRY_AGENT_VERSION" + if [ "$VPRO_ENABLE" = "true" ]; then + echo "platform-manageability-agent platform-manageability-agent/manageability.serviceURL string ${PLATFORM_MANAGEABILITY_URL}" | debconf-set-selections + echo "platform-manageability-agent platform-manageability-agent/rpsAddress string ${RPS_ADDRESS}" | debconf-set-selections + apt-get install -y -o Dpkg::Options::="--force-confnew" platform-manageability-agent="$PLATFORM_MANAGEABILITY_AGENT_VERSION" + fi # Remove docker. trtl and inbm-telemetry checks from INBM configuration file remove_lines_from_sotaSW /etc/intel_manageability.conf docker trtl inbm-telemetry @@ -556,6 +578,7 @@ install_dependencies 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME enable_kernel_config 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME install_syslogrotate_job 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME echo "Install agents..........................." +install_lms_rpc 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME install_node_agent 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME install_other_agents 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME install_syslogrotate_ufw 2>&1 | tee -a "$SCRIPT_DIR"/$SETUP_STATUS_FILENAME From c6b321fa2808d7d14d9df78c85b84f969cd14826 Mon Sep 17 00:00:00 2001 From: punam biswal Date: Wed, 1 Oct 2025 13:05:03 +0530 Subject: [PATCH 2/5] Add version Signed-off-by: punam biswal --- onboarding-manager/VERSION | 2 +- onboarding-manager/pkg/cloudinit/99_infra.cfg | 29 ++++++++++--------- .../pkg/platformbundle/ubuntu-22.04/Installer | 23 ++++----------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/onboarding-manager/VERSION b/onboarding-manager/VERSION index e4b2eda25..5d71905f6 100644 --- a/onboarding-manager/VERSION +++ b/onboarding-manager/VERSION @@ -1 +1 @@ -1.38.6 +1.38.7 diff --git a/onboarding-manager/pkg/cloudinit/99_infra.cfg b/onboarding-manager/pkg/cloudinit/99_infra.cfg index 23208b28d..779f17626 100644 --- a/onboarding-manager/pkg/cloudinit/99_infra.cfg +++ b/onboarding-manager/pkg/cloudinit/99_infra.cfg @@ -105,17 +105,6 @@ write_files: - path: /etc/intel_edge_node/orch-ca-cert/orch-ca.crt # CA cert path used by Prometheus content: | {{- .CA_CERT | nindent 6 }} - - path: /opt/edge-node/node/platform_manageability_agent.sh - permissions: '0755' - content: | - #!/bin/bash - if rpc amtinfo | grep -i "AMT Pro Corporate"; then - echo "vPro detected, installing platform-manageability-agent.service" - VPRO_ENABLE=true - else - echo "vPro not detected, skipping platform-manageability-agent.service" - VPRO_ENABLE=false - fi - path: /etc/edge-node/node/agent_variables content: | CLUSTER_ORCH_URL={{ .ORCH_CLUSTER }} @@ -211,6 +200,18 @@ write_files: Subsystem sftp /usr/lib/openssh/sftp-server {{- end }} {{- end }} + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -i "AMT Pro Corporate"; then + echo "vPro/ISM detected, install platform-manageability-agent.service" + IS_PMA_ENABLE=true + else + echo "vPro/ISM not detected, skip platform-manageability-agent.service" + IS_PMA_ENABLE=false + fi + echo "PMA_ENABLE=$IS_PMA_ENABLE" >> /etc/edge-node/node/agent_variables runcmd: {{- if .WITH_PRESERVE_IP }} - bash /opt/intel_edge_node/staticip.sh @@ -233,15 +234,17 @@ runcmd: {{- end }} . /etc/environment export http_proxy https_proxy ftp_proxy socks_server no_proxy + bash /opt/edge-node/node/check_vpro_ism_capable.sh {{- if not .RUN_AS_STANDALONE }} {{- if .IS_MICROVISOR }} - bash /opt/edge-node/node/platform_manageability_agent.sh chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") - if [ "$VPRO_ENABLE" = "true" ]; then + if [ "$IS_PMA_ENABLE" = "true" ]; then SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml fi for SERVICE in "${SERVICES[@]}" do diff --git a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer index 8aa3fb336..9d1988330 100644 --- a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer +++ b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer @@ -263,18 +263,6 @@ install_node_agent(){ echo "User '$USERNAME' added successfully." fi - - if [ -s "/opt/edge-node/node/platform_manageability_agent.sh" ]; then - source /opt/edge-node/node/platform_manageability_agent.sh - else - echo "/opt/edge-node/node/platform_manageability_agent.sh file does not exists" - exit 1 - fi - if [ "$VPRO_ENABLE" = "true" ]; then - sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml - - fi - echo "node-agent node-agent/onboarding.serviceURL string ${HW_INVENTORY_URL}" | debconf-set-selections echo "node-agent node-agent/auth.accessTokenURL string ${NODE_ACCESS_URL}" | debconf-set-selections echo "node-agent node-agent/auth.rsTokenURL string ${NODE_RS_URL}" | debconf-set-selections @@ -402,11 +390,8 @@ remove_lines_from_sotaSW() { install_other_agents() { if grep -q "install_other_agents done" "$SCRIPT_DIR"/$STATUS_FILENAME; then - echo "Skipping install_other_agents" + echo "Skipping install_other_agents" else - # Get authentication token - RS_AT=$(get_rs_token) - echo "Install bare-metal agents..." echo "cluster-agent cluster-agent/cluster-orchestrator-url string ${CLUSTER_ORCH_URL}" | debconf-set-selections echo "hardware-discovery-agent hardware-discovery-agent/onboarding.serviceURL string ${HW_INVENTORY_URL}" | debconf-set-selections @@ -434,10 +419,14 @@ install_other_agents() { inbc-program="$INBC_PROGRAM_VERSION" \ platform-update-agent="$PLATFORM_UPDATE_AGENT_VERSION" \ platform-telemetry-agent="$PLATFORM_TELEMETRY_AGENT_VERSION" - if [ "$VPRO_ENABLE" = "true" ]; then + + if [ "$PMA_ENABLE" = "true" ]; then echo "platform-manageability-agent platform-manageability-agent/manageability.serviceURL string ${PLATFORM_MANAGEABILITY_URL}" | debconf-set-selections echo "platform-manageability-agent platform-manageability-agent/rpsAddress string ${RPS_ADDRESS}" | debconf-set-selections apt-get install -y -o Dpkg::Options::="--force-confnew" platform-manageability-agent="$PLATFORM_MANAGEABILITY_AGENT_VERSION" + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + systemctl restart node-agent fi # Remove docker. trtl and inbm-telemetry checks from INBM configuration file From 65d6312877a553f0b43273e79d3aa270d3944a37 Mon Sep 17 00:00:00 2001 From: punam biswal Date: Fri, 3 Oct 2025 17:32:53 +0530 Subject: [PATCH 3/5] Add test changes Signed-off-by: punam biswal --- onboarding-manager/pkg/cloudinit/99_infra.cfg | 14 ++++++-------- .../testout/expected-installer-01.cfg | 18 +++++++++++++++++- .../testout/expected-installer-02.cfg | 10 ++++++++++ .../testout/expected-installer-03.cfg | 18 +++++++++++++++++- .../testout/expected-installer-04.cfg | 18 +++++++++++++++++- .../testout/expected-installer-05.cfg | 10 ++++++++++ .../testout/expected-installer-06.cfg | 10 ++++++++++ .../testout/expected-installer-07.cfg | 18 +++++++++++++++++- .../testout/expected-installer-08.cfg | 10 ++++++++++ .../testout/expected-installer-09.cfg | 10 ++++++++++ .../testout/expected-installer-10.cfg | 18 +++++++++++++++++- .../testout/expected-installer-11.cfg | 18 +++++++++++++++++- .../testout/expected-installer-12.cfg | 18 +++++++++++++++++- .../testout/expected-installer-13.cfg | 10 ++++++++++ .../testout/expected-installer-14.cfg | 10 ++++++++++ .../pkg/platformbundle/ubuntu-22.04/Installer | 2 ++ 16 files changed, 197 insertions(+), 15 deletions(-) diff --git a/onboarding-manager/pkg/cloudinit/99_infra.cfg b/onboarding-manager/pkg/cloudinit/99_infra.cfg index 779f17626..7eff4d3e0 100644 --- a/onboarding-manager/pkg/cloudinit/99_infra.cfg +++ b/onboarding-manager/pkg/cloudinit/99_infra.cfg @@ -204,14 +204,12 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -i "AMT Pro Corporate"; then - echo "vPro/ISM detected, install platform-manageability-agent.service" - IS_PMA_ENABLE=true + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true else - echo "vPro/ISM not detected, skip platform-manageability-agent.service" - IS_PMA_ENABLE=false + PMA_ENABLE=false fi - echo "PMA_ENABLE=$IS_PMA_ENABLE" >> /etc/edge-node/node/agent_variables + echo "$PMA_ENABLE" runcmd: {{- if .WITH_PRESERVE_IP }} - bash /opt/intel_edge_node/staticip.sh @@ -234,14 +232,14 @@ runcmd: {{- end }} . /etc/environment export http_proxy https_proxy ftp_proxy socks_server no_proxy - bash /opt/edge-node/node/check_vpro_ism_capable.sh {{- if not .RUN_AS_STANDALONE }} {{- if .IS_MICROVISOR }} chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") - if [ "$IS_PMA_ENABLE" = "true" ]; then + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then SERVICES+=("platform-manageability-agent.service") else sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg index a7420767f..d1d64bde2 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg @@ -116,6 +116,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment @@ -128,7 +138,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg index ffa72b48b..821230f39 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg @@ -142,6 +142,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/lib/openssh/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg index c372e7578..0fa7f72d5 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg @@ -116,6 +116,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment @@ -128,7 +138,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg index f49bc5fa9..f93842336 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg @@ -108,6 +108,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment @@ -120,7 +130,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg index bf3742a4e..4c8320784 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg @@ -134,6 +134,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/lib/openssh/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg index 2cfe16ad6..b72a4115e 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg @@ -134,6 +134,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/lib/openssh/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | . /etc/environment diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg index dc10a2631..573323b5e 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg @@ -108,6 +108,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment @@ -118,7 +128,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg index a611b7320..9268804e1 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg @@ -130,6 +130,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/lib/openssh/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg index 225a57c2f..802a6bbe3 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg @@ -160,6 +160,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/lib/openssh/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - bash /opt/intel_edge_node/staticip.sh - | diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg index 6d6c1849e..d7ddbc1eb 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg @@ -134,6 +134,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - bash /opt/intel_edge_node/staticip.sh - | @@ -147,7 +157,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg index 56870104d..bf0223080 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg @@ -117,6 +117,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment @@ -129,7 +139,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg index 59c165d40..c9be334f5 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg @@ -123,6 +123,16 @@ write_files: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr UsePAM yes Subsystem sftp /usr/libexec/sftp-server + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment @@ -135,7 +145,13 @@ runcmd: chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes. - SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service" "platform-manageability-agent.service") + SERVICES=("caddy.service" "node-agent.service" "cluster-agent.service" "hardware-discovery-agent.service" "platform-observability-collector.service" "platform-observability-health-check.service" "platform-observability-logging.service" "platform-observability-metrics.service" "platform-telemetry-agent.service" "platform-update-agent.service" "rasdaemon.service") + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then + SERVICES+=("platform-manageability-agent.service") + else + sed -i '/serviceClients:/ s/platform-manageability-agent, *//; /serviceClients:/ s/, *platform-manageability-agent//; /serviceClients:/ s/platform-manageability-agent//' /etc/edge-node/node/confs/node-agent.yaml + fi for SERVICE in "${SERVICES[@]}" do systemctl start "$SERVICE" & diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg index 87d02176a..4b039e944 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg @@ -37,6 +37,16 @@ write_files: efibootmgr -b "$boot_part_number" -a fi done < <(efibootmgr | grep "Boot" | grep -i -v -E "BootCurrent|BootOrder" | awk '{print $1}' | cut -c 5-9) + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg index 433ac1998..3ff94a7b4 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg @@ -46,6 +46,16 @@ write_files: efibootmgr -b "$boot_part_number" -a fi done < <(efibootmgr | grep "Boot" | grep -i -v -E "BootCurrent|BootOrder" | awk '{print $1}' | cut -c 5-9) + - path: /opt/edge-node/node/check_vpro_ism_capable.sh + permissions: '0755' + content: | + #!/bin/bash + if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + PMA_ENABLE=true + else + PMA_ENABLE=false + fi + echo "$PMA_ENABLE" runcmd: - | grep -qF "http_proxy" /etc/environment || echo http_proxy=http-proxy.test >> /etc/environment diff --git a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer index 9d1988330..a4a0e63b8 100644 --- a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer +++ b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer @@ -420,6 +420,8 @@ install_other_agents() { platform-update-agent="$PLATFORM_UPDATE_AGENT_VERSION" \ platform-telemetry-agent="$PLATFORM_TELEMETRY_AGENT_VERSION" + PMA_ENABLE=$(bash /opt/edge-node/node/check_vpro_ism_capable.sh) + if [ "$PMA_ENABLE" = "true" ]; then echo "platform-manageability-agent platform-manageability-agent/manageability.serviceURL string ${PLATFORM_MANAGEABILITY_URL}" | debconf-set-selections echo "platform-manageability-agent platform-manageability-agent/rpsAddress string ${RPS_ADDRESS}" | debconf-set-selections From f8520dd10ab302f3c40e7b40065362de5a41fec1 Mon Sep 17 00:00:00 2001 From: punam biswal Date: Mon, 6 Oct 2025 17:38:25 +0530 Subject: [PATCH 4/5] fix indentation Signed-off-by: punam biswal --- .../pkg/platformbundle/ubuntu-22.04/Installer | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer index a4a0e63b8..4cc78414d 100644 --- a/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer +++ b/onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer @@ -110,14 +110,14 @@ install_lms_rpc(){ if [ -f "./lms-2506.0.0-Linux.deb" ]; then echo "LMS package built successfully" if sudo apt-get install -y -o Dpkg::Options::="--force-confnew" "./lms-2506.0.0-Linux.deb"; then - echo "LMS package installed successfully" - sudo systemctl stop lms.service - sudo systemctl disable lms.service - sudo systemctl mask lms.service - rm -f "lms-2506.0.0-Linux.deb" + echo "LMS package installed successfully" + sudo systemctl stop lms.service + sudo systemctl disable lms.service + sudo systemctl mask lms.service + rm -f "lms-2506.0.0-Linux.deb" else - echo "WARNING: Failed to install LMS package. Platform manageability features may not work properly." - echo "Continuing with installation..." + echo "WARNING: Failed to install LMS package. Platform manageability features may not work properly." + echo "Continuing with installation..." fi else echo "ERROR: LMS package not found. Build failed." From 5053f4b240c53461032e16194020313a12f18962 Mon Sep 17 00:00:00 2001 From: punam biswal Date: Mon, 6 Oct 2025 20:04:34 +0530 Subject: [PATCH 5/5] Add check for ISM Signed-off-by: punam biswal --- onboarding-manager/pkg/cloudinit/99_infra.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-01.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-02.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-03.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-04.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-05.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-06.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-07.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-08.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-09.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-10.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-11.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-12.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-13.cfg | 2 +- .../pkg/cloudinit/testout/expected-installer-14.cfg | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/onboarding-manager/pkg/cloudinit/99_infra.cfg b/onboarding-manager/pkg/cloudinit/99_infra.cfg index 7eff4d3e0..aca8bc102 100644 --- a/onboarding-manager/pkg/cloudinit/99_infra.cfg +++ b/onboarding-manager/pkg/cloudinit/99_infra.cfg @@ -204,7 +204,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg index d1d64bde2..3f705c24f 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-01.cfg @@ -120,7 +120,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg index 821230f39..055da58f7 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-02.cfg @@ -146,7 +146,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg index 0fa7f72d5..fb2074d07 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-03.cfg @@ -120,7 +120,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg index f93842336..9bb22d0aa 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-04.cfg @@ -112,7 +112,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg index 4c8320784..a6b7097e3 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-05.cfg @@ -138,7 +138,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg index b72a4115e..8e76afa62 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-06.cfg @@ -138,7 +138,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg index 573323b5e..f11a057fd 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-07.cfg @@ -112,7 +112,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg index 9268804e1..818e1f24d 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-08.cfg @@ -134,7 +134,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg index 802a6bbe3..e1e2f9311 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-09.cfg @@ -164,7 +164,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg index d7ddbc1eb..353858c50 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-10.cfg @@ -138,7 +138,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg index bf0223080..8715c55bc 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-11.cfg @@ -121,7 +121,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg index c9be334f5..03dc04ea3 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-12.cfg @@ -127,7 +127,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg index 4b039e944..c21c46223 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-13.cfg @@ -41,7 +41,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false diff --git a/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg b/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg index 3ff94a7b4..c291c50ab 100644 --- a/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg +++ b/onboarding-manager/pkg/cloudinit/testout/expected-installer-14.cfg @@ -50,7 +50,7 @@ write_files: permissions: '0755' content: | #!/bin/bash - if rpc amtinfo | grep -iq "AMT Pro Corporate" > /dev/null; then + if rpc amtinfo | grep -iqE "AMT Pro Corporate|Intel Standard Manageability Corporate" > /dev/null; then PMA_ENABLE=true else PMA_ENABLE=false