Skip to content

Instantly share code, notes, and snippets.

@fgbreel
Last active January 4, 2017 20:15
Show Gist options
  • Save fgbreel/0fd51d5e0e2949e25a753334964f8d4c to your computer and use it in GitHub Desktop.
Save fgbreel/0fd51d5e0e2949e25a753334964f8d4c to your computer and use it in GitHub Desktop.
nginx:
pkg.installed
git-core:
pkg.installed
apt-transport-https:
pkg.installed
https://github.com/fgbreel/fabio.git:
git.latest:
- rev: master
- target: /tmp/fabio
- force_reset: True
- require:
- pkg: git-core
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner.git:
git.latest:
- rev: master
- target: /tmp/gitlab-ci-multi-runner
- require:
- pkg: git-core
deb https://apt.dockerproject.org/repo debian-stretch main:
pkgrepo.managed:
- keyid: 58118E89F3A912897C070ADBF76221572C52609D
- keyserver: hkp://ha.pool.sks-keyservers.net:80
- require_in:
- pkg: docker-engine
- require:
- pkg: apt-transport-https
pkg.latest:
- name: docker-engine
/tmp/gitlab-ci-multi-runner:
file.directory:
- user: fgbreel
- group: fgbreel
- recurse:
- user
- group
- require:
- git: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner.git
deb https://packagecloud.io/grafana/stable/debian/ jessie main:
pkgrepo.managed:
- key_url: https://packagecloud.io/gpg.key
- file: /etc/apt/sources.list.d/grafana.list
- require:
- pkg: apt-transport-https
pkg.latest:
- name: grafana
service.running:
- name: grafana-server
- enable: True
prometheus:
archive.extracted:
- name: /usr/local/prometheus
- source: https://github.com/prometheus/prometheus/releases/download/v1.4.1/prometheus-1.4.1.linux-amd64.tar.gz
- archive_format: tar
- skip_verify: True
- tar_options: --strip-components=1
- user: prometheus
user.present:
- name: prometheus
- home: /usr/local/prometheus
file.managed:
- name: /etc/systemd/system/prometheus.service
- contents: |
[Unit]
Description=Monitoring system and time series database
Documentation=https://prometheus.io/docs/introduction/overview/
[Service]
Restart=always
User=prometheus
WorkingDirectory=/usr/local/prometheus
ExecStart=/usr/local/prometheus/prometheus -config.file=/usr/local/prometheus/prometheus.yml
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=20s
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
service.running:
- name: prometheus
- enable: True
base:
desktop:
- mystate
- grafana
- prometheus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment