From 9679f85294c76480929570900a444309f046efa4 Mon Sep 17 00:00:00 2001 From: shenlian Date: Sat, 12 Jul 2025 16:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=A3=E8=AA=89=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ansible_plugin/install_info.yaml | 1 - .../ansible_plugin/progress_config.json | 12 --- ascend_deployer/library/config_kube_proxy.py | 95 ------------------ ascend_deployer/library/system_report.py | 8 -- .../playbooks/install/install_atlasedge.yml | 10 -- .../playbooks/install/install_ha.yml | 11 --- .../playbooks/install/install_ief.yml | 5 - .../playbooks/install/task_atlasedge.yml | 43 -------- ascend_deployer/playbooks/install/task_ha.yml | 44 --------- .../playbooks/install/task_ief.yml | 23 ----- .../playbooks/install/task_ief_a500.yml | 99 ------------------- .../playbooks/install/task_ief_a500pro.yml | 70 ------------- ascend_deployer/playbooks/kubeedge.yaml | 5 - .../playbooks/process/process_install.yml | 12 --- .../playbooks/process/process_scene.yml | 4 - .../playbooks/scene/scene_edge.yml | 10 -- ascend_deployer/scripts/pkg_utils.py | 20 ---- .../scripts/uninstall_k8s_docker.sh | 29 ------ ascend_deployer/start_deploy.py | 2 +- ascend_deployer/yamls/k8s_reset.yaml | 13 --- 20 files changed, 1 insertion(+), 515 deletions(-) delete mode 100644 ascend_deployer/library/config_kube_proxy.py delete mode 100644 ascend_deployer/playbooks/install/install_atlasedge.yml delete mode 100644 ascend_deployer/playbooks/install/install_ha.yml delete mode 100644 ascend_deployer/playbooks/install/install_ief.yml delete mode 100644 ascend_deployer/playbooks/install/task_atlasedge.yml delete mode 100644 ascend_deployer/playbooks/install/task_ha.yml delete mode 100644 ascend_deployer/playbooks/install/task_ief.yml delete mode 100644 ascend_deployer/playbooks/install/task_ief_a500.yml delete mode 100644 ascend_deployer/playbooks/install/task_ief_a500pro.yml delete mode 100644 ascend_deployer/playbooks/kubeedge.yaml delete mode 100644 ascend_deployer/playbooks/scene/scene_edge.yml delete mode 100644 ascend_deployer/scripts/uninstall_k8s_docker.sh delete mode 100644 ascend_deployer/yamls/k8s_reset.yaml diff --git a/ascend_deployer/ansible_plugin/install_info.yaml b/ascend_deployer/ansible_plugin/install_info.yaml index 5d3b5660..2ffa3517 100644 --- a/ascend_deployer/ansible_plugin/install_info.yaml +++ b/ascend_deployer/ansible_plugin/install_info.yaml @@ -24,7 +24,6 @@ sys: "install system package" driver: "install driver" get: "get and set the npu scene" - ief: "install IEF" kernel: "install kernel depends" - prepare: diff --git a/ascend_deployer/ansible_plugin/progress_config.json b/ascend_deployer/ansible_plugin/progress_config.json index 677876c4..9b7694f1 100644 --- a/ascend_deployer/ansible_plugin/progress_config.json +++ b/ascend_deployer/ansible_plugin/progress_config.json @@ -35,24 +35,12 @@ "name": "install_clusterd", "desc_zh": "安装clusterd" }, - { - "duration": 60, - "desc_en": "Install atlasedge", - "name": "install_atlasedge", - "desc_zh": "安装atlasedge" - }, { "duration": 60, "desc_en": "Install hccl-controller", "name": "install_hccl-controller", "desc_zh": "安装hccl-controller" }, - { - "duration": 60, - "desc_en": "Install ief", - "name": "install_ief", - "desc_zh": "安装ief" - }, { "duration": 80, "desc_en": "Install kernels", diff --git a/ascend_deployer/library/config_kube_proxy.py b/ascend_deployer/library/config_kube_proxy.py deleted file mode 100644 index 6788efc3..00000000 --- a/ascend_deployer/library/config_kube_proxy.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 -# coding: utf-8 -# Copyright 2024 Huawei Technologies Co., Ltd -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# =========================================================================== -import os - -from ansible.module_utils.basic import AnsibleModule - -MAX_CIRCLES = 8 - - -class KubeProxyConfig(object): - - def __init__(self): - self.module = AnsibleModule(argument_spec=dict(node_name=dict(type="str", required=True))) - self.node_name = self.module.params.get("node_name") - self.proxy_config_path = "/root/temp_proxy_config.yaml" - self.ipvs_modules = "/etc/sysconfig/modules/ipvs.modules" - self.ipvs_modules_dir = "/etc/sysconfig/modules" - - def run(self): - # 获取kube-proxy配置内容 - content = self.get_proxy_config_content() - # 将更新后的内容写入临时文件 - with open(self.proxy_config_path, "w") as f: - f.writelines(content) - - # 生效kube-proxy配置 - self.module.run_command("kubectl apply -f {}".format(self.proxy_config_path)) - # 生成ipvs.module文件 - self.create_ipvs_modules() - self.module.run_command("chmod 755 {}".format(self.ipvs_modules)) - self.module.run_command("bash {}".format(self.ipvs_modules)) - self.module.run_command("lsmod | grep -e ip_vs -e nf_conntrack".format(self.ipvs_modules), use_unsafe_shell=True) - - # 重启kube-proxy - cmd = 'kubectl get pods -A --field-selector spec.nodeName={}'.format(self.node_name) - rc, out, err = self.module.run_command(cmd) - if rc or err or not out: - self.module.fail_json(msg='failed to run cmd: {}, err: {}'.format(cmd, err)) - for line in out.splitlines(): - if "kube-proxy" not in line: - continue - namespace, name, _ = line.split(None, 2) - delete_cmd = 'kubectl delete pod -n {} {} --force --grace-period 0'.format(namespace, name) - self.module.run_command(delete_cmd, check_rc=True) - # 清除临时文件 - os.unlink(self.proxy_config_path) - return self.module.exit_json(rc=0, changed=True) - - def get_proxy_config_content(self): - if os.path.isfile(self.proxy_config_path): - os.unlink(self.proxy_config_path) - with open(self.proxy_config_path, "w"): - pass - set_mode = "kubectl get cm -n kube-system kube-proxy -o yaml > {}".format(self.proxy_config_path) - self.module.run_command(set_mode, use_unsafe_shell=True) - lines = [] - with open(self.proxy_config_path, "r") as f: - content = f.readlines() - for line in content: - if line.strip().startswith("mode:"): - lines.append(" mode: \"ipvs\"\n") - continue - lines.append(line) - return lines - - def create_ipvs_modules(self): - if not os.path.isdir(self.ipvs_modules_dir): - os.makedirs(self.ipvs_modules_dir) - if os.path.isfile(self.ipvs_modules): - os.unlink(self.ipvs_modules) - - content = ("#!/bin/bash\nmodprode -- ip_vs\nmodprode -- ip_vs_rr\nmodprode -- ip_vs_wrr\n" - "modprode -- ip_vs_sh\nmodprode -- nf_conntrack\n") - with open(self.ipvs_modules, "w") as f: - f.write(content) - - -if __name__ == '__main__': - KubeProxyConfig().run() - diff --git a/ascend_deployer/library/system_report.py b/ascend_deployer/library/system_report.py index a775c857..21828b24 100644 --- a/ascend_deployer/library/system_report.py +++ b/ascend_deployer/library/system_report.py @@ -126,14 +126,6 @@ def collect_app_info(): 'install_arch': get_value_on_prefix_ignore_case(item_info, "arch", platform.machine()), 'version': get_value_on_prefix_ignore_case(item_info, "version", "")} apps_info.append(info_dict) - for item in ['atlasedge', 'ha']: - if item == 'atlasedge': - xml_file = os.path.join("/usr/local", 'AtlasEdge/version.xml') - else: - xml_file = os.path.join("/usr/local", 'ha/version.xml') - info_dict = getinfo_from_xml(xml_file, root_path) - if info_dict: - apps_info.append(info_dict) other_packages = ["mindie_image"] for item in other_packages: info_dict = {"name": item, "version": ""} diff --git a/ascend_deployer/playbooks/install/install_atlasedge.yml b/ascend_deployer/playbooks/install/install_atlasedge.yml deleted file mode 100644 index a9003351..00000000 --- a/ascend_deployer/playbooks/install/install_atlasedge.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: '{{ hosts_name }}' - name: install atlasedge - tasks: - - name: create user - create_user: - group: "{{ group }}" - user: "{{ user }}" - - - name: install atlasedge - import_tasks: task_atlasedge.yml diff --git a/ascend_deployer/playbooks/install/install_ha.yml b/ascend_deployer/playbooks/install/install_ha.yml deleted file mode 100644 index 639b35ad..00000000 --- a/ascend_deployer/playbooks/install/install_ha.yml +++ /dev/null @@ -1,11 +0,0 @@ -- hosts: '{{ hosts_name }}' - name: install ha - tasks: - - name: create user - create_user: - group: "{{ group }}" - user: "{{ user }}" - - - name: install ha - import_tasks: task_ha.yml - diff --git a/ascend_deployer/playbooks/install/install_ief.yml b/ascend_deployer/playbooks/install/install_ief.yml deleted file mode 100644 index 24651629..00000000 --- a/ascend_deployer/playbooks/install/install_ief.yml +++ /dev/null @@ -1,5 +0,0 @@ -- hosts: '{{ hosts_name }}' - name: install ief - tasks: - - name: install ief - import_tasks: task_ief.yml diff --git a/ascend_deployer/playbooks/install/task_atlasedge.yml b/ascend_deployer/playbooks/install/task_atlasedge.yml deleted file mode 100644 index 7bab3a94..00000000 --- a/ascend_deployer/playbooks/install/task_atlasedge.yml +++ /dev/null @@ -1,43 +0,0 @@ -- name: get A500pro_exist - shell: dmidecode -t 1 |grep "Atlas 500 Pro" | awk -F" " '{print $3,$4,$5}' - register: a500pro_exist - -- name: find atlasedge path - find: - paths: "{{ resources_dir }}/run_from_cann_zip" - recurse: no - file_type: directory - use_regex: yes - patterns: ".*atlasedge.*{{ansible_architecture}}" - when: (npu_info.scene == 'infer' or npu_info.scene == 'a300i') and a500pro_exist.stdout != "" - register: atlasedge - -- name: install atlasedge - shell: "bash {{ atlasedge.files[0].path }}/install.sh --install_dir=/usr/local/" - register: atlasedge_result - when: atlasedge.matched is defined and atlasedge.matched > 0 - failed_when: "atlasedge_result.rc !=0 and 'has been installed' not in atlasedge_result.stdout" - -- name: atlasedge scene message - debug: - msg: - - "[ASCEND]scene is not infer or server is not A500 Pro, atlasedge install skipped" - when: atlasedge.matched is undefined - -- name: atlasedge message - debug: - msg: - - "[ASCEND]can not find atlasedge package, atlasedge install skipped" - when: atlasedge.matched is defined and atlasedge.matched == 0 - -- name: fail if this install - fail: - msg: "[ASCEND]failed to install atlasedge" - when: - - atlasedge in ansible_run_tags - - atlasedge.matched is defined and atlasedge.matched > 0 - - atlasedge_result.rc !=0 and 'has been installed' not in atlasedge_result.stdout - -- name: atlasedge install message - debug: var=atlasedge_result - when: atlasedge_result.changed is defined and atlasedge_result.changed diff --git a/ascend_deployer/playbooks/install/task_ha.yml b/ascend_deployer/playbooks/install/task_ha.yml deleted file mode 100644 index 1b53b62a..00000000 --- a/ascend_deployer/playbooks/install/task_ha.yml +++ /dev/null @@ -1,44 +0,0 @@ -- name: get A500pro_exist - shell: dmidecode -t 1 |grep "Atlas 500 Pro" | awk -F" " '{print $3,$4,$5}' - register: a500pro_exist - -- name: find ha path - find: - paths: "{{ resources_dir }}/run_from_cann_zip" - recurse: no - file_type: directory - use_regex: yes - patterns: ".*ha.*{{ansible_architecture}}" - when: npu_info.scene == 'infer' and a500pro_exist.stdout != "" - register: ha - -- name: install ha - shell: "bash {{ ha.files[0].path }}/install.sh -f -p /usr/local/" - register: ha_result - when: ha.matched is defined and ha.matched > 0 - failed_when: "ha_result.rc !=0 and 'has been installed' not in ha_result.stdout" - -- name: ha scene message - debug: - msg: - - "[ASCEND]scene is not infer or server is not A500 Pro, ha install skipped" - when: ha.matched is undefined - -- name: ha message - debug: - msg: - - "[ASCEND]can not find ha package, ha install skipped" - when: ha.matched is defined and ha.matched == 0 - -- name: fail if not success - fail: - msg: "[ASCEND]failed to install ha" - when: - - ha.matched is defined and ha.matched > 0 - - ha_result.rc !=0 or 'has been installed' not in ha_result.stdout and 'ha' in ansible_run_tags - -- name: ha install message - debug: var=ha_result - when: - - ha.matched is defined and ha.matched > 0 - - ha_result.changed is defined and ha_result.changed diff --git a/ascend_deployer/playbooks/install/task_ief.yml b/ascend_deployer/playbooks/install/task_ief.yml deleted file mode 100644 index 02d3054a..00000000 --- a/ascend_deployer/playbooks/install/task_ief.yml +++ /dev/null @@ -1,23 +0,0 @@ -- name: get A500_exist - stat: - path: /run/board_cfg.ini - register: a500_exist - -- name: install ief a500 - import_tasks: task_ief_a500.yml - when: a500_exist.stat.exists - -- name: get A500pro_exist - shell: dmidecode -t 1 |grep "Atlas 500 Pro" | awk -F" " '{print $3,$4,$5}' - register: a500pro_exist - -- name: install ief a500pro - import_tasks: task_ief_a500pro.yml - when: a500pro_exist.stdout != "" - -- name: message - debug: - msg: - - "[ASCEND]only support installing ief for a500 or a500pro, please check your device" - when: not a500_exist.stat.exists and a500pro_exist.stdout == "" - failed_when: not a500_exist.stat.exists and a500pro_exist.stdout == "" diff --git a/ascend_deployer/playbooks/install/task_ief_a500.yml b/ascend_deployer/playbooks/install/task_ief_a500.yml deleted file mode 100644 index 29863231..00000000 --- a/ascend_deployer/playbooks/install/task_ief_a500.yml +++ /dev/null @@ -1,99 +0,0 @@ -- name: find cert_*.tar.gz a500 - find: - path: "{{ resources_dir }}" - recurse: no - file_type: file - use_regex: no - patterns: "cert_*.tar.gz" - register: cert - -- name: find ief cert message - debug: - msg: - - "[ASCEND]can not find ief product cert, install ief failed" - when: cert.matched == 0 - failed_when: cert.matched == 0 - -- name: stat edge-installer a500 - stat: - path: /opt/middleware/AtlasEdge/software/IEF/edge-installer - register: edge_installer_dir - -- name: stat edge-register a500 - stat: - path: /opt/middleware/AtlasEdge/software/IEF/edge-register - register: edge_register_dir - -- name: copy edge-installe a500 - copy: - src: /opt/middleware/AtlasEdge/software/IEF/edge-installer - dest: /opt - remote_src: yes - when: edge_installer_dir.stat.exists and edge_register_dir.stat.exists - -- name: copy edge-register a500 - copy: - src: /opt/middleware/AtlasEdge/software/IEF/edge-register - dest: /opt - remote_src: yes - when: edge_installer_dir.stat.exists and edge_register_dir.stat.exists - -- name: find edge-installer_*_arm64.tar.gz - find: - path: "{{ resources_dir }}" - recurse: no - file_type: file - use_regex: no - patterns: "edge-installer_*_arm64.tar.gz" - register: edge_installer_tar - when: not edge_installer_dir.stat.exists or not edge_register_dir.stat.exists - -- name: find edge-register_*_arm64.tar.gz - find: - path: "{{ resources_dir }}" - recurse: no - file_type: file - use_regex: no - patterns: "edge-register_*_arm64.tar.gz" - register: edge_register_tar - when: not edge_installer_dir.stat.exists or not edge_register_dir.stat.exists - -- name: find ief tool message - debug: - msg: - - "[ASCEND]can not find edge-installer or edge-register tar.gz, install ief failed" - when: - - edge_installer_tar.matched is defined and edge_register_tar.matched is defined - - edge_installer_tar.matched == 0 or edge_register_tar.matched == 0 - failed_when: edge_installer_tar.matched == 0 or edge_register_tar.matched == 0 - -- name: edge-installer tar.gz unarchive - unarchive: - src: "{{ edge_installer_tar.files[0].path }}" - dest: /opt - copy: no - when: edge_installer_tar.matched is defined and edge_register_tar.matched is defined - -- name: edge-register tar.gz unarchive - unarchive: - src: "{{ edge_register_tar.files[0].path }}" - dest: /opt - copy: no - when: edge_installer_tar.matched is defined and edge_register_tar.matched is defined - -- name: cert tar.gz unarchive - unarchive: - src: "{{ cert.files[0].path }}" - dest: /opt/edge-register - copy: no - -- name: ief register - shell: ./register --mode=cert - args: - chdir: /opt/edge-register - register: ief_result - -- name: ief register message - debug: - var: ief_result - when: ief_result.changed diff --git a/ascend_deployer/playbooks/install/task_ief_a500pro.yml b/ascend_deployer/playbooks/install/task_ief_a500pro.yml deleted file mode 100644 index 92eea23e..00000000 --- a/ascend_deployer/playbooks/install/task_ief_a500pro.yml +++ /dev/null @@ -1,70 +0,0 @@ -- name: find cert_*.tar.gz a500pro - find: - path: "{{ resources_dir }}" - recurse: no - file_type: file - use_regex: no - patterns: "cert_*.tar.gz" - register: cert - -- name: find ief cert message - debug: - msg: - - "[ASCEND]can not find ief product cert, install ief failed" - when: cert.matched == 0 - failed_when: cert.matched == 0 - -- name: find edge-installer_*_arm64.tar.gz - find: - path: "{{ resources_dir }}" - recurse: no - file_type: file - use_regex: no - patterns: "edge-installer_*_arm64.tar.gz" - register: edge_installer_tar - -- name: find edge-register_*_arm64.tar.gz - find: - path: "{{ resources_dir }}" - recurse: no - file_type: file - use_regex: no - patterns: "edge-register_*_arm64.tar.gz" - register: edge_register_tar - -- name: find ief tool message - debug: - msg: - - "[ASCEND]can not find edge-installer or edge-register tar.gz, install ief failed" - when: - - edge_installer_tar.matched == 0 or edge_register_tar.matched == 0 - failed_when: edge_installer_tar.matched == 0 or edge_register_tar.matched == 0 - -- name: edge-installer tar.gz unarchive - unarchive: - src: "{{ edge_installer_tar.files[0].path }}" - dest: /opt - copy: no - -- name: edge-register tar.gz unarchive - unarchive: - src: "{{ edge_register_tar.files[0].path }}" - dest: /opt - copy: no - -- name: cert tar.gz unarchive - unarchive: - src: "{{ cert.files[0].path }}" - dest: /opt/edge-register - copy: no - -- name: ief register - shell: ./register --mode=cert - args: - chdir: /opt/edge-register - register: ief_result - -- name: ief register message - debug: - var: ief_result - when: ief_result.changed diff --git a/ascend_deployer/playbooks/kubeedge.yaml b/ascend_deployer/playbooks/kubeedge.yaml deleted file mode 100644 index 7a55a63e..00000000 --- a/ascend_deployer/playbooks/kubeedge.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# master install kubeedge -- hosts: master[0] - roles: - - role: mindx.kubeedge diff --git a/ascend_deployer/playbooks/process/process_install.yml b/ascend_deployer/playbooks/process/process_install.yml index 83470ce7..1bc3dc0e 100644 --- a/ascend_deployer/playbooks/process/process_install.yml +++ b/ascend_deployer/playbooks/process/process_install.yml @@ -18,22 +18,10 @@ import_playbook: ../install/install_npu.yml tags: driver,firmware,npu -- name: install atlasedge - import_playbook: ../install/install_atlasedge.yml - tags: atlasedge - - name: install docker images import_playbook: ../install/install_docker_images.yml tags: docker_images -- name: install ha - import_playbook: ../install/install_ha.yml - tags: ha - -- name: install ief - import_playbook: ../install/install_ief.yml - tags: ief - - name: install toolkit import_playbook: ../install/install_toolkit.yml tags: toolkit diff --git a/ascend_deployer/playbooks/process/process_scene.yml b/ascend_deployer/playbooks/process/process_scene.yml index 2837b558..ebacbf3a 100644 --- a/ascend_deployer/playbooks/process/process_scene.yml +++ b/ascend_deployer/playbooks/process/process_scene.yml @@ -10,10 +10,6 @@ import_playbook: ../scene/scene_auto.yml tags: auto -- name: install scene edge - import_playbook: ../scene/scene_edge.yml - tags: edge - - name: install scene mindspore import_playbook: ../scene/scene_mindspore.yml tags: mindspore_scene diff --git a/ascend_deployer/playbooks/scene/scene_edge.yml b/ascend_deployer/playbooks/scene/scene_edge.yml deleted file mode 100644 index 351a6f7c..00000000 --- a/ascend_deployer/playbooks/scene/scene_edge.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: '{{ hosts_name }}' - -- name: install system dependencies - import_playbook: ../install/install_sys_pkg.yml - -- name: install atlasedge - import_playbook: ../install/install_atlasedge.yml - -- name: install ha - import_playbook: ../install/install_ha.yml diff --git a/ascend_deployer/scripts/pkg_utils.py b/ascend_deployer/scripts/pkg_utils.py index d93c1ffe..97267b5b 100644 --- a/ascend_deployer/scripts/pkg_utils.py +++ b/ascend_deployer/scripts/pkg_utils.py @@ -20,21 +20,6 @@ tags_map = { 'name_keywords': ['driver', 'firmware', 'npu'], 'path_keywords': ['run_from_*_zip'] }, - 'atlasedge': { - 'need_nexus': False, - 'name_keywords': ['atlasedge', ], - 'path_keywords': ['run_from_*_zip'] - }, - 'ha': { - 'need_nexus': False, - 'name_keywords': ['ha', ], - 'path_keywords': ['run_from_*_zip'] - }, - 'ief': { - 'need_nexus': False, - 'name_keywords': ['ief', ], - 'path_keywords': ['run_from_*_zip'] - }, 'kernels': { 'need_nexus': False, 'name_keywords': ['kernels', ], @@ -80,11 +65,6 @@ tags_map = { 'name_keywords': ['npu', ], 'path_keywords': ['sources', 'run_from_*_zip', 'mindxdl/dlPackage', 'mindxdl/baseImages'] }, - 'edge': { - 'need_nexus': True, - 'name_keywords': ['atlasedge', 'ha'], - 'path_keywords': ['run_from_*_zip'] - }, 'mindspore': { 'need_nexus': True, 'name_keywords': [], diff --git a/ascend_deployer/scripts/uninstall_k8s_docker.sh b/ascend_deployer/scripts/uninstall_k8s_docker.sh deleted file mode 100644 index e47de33a..00000000 --- a/ascend_deployer/scripts/uninstall_k8s_docker.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -shopt -s expand_aliases -# 判断包管理 -use_dpkg=$(dpkg --help 2>&1 |wc -l) -if [[ $use_dpkg != 1 ]] -then - alias LIST="dpkg -l | egrep -i" - alias UNINSTALL="apt purge -y" -else - alias LIST="rpm -qa | egrep -i" - alias UNINSTALL="yum erase -y" -fi -# 卸载K8S -systemctl restart docker -kubeadm reset -f -UNINSTALL kubeadm kubectl kubelet kubernetes-cni - -# 卸载docker -echo "list docker packages" -for pkg in `LIST docker`; - do echo $pkg; -done - - -groupdel docker -for pkg in `LIST "docker|container"`; -do UNINSTALL $pkg; -done \ No newline at end of file diff --git a/ascend_deployer/start_deploy.py b/ascend_deployer/start_deploy.py index 8cf5dae7..e2751453 100644 --- a/ascend_deployer/start_deploy.py +++ b/ascend_deployer/start_deploy.py @@ -141,7 +141,7 @@ class CLI(object): self.upgrade = args.upgrade # list: [nnae, nnrt, ftplugin, toolkit] self.patch_rollback = args.patch_rollback - # str: auto, dl, edge, mindspre, offline_dev... + # str: auto, dl, mindspre, offline_dev... self.scene = args.scene # bool: false or true self.skip_check = args.skip_check diff --git a/ascend_deployer/yamls/k8s_reset.yaml b/ascend_deployer/yamls/k8s_reset.yaml deleted file mode 100644 index a31e96cd..00000000 --- a/ascend_deployer/yamls/k8s_reset.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- hosts: - - master - - worker - become: yes - tasks: - - name: reset k8s - shell: - cmd: - kubeadm reset -f && rm -rf $HOME/.kube /etc/cni/net.d /etc/kubernetes /var/lib/etcd/ || true; - iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X; - ignore_errors: true - changed_when: false -- Gitee