From 3083d7dad37a7eb54e36b790836aae9d872eb6af Mon Sep 17 00:00:00 2001 From: ipatini Date: Thu, 5 Oct 2023 17:56:37 +0300 Subject: [PATCH] EMS: config-files: Added stop-agents.yml for off-boarding nodes --- .../linux-yaml/stop-agents.yml | 33 +++++++++++++++++++ ems-core/config-files/ems-server.yml | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 ems-core/config-files/baguette-client-install/linux-yaml/stop-agents.yml diff --git a/ems-core/config-files/baguette-client-install/linux-yaml/stop-agents.yml b/ems-core/config-files/baguette-client-install/linux-yaml/stop-agents.yml new file mode 100644 index 0000000..0bc64c7 --- /dev/null +++ b/ems-core/config-files/baguette-client-install/linux-yaml/stop-agents.yml @@ -0,0 +1,33 @@ +# +# Copyright (C) 2017-2023 Institute of Communication and Computer Systems (imu.iccs.gr) +# +# This Source Code Form is subject to the terms of the Mozilla Public License, v2.0, unless +# Esper library is used, in which case it is subject to the terms of General Public License v2.0. +# If a copy of the MPL was not distributed with this file, you can obtain one at +# https://www.mozilla.org/en-US/MPL/2.0/ +# + +# +# Instructions Set for stopping Agents: +# Baguette client, and Netdata +# + +--- +os: LINUX +description: "Stopping Netdata and Baguette agents at VM node" +#condition: "! ${SKIP_START:-false}" +instructions: + - description: "Stop EMS client" + taskType: CMD + command: "${BAGUETTE_CLIENT_BASE_DIR}/bin/kill.sh" + executable: false + exitCode: 0 + match: false + retries: 5 + - description: "Stop Netdata" + taskType: CMD + command: "echo ${NODE_SSH_PASSWORD} | sudo -S -- sh -c 'killall netdata" + executable: false + exitCode: 0 + match: false + retries: 5 diff --git a/ems-core/config-files/ems-server.yml b/ems-core/config-files/ems-server.yml index 22cad02..b79ca6d 100644 --- a/ems-core/config-files/ems-server.yml +++ b/ems-core/config-files/ems-server.yml @@ -560,6 +560,8 @@ baguette.client.install: VM_LINUX: *install_on_linux DIAGNOSTICS_LINUX: - file:${EMS_CONFIG_DIR}/baguette-client-install/linux-yaml/detect.yml + REMOVE_LINUX: + - file:${EMS_CONFIG_DIR}/baguette-client-install/linux-yaml/stop-agents.yml continueOnFail: true sessionRecordingDir: ${LOGS_DIR:${EMS_CONFIG_DIR}/../logs}