added nodexporter

This commit is contained in:
2023-01-23 10:22:08 +00:00
parent 1a099bf574
commit 4a634afa2f
2 changed files with 31 additions and 34 deletions
+12 -34
View File
@@ -1,56 +1,34 @@
# docker-compose.yaml
version: '3.8'
networks:
jenkins:
volumes:
jenkins_home:
driver_opts:
type: nfs
o: addr=maurice,nfsvers=4
device: :/swarm/jenkins/home
o: addr=dockerstorage,nfsvers=4
device: :/swarm/stacks/jenkins/home
jenkins_certs:
driver_opts:
type: nfs
o: addr=maurice,nfsvers=4
device: :/swarm/jenkins/certs
o: addr=dockerstorage,nfsvers=4
device: :/swarm/stacks/jenkins/certs
services:
jenkins-docker:
image: docker:dind
networks:
jenkins:
aliases:
- docker
user: root
environment:
- DOCKER_TLS_CERTDIR=/certs
volumes:
- jenkins_home:/var/jenkins_home
- jenkins_certs:/certs/client
ports:
- 2376:2376
privileged: true
command: --storage-driver=overlay2
jenkins-blueocean:
image: jenkins/jenkins:2.375.2
networks:
- jenkins
jenkins:
image: docker:5000/jenkins-docker
ports:
- 8080:8080
- 50000:50000
environment:
- DOCKER_HOST=tcp://docker:2376
- DOCKER_CERT_PATH=/certs/client
- DOCKER_TLS_VERIFY=1
deploy:
placement:
constraints:
- "node.labels.highperformance==YES"
volumes:
- jenkins_home:/var/jenkins_home
- jenkins_certs:/certs/client
- /var/run/docker.sock:/var/run/docker.sock
+19
View File
@@ -0,0 +1,19 @@
version: '3'
services:
node-exporter:
image: prom/node-exporter:latest
deploy:
mode: global
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- "9100:9100"