diff --git a/pai-management/src/watchdog/image.yaml b/pai-management/src/watchdog/image.yaml deleted file mode 100644 index c61210bd2..000000000 --- a/pai-management/src/watchdog/image.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Microsoft Corporation -# All rights reserved. -# -# MIT License -# -# 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: -# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -# -# 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. - -copy-list: - - src: ../prometheus/exporter - dst: src/watchdog/copied_file diff --git a/pai-management/src/watchdog/dockerfile b/src/watchdog/build/watchdog.dockerfile similarity index 96% rename from pai-management/src/watchdog/dockerfile rename to src/watchdog/build/watchdog.dockerfile index ef400343b..98ac8d83b 100644 --- a/pai-management/src/watchdog/dockerfile +++ b/src/watchdog/build/watchdog.dockerfile @@ -19,4 +19,4 @@ FROM python:2.7 RUN pip install PyYAML requests paramiko prometheus_client -COPY copied_file/exporter/watchdog.py / +COPY src/watchdog.py / diff --git a/pai-management/bootstrap/watchdog/delete.sh b/src/watchdog/deploy/delete.sh similarity index 98% rename from pai-management/bootstrap/watchdog/delete.sh rename to src/watchdog/deploy/delete.sh index 1b952d11c..b11b05b2b 100644 --- a/pai-management/bootstrap/watchdog/delete.sh +++ b/src/watchdog/deploy/delete.sh @@ -22,5 +22,4 @@ pushd $(dirname "$0") > /dev/null echo "Call stop script to stop all service first" /bin/bash stop.sh || exit $? - -popd > /dev/null \ No newline at end of file +popd > /dev/null diff --git a/pai-management/bootstrap/watchdog/refresh.sh.template b/src/watchdog/deploy/refresh.sh.template similarity index 100% rename from pai-management/bootstrap/watchdog/refresh.sh.template rename to src/watchdog/deploy/refresh.sh.template diff --git a/pai-management/bootstrap/watchdog/service.yaml b/src/watchdog/deploy/service.yaml similarity index 95% rename from pai-management/bootstrap/watchdog/service.yaml rename to src/watchdog/deploy/service.yaml index d8bbf63f3..4d3cadd0c 100644 --- a/pai-management/bootstrap/watchdog/service.yaml +++ b/src/watchdog/deploy/service.yaml @@ -17,18 +17,16 @@ prerequisite: - cluster-configuration - - drivers template-list: - watchdog-configmap.yaml - watchdog.yaml + - refresh.sh start-script: start.sh stop-script: stop.sh delete-script: delete.sh refresh-script: refresh.sh -upgraded-script: upgraded.sh - deploy-rules: - in: pai-master \ No newline at end of file + in: pai-master diff --git a/pai-management/bootstrap/watchdog/start.sh b/src/watchdog/deploy/start.sh similarity index 100% rename from pai-management/bootstrap/watchdog/start.sh rename to src/watchdog/deploy/start.sh diff --git a/pai-management/bootstrap/watchdog/stop.sh b/src/watchdog/deploy/stop.sh similarity index 86% rename from pai-management/bootstrap/watchdog/stop.sh rename to src/watchdog/deploy/stop.sh index e82991d1f..cdd92e2cf 100644 --- a/pai-management/bootstrap/watchdog/stop.sh +++ b/src/watchdog/deploy/stop.sh @@ -19,11 +19,6 @@ # 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. -INSTANCES="daemonset/watchdog -deployment/watchdog -configmap/watchdog -" - -for instance in ${INSTANCES}; do - kubectl delete --ignore-not-found --now ${instance} -done \ No newline at end of file +kubectl delete --ignore-not-found --now daemonset/watchdog +kubectl delete --ignore-not-found --now deployment/watchdog +kubectl delete --ignore-not-found --now configmap/watchdog diff --git a/pai-management/bootstrap/watchdog/watchdog-configmap.yaml.template b/src/watchdog/deploy/watchdog-configmap.yaml.template similarity index 100% rename from pai-management/bootstrap/watchdog/watchdog-configmap.yaml.template rename to src/watchdog/deploy/watchdog-configmap.yaml.template diff --git a/pai-management/bootstrap/watchdog/watchdog.yaml.template b/src/watchdog/deploy/watchdog.yaml.template similarity index 100% rename from pai-management/bootstrap/watchdog/watchdog.yaml.template rename to src/watchdog/deploy/watchdog.yaml.template diff --git a/prometheus/exporter/watchdog.py b/src/watchdog/src/watchdog.py similarity index 100% rename from prometheus/exporter/watchdog.py rename to src/watchdog/src/watchdog.py