This is done on devstack
environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.2' | |
services: | |
ofelia: | |
image: mcuadros/ofelia:latest | |
command: daemon --docker | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro |
(Assuming a Debian 8-like system)
-
Install
prometheus-node-exporter
$ sudo apt update && sudo apt install prometheus-node-exporter
-
Configure
prometheus-node-exporter
to expose metrics only tolocalhost
, not on to all networks. Modify file/etc/default/prometheus-node-exporter
:# Set the command-line arguments to pass to the server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.7 | |
RUN apk --no-cache add bash jq netcat-openbsd bc | |
COPY docker-stats.sh /usr/local/bin/docker-stats.sh | |
ENTRYPOINT ["docker-stats.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
host=http://localhost:8080 | |
url=/pluginManager/installNecessaryPlugins | |
# git plugin https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin | |
curl -X POST -d '<jenkins><install plugin="[email protected]" /></jenkins>' --header 'Content-Type: text/xml' $host$url | |
# artifactory plugin https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin | |
curl -X POST -d '<jenkins><install plugin="[email protected]" /></jenkins>' --header 'Content-Type: text/xml' $host$url |