X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2Fiotgateway%2Fplaybooks%2Froles%2Fprometheus%2Ftasks%2Finstall.yml;h=2c0d05aaf84c57199d353126a73260354c20d5ed;hb=140ab71354801c7f38b7936b7534bd70e4a70b0b;hp=f8472b433de74cdb8374aaafa6b20c2717031ad0;hpb=98019264e44c1fb840c87ba81bc14f2df104f902;p=eliot.git diff --git a/blueprints/iotgateway/playbooks/roles/prometheus/tasks/install.yml b/blueprints/iotgateway/playbooks/roles/prometheus/tasks/install.yml index f8472b4..2c0d05a 100644 --- a/blueprints/iotgateway/playbooks/roles/prometheus/tasks/install.yml +++ b/blueprints/iotgateway/playbooks/roles/prometheus/tasks/install.yml @@ -33,6 +33,8 @@ - name: "INSTALL: Install prometheus on x86_64" shell: cmd: helm install mep-prometheus stable/prometheus --version v9.3.1 + ignore_errors: yes + no_log: True when: result is failed and ansible_architecture == 'x86_64' - name: "INSTALL: copy values.yaml to host" @@ -42,7 +44,24 @@ when: result is failed and ansible_architecture == 'aarch64' - name: "INSTALL: Install prometheus on aarch64" - shell: - cmd: 'helm install mep-prometheus - stable/prometheus -f /tmp/prometheus/values.yaml --version v9.3.1' + # 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