X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2FuCPE%2Fci_management%2Fcleanup_prom_cadvisor.sh;fp=blueprints%2FuCPE%2Fci_management%2Fcleanup_prom_cadvisor.sh;h=fb563a2b3df52346758f8c4ac758fed0c4c07cb9;hb=d63c1f66c2bbff6cd07ac5708f9939455b498b6a;hp=0000000000000000000000000000000000000000;hpb=a25e2c6b61cefe449f53a81e1a9f0b39a0a6208c;p=eliot.git diff --git a/blueprints/uCPE/ci_management/cleanup_prom_cadvisor.sh b/blueprints/uCPE/ci_management/cleanup_prom_cadvisor.sh new file mode 100755 index 0000000..fb563a2 --- /dev/null +++ b/blueprints/uCPE/ci_management/cleanup_prom_cadvisor.sh @@ -0,0 +1,28 @@ +#!/bin/bash -ex +############################################################################## +# Copyright (c) 2019 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +# The script is to stop and remove the prometheus and cadvisor containers from +# ELIOT Manager and ELIOT Edge Node respectively. + +# stop prometheus in ELIOT Manager +source uninstall_prometheus.sh | tee uninstall_prometheus.log + +#stop cadvisor statement executed at ELIOT Edge Node +stop_cadvisor_atedge="cd eliot/scripts/ci_management && source uninstall_cadvisor.sh" +# Read all the Worker Node details from nodelist file. +while read line +do + nodeinfo="${line}" + nodeusr=$(echo ${nodeinfo} | cut -d"|" -f1) + nodeip=$(echo ${nodeinfo} | cut -d"|" -f2) + nodepaswd=$(echo ${nodeinfo} | cut -d"|" -f3) + sshpass -p ${nodepaswd} ssh ${nodeusr}@${nodeip} ${stop_cadvisor_atedge} +done < ../nodelist > /dev/null 2>&1 +