From 41a53cc221a781f0bcbdcff64ba4497beb9bb535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Sat, 20 Jul 2024 04:26:02 +0100 Subject: [PATCH] remove portainer and promtail --- README.md | 7 +-- scripts/auto-update.sh | 2 - services/portainer/docker-run.sh | 5 -- services/promtail/config/promtail-config.yaml | 49 ------------------- services/promtail/docker-run.sh | 16 ------ 5 files changed, 2 insertions(+), 77 deletions(-) delete mode 100755 services/portainer/docker-run.sh delete mode 100644 services/promtail/config/promtail-config.yaml delete mode 100755 services/promtail/docker-run.sh diff --git a/README.md b/README.md index 305a6d8..eccb53b 100644 --- a/README.md +++ b/README.md @@ -98,14 +98,11 @@ docker volume create --driver local --opt type=none --opt device=/ --opt o=bind ### Portainer - mantained by ansible [myInfra.dev.homesrv01 role](ansible/roles/myInfra.dev.homesrv01/README.md) + mantained by ansible myInfra.docker.portainer role ### Promtail -#### Setup & Update -``` bash -services/promtail/docker-run.sh -``` +mantained by ansible myInfra.docker.promtail role ### telegraf diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index 3672136..214bf67 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -3,8 +3,6 @@ scriptPath="$(dirname "$(readlink -f "$0")")" doWork(){ apt update -y apt upgrade -y - #$scriptPath/../services/portainer/docker-run.sh - $scriptPath/../services/promtail/docker-run.sh $scriptPath/../services/telegraf/docker-run.sh $scriptPath/../services/code-server/docker-run.sh $scriptPath/../services/nginx/docker-run.sh diff --git a/services/portainer/docker-run.sh b/services/portainer/docker-run.sh deleted file mode 100755 index 5ff8da0..0000000 --- a/services/portainer/docker-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/bash -docker pull portainer/portainer-ce -docker stop portainer -docker rm portainer -docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer:/data portainer/portainer-ce \ No newline at end of file diff --git a/services/promtail/config/promtail-config.yaml b/services/promtail/config/promtail-config.yaml deleted file mode 100644 index dc2fb61..0000000 --- a/services/promtail/config/promtail-config.yaml +++ /dev/null @@ -1,49 +0,0 @@ -server: - http_listen_port: 9080 - grpc_listen_port: 0 - -positions: - filename: /tmp/positions.yaml - -clients: - - url: http://lansrv01.dev.lan:3100/loki/api/v1/push - -scrape_configs: - - job_name: varlogs - static_configs: - - targets: - - localhost - labels: - job: varlogs - host: homesrv01 - __path__: /var/log/*log - - job_name: systemd-journal - journal: - json: true - max_age: 12h - path: /var/log/journal - # matches: _TRANSPORT=kernel - labels: - job: systemd-journal - host: homesrv01 - relabel_configs: - - source_labels: ['__journal__systemd_unit'] - target_label: 'journal_systemd_unit' - - source_labels: ['__journal_syslog_identifier'] - target_label: 'journal_syslog_identifier' - - source_labels: ['__journal__hostname'] - target_label: 'journal_hostname' - - job_name: docker - docker_sd_configs: - - host: unix:///var/run/docker.sock - refresh_interval: 1s - pipeline_stages: - - static_labels: - host: "homesrv01" - job: "docker" - relabel_configs: - - source_labels: ['__meta_docker_container_name'] - regex: '/(.*)' - target_label: "container_name" - - source_labels: ['__meta_docker_container_id'] - target_label: "container_id" \ No newline at end of file diff --git a/services/promtail/docker-run.sh b/services/promtail/docker-run.sh deleted file mode 100755 index 3351e13..0000000 --- a/services/promtail/docker-run.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/bash -docker container stop promtail -docker container remove promtail - -scriptPath="$(dirname "$(readlink -f "$0")")" - -docker run -d \ ---name promtail \ --v ${scriptPath}/config:/mnt/config \ --v /var/log:/var/log \ --v /var/log/journal/:/var/log/journal/ \ --v /run/log/journal/:/run/log/journal/ \ --v /etc/machine-id:/etc/machine-id \ --v /var/run/docker.sock:/var/run/docker.sock \ -grafana/promtail:latest \ - -config.file=/mnt/config/promtail-config.yaml \ No newline at end of file