oso-f22-host-monitoring.service 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # This is a systemd file to run this docker container under systemd.
  2. # To make this work:
  3. # * pull the image (probably from ops docker registry)
  4. # * place this file in /etc/systemd/system without the .systemd extension
  5. # * run the commands:
  6. # systemctl daemon-reload
  7. # systemctl enable pcp-docker
  8. # systemctl start pcp-docker
  9. #
  10. #
  11. [Unit]
  12. Description=PCP Collector Contatainer
  13. Requires=docker.service
  14. After=docker.service
  15. [Service]
  16. Type=simple
  17. TimeoutStartSec=5m
  18. #Slice=container-small.slice
  19. ExecStartPre=-/usr/bin/docker rm "oso-f22-host-monitoring"
  20. ExecStart=/usr/bin/docker run --rm --name=oso-f22-host-monitoring \
  21. --privileged --net=host --pid=host --ipc=host \
  22. -v /sys:/sys:ro -v /etc/localtime:/etc/localtime:ro \
  23. -v /var/lib/docker:/var/lib/docker:ro -v /run:/run \
  24. -v /var/log:/var/log \
  25. docker-registry.ops.rhcloud.com/ops/oso-f22-host-monitoring
  26. ExecReload=-/usr/bin/docker stop "oso-f22-host-monitoring"
  27. ExecReload=-/usr/bin/docker rm "oso-f22-host-monitoring"
  28. ExecStop=-/usr/bin/docker stop "oso-f22-host-monitoring"
  29. [Install]
  30. WantedBy=default.target