Skip to content

Commit ca17f78

Browse files
committed
Add version
Signed-off-by: punam biswal <[email protected]>
1 parent 06369fd commit ca17f78

File tree

3 files changed

+23
-31
lines changed

3 files changed

+23
-31
lines changed

onboarding-manager/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.38.6
1+
1.38.7

onboarding-manager/pkg/cloudinit/99_infra.cfg

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,6 @@ write_files:
105105
- path: /etc/intel_edge_node/orch-ca-cert/orch-ca.crt # CA cert path used by Prometheus
106106
content: |
107107
{{- .CA_CERT | nindent 6 }}
108-
- path: /opt/edge-node/node/platform_manageability_agent.sh
109-
permissions: '0755'
110-
content: |
111-
#!/bin/bash
112-
if rpc amtinfo | grep -i "AMT Pro Corporate"; then
113-
echo "vPro detected, installing platform-manageability-agent.service"
114-
VPRO_ENABLE=true
115-
else
116-
echo "vPro not detected, skipping platform-manageability-agent.service"
117-
VPRO_ENABLE=false
118-
fi
119108
- path: /etc/edge-node/node/agent_variables
120109
content: |
121110
CLUSTER_ORCH_URL={{ .ORCH_CLUSTER }}
@@ -211,6 +200,18 @@ write_files:
211200
Subsystem sftp /usr/lib/openssh/sftp-server
212201
{{- end }}
213202
{{- end }}
203+
- path: /opt/edge-node/node/check_vpro_ism_capable.sh
204+
permissions: '0755'
205+
content: |
206+
#!/bin/bash
207+
if rpc amtinfo | grep -i "AMT Pro Corporate"; then
208+
echo "vPro/ISM detected, install platform-manageability-agent.service"
209+
IS_PMA_ENABLE=true
210+
else
211+
echo "vPro/ISM not detected, skip platform-manageability-agent.service"
212+
IS_PMA_ENABLE=false
213+
fi
214+
echo "PMA_ENABLE=$IS_PMA_ENABLE" >> /etc/edge-node/node/agent_variables
214215
runcmd:
215216
{{- if .WITH_PRESERVE_IP }}
216217
- bash /opt/intel_edge_node/staticip.sh
@@ -233,15 +234,17 @@ runcmd:
233234
{{- end }}
234235
. /etc/environment
235236
export http_proxy https_proxy ftp_proxy socks_server no_proxy
237+
bash /opt/edge-node/node/check_vpro_ism_capable.sh
236238
{{- if not .RUN_AS_STANDALONE }}
237239
{{- if .IS_MICROVISOR }}
238-
bash /opt/edge-node/node/platform_manageability_agent.sh
239240
chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_id
240241
chown -R node-agent:bm-agents /etc/intel_edge_node/client-credentials/client_secret
241242
systemctl restart caddy.service # workaround for caddy issue. Remove the line once Image is ready with caddy changes.
242243
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")
243-
if [ "$VPRO_ENABLE" = "true" ]; then
244+
if [ "$PMA_ENABLE" = "true" ]; then
244245
SERVICES+=("platform-manageability-agent.service")
246+
else
247+
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
245248
fi
246249
for SERVICE in "${SERVICES[@]}"
247250
do

onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -263,18 +263,6 @@ install_node_agent(){
263263
echo "User '$USERNAME' added successfully."
264264
fi
265265

266-
267-
if [ -s "/opt/edge-node/node/platform_manageability_agent.sh" ]; then
268-
source /opt/edge-node/node/platform_manageability_agent.sh
269-
else
270-
echo "/opt/edge-node/node/platform_manageability_agent.sh file does not exists"
271-
exit 1
272-
fi
273-
if [ "$VPRO_ENABLE" = "true" ]; then
274-
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
275-
276-
fi
277-
278266
echo "node-agent node-agent/onboarding.serviceURL string ${HW_INVENTORY_URL}" | debconf-set-selections
279267
echo "node-agent node-agent/auth.accessTokenURL string ${NODE_ACCESS_URL}" | debconf-set-selections
280268
echo "node-agent node-agent/auth.rsTokenURL string ${NODE_RS_URL}" | debconf-set-selections
@@ -402,11 +390,8 @@ remove_lines_from_sotaSW() {
402390

403391
install_other_agents() {
404392
if grep -q "install_other_agents done" "$SCRIPT_DIR"/$STATUS_FILENAME; then
405-
echo "Skipping install_other_agents"
393+
echo "Skipping install_other_agents"
406394
else
407-
# Get authentication token
408-
RS_AT=$(get_rs_token)
409-
410395
echo "Install bare-metal agents..."
411396
echo "cluster-agent cluster-agent/cluster-orchestrator-url string ${CLUSTER_ORCH_URL}" | debconf-set-selections
412397
echo "hardware-discovery-agent hardware-discovery-agent/onboarding.serviceURL string ${HW_INVENTORY_URL}" | debconf-set-selections
@@ -434,10 +419,14 @@ install_other_agents() {
434419
inbc-program="$INBC_PROGRAM_VERSION" \
435420
platform-update-agent="$PLATFORM_UPDATE_AGENT_VERSION" \
436421
platform-telemetry-agent="$PLATFORM_TELEMETRY_AGENT_VERSION"
437-
if [ "$VPRO_ENABLE" = "true" ]; then
422+
423+
if [ "$PMA_ENABLE" = "true" ]; then
438424
echo "platform-manageability-agent platform-manageability-agent/manageability.serviceURL string ${PLATFORM_MANAGEABILITY_URL}" | debconf-set-selections
439425
echo "platform-manageability-agent platform-manageability-agent/rpsAddress string ${RPS_ADDRESS}" | debconf-set-selections
440426
apt-get install -y -o Dpkg::Options::="--force-confnew" platform-manageability-agent="$PLATFORM_MANAGEABILITY_AGENT_VERSION"
427+
else
428+
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
429+
systemctl restart node-agent
441430
fi
442431

443432
# Remove docker. trtl and inbm-telemetry checks from INBM configuration file

0 commit comments

Comments
 (0)