From: arvind.patel@huawei.com Date: Wed, 9 Dec 2020 01:55:22 +0000 (+0530) Subject: Log cleanup X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=8859b44dd9b6c1481243c48132c6e9e3be18ab40;p=ealt-edge.git Log cleanup Signed-off-by: arvind.patel@huawei.com Change-Id: I1f33f5190f7380e1334ae10269a6b32a2357ddb1 --- diff --git a/ocd/infra/playbooks/ealt-all-uninstall.yml b/ocd/infra/playbooks/ealt-all-uninstall.yml index c58298e..8c2b290 100644 --- a/ocd/infra/playbooks/ealt-all-uninstall.yml +++ b/ocd/infra/playbooks/ealt-all-uninstall.yml @@ -15,22 +15,6 @@ --- -############ OCD ############ - -- hosts: ocdconsolidated - become: yes - tags: - - ocdhost - - ocdconsolidated - - roles: - - eg_helm-repo - - eg_registry - - eg_certs - - helm - - k8s - - docker - ############ Center ############ ### EdgeGallery related ### @@ -138,3 +122,19 @@ roles: - k3s - docker + +############ OCD ############ + +- hosts: ocdconsolidated + become: yes + tags: + - ocdhost + - ocdconsolidated + + roles: + - eg_helm-repo + - eg_registry + - eg_certs + - helm + - k8s + - docker diff --git a/ocd/infra/playbooks/roles/docker/tasks/uninstall.yml b/ocd/infra/playbooks/roles/docker/tasks/uninstall.yml index f756489..f87496a 100644 --- a/ocd/infra/playbooks/roles/docker/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/docker/tasks/uninstall.yml @@ -57,6 +57,30 @@ when: result is succeeded and ansible_architecture == 'aarch64' #when: result is succeeded +- name: "UNINSTALL: Uninstall docker engine" + command: apt-get purge -y docker-engine + ignore_errors: yes + no_log: true + when: result is succeeded and ansible_architecture == 'x86_64' + +- name: "UNINSTALL: Uninstall docker" + command: apt-get purge -y docker + ignore_errors: yes + no_log: true + when: result is succeeded and ansible_architecture == 'x86_64' + +- name: "UNINSTALL: Uninstall docker.io" + command: apt-get purge -y docker.io + ignore_errors: yes + no_log: true + when: result is succeeded and ansible_architecture == 'x86_64' + +- name: "UNINSTALL: Uninstall docker.io" + command: apt-get purge docker-ce docker-ce-cli containerd.io + ignore_errors: yes + no_log: true + when: result is succeeded and ansible_architecture == 'x86_64' + - debug: msg: "CentOS commands start" @@ -65,3 +89,4 @@ cmd: yes | yum remove docker-ce docker-ce-cli containerd.io ignore_errors: yes no_log: true + when: ansible_facts['distribution'] == "CentOS" diff --git a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml index 699ef18..4ee0c36 100644 --- a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml @@ -16,11 +16,6 @@ --- -- name: Delete mecm-mepm secret - command: helm uninstall mecm-mepm-edgegallery - ignore_errors: yes - no_log: True - - name: Mecm mepm jwt delete # yamllint disable rule:line-length command: kubectl delete secret mecm-mepm-jwt-public-secret mecm-mepm-ssl-secret edgegallery-mepm-secret diff --git a/ocd/infra/playbooks/roles/eg_mep/tasks/uninstall.yml b/ocd/infra/playbooks/roles/eg_mep/tasks/uninstall.yml index fba5576..3cf66ef 100644 --- a/ocd/infra/playbooks/roles/eg_mep/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/eg_mep/tasks/uninstall.yml @@ -35,6 +35,11 @@ ignore_errors: yes no_log: True +- name: Delete dns namesapce metallb + command: kubectl delete secret memberlist -n metallb-system + ignore_errors: yes + no_log: True + - name: Delete ssl config namesapce mep command: kubectl delete ns mep ignore_errors: yes @@ -100,8 +105,3 @@ command: kubectl delete -f /tmp/eg_mep/deploy/conf/edge/metallb/namespace.yaml ignore_errors: yes no_log: True - -- name: Delete dns namesapce metallb - command: kubectl delete secret memberlist -n metallb-system - ignore_errors: yes - no_log: True diff --git a/ocd/infra/playbooks/roles/prometheus/tasks/install.yml b/ocd/infra/playbooks/roles/prometheus/tasks/install.yml index d8c4717..baac580 100644 --- a/ocd/infra/playbooks/roles/prometheus/tasks/install.yml +++ b/ocd/infra/playbooks/roles/prometheus/tasks/install.yml @@ -50,15 +50,21 @@ # yamllint disable rule:line-length command: helm install mep-prometheus stable/prometheus -f /tmp/prometheus/values.yaml --version v9.3.1 --set alertmanager.image.repository={{ vardata.private_repo_ip.name}}:{{ vardata.docker_registry_port.name}}/prom/alertmanager --set configmapReload.image.repository={{ vardata.private_repo_ip.name}}:{{ vardata.docker_registry_port.name}}/jimmidyson/configmap-reload --set nodeExporter.image.repository={{ vardata.private_repo_ip.name}}:{{ vardata.docker_registry_port.name}}/prom/node-exporter --set server.image.repository={{ vardata.private_repo_ip.name}}:{{ vardata.docker_registry_port.name}}/prom/prometheus --set pushgateway.image.repository={{ vardata.private_repo_ip.name}}:{{ vardata.docker_registry_port.name}}/prom/pushgateway --set kubeStateMetrics.image.repository={{ vardata.private_repo_ip.name}}:{{ vardata.docker_registry_port.name}}/carlosedp/kube-state-metrics --set alertmanager.image.pullPolicy=IfNotPresent --set configmapReload.image.pullPolicy=IfNotPresent --set nodeExporter.image.pullPolicy=IfNotPresent --set server.image.pullPolicy=IfNotPresent --set pushgateway.image.pullPolicy=IfNotPresent --set kubeStateMetrics.image.pullPolicy=IfNotPresent # yamllint disable rule:line-length + ignore_errors: yes + no_log: True when: result is failed and ansible_architecture == 'aarch64' - name: Expose promethious server # yamllint disable rule:line-length command: kubectl expose deployment mep-prometheus-server --type=NodePort --name nodeport-mep-prometheus-server # yamllint disable rule:line-length + ignore_errors: yes + no_log: True - name: Execute patch service with given port shell: # yamllint disable rule:line-length cmd: "kubectl patch service nodeport-mep-prometheus-server --type='json' --patch='[{ \"op\": \"replace\", \"path\": \"/spec/ports/0/nodePort\", \"value\":{{ vardata.prometheus_node_port.name }}}]'" # yamllint disable rule:line-length + ignore_errors: yes + no_log: True