Add prometheus monitoring to reclass
Add:
* glusterfs server volume
* glusterfs client
* ssl keys for kubernetes
* prometheus related formulas
* telegraf system reclass
* prometheus system reclass
* docker swarm network
* docker swarm services:
- prometheus
- alertmanager
- pushgateway
- grafana
Change-Id: I4a5a60f35f4c96ca41ac2e94f27c7aefbc286cbf
diff --git a/docker/swarm/network/monitoring.yml b/docker/swarm/network/monitoring.yml
new file mode 100644
index 0000000..a049aac
--- /dev/null
+++ b/docker/swarm/network/monitoring.yml
@@ -0,0 +1,8 @@
+parameters:
+ docker:
+ client:
+ network:
+ monitoring:
+ driver: overlay
+ opt:
+ encrypted: true
diff --git a/docker/swarm/service/dashboard/grafana_server.yml b/docker/swarm/service/dashboard/grafana_server.yml
new file mode 100644
index 0000000..4ed587e
--- /dev/null
+++ b/docker/swarm/service/dashboard/grafana_server.yml
@@ -0,0 +1,13 @@
+parameters:
+ docker:
+ client:
+ service:
+ grafana_server:
+ replica: 1
+ environment:
+ GF_SECURITY_ADMIN_PASSWORD: ${_param:grafana_admin_password}
+ restart:
+ condition: any
+ image: ${_param:docker_image_grafana}
+ ports:
+ - 15013:3000
diff --git a/docker/swarm/service/monitoring/prometheus_alertmanager.yml b/docker/swarm/service/monitoring/prometheus_alertmanager.yml
new file mode 100644
index 0000000..74b20f5
--- /dev/null
+++ b/docker/swarm/service/monitoring/prometheus_alertmanager.yml
@@ -0,0 +1,23 @@
+include:
+- service.prometheus.alertmanager.container
+parameters:
+ docker:
+ client:
+ service:
+ prometheus_alertmanager:
+ network: monitoring
+ replica: 2
+ environment:
+ config_dir: /opt/alertmanager/config
+ bind_port: ${prometheus:alertmanager:bind:port}
+ bind_address: ${prometheus:alertmanager:bind:address}
+ restart:
+ condition: any
+ image: ${_param:docker_image_alertmanager}
+ ports:
+ - 15011:${prometheus:alertmanager:bind:port}
+ volume:
+ site:
+ type: bind
+ source: /srv/volumes/prometheus-config
+ destination: /opt/alertmanager/config
diff --git a/docker/swarm/service/monitoring/prometheus_pushgateway.yml b/docker/swarm/service/monitoring/prometheus_pushgateway.yml
new file mode 100644
index 0000000..7ba37af
--- /dev/null
+++ b/docker/swarm/service/monitoring/prometheus_pushgateway.yml
@@ -0,0 +1,12 @@
+parameters:
+ docker:
+ client:
+ service:
+ prometheus_pushgateway:
+ network: monitoring
+ replica: 2
+ restart:
+ condition: any
+ image: ${_param:docker_image_pushgateway}
+ ports:
+ - 15012:9091
diff --git a/docker/swarm/service/monitoring/prometheus_server.yml b/docker/swarm/service/monitoring/prometheus_server.yml
new file mode 100644
index 0000000..24a9193
--- /dev/null
+++ b/docker/swarm/service/monitoring/prometheus_server.yml
@@ -0,0 +1,29 @@
+include:
+- service.prometheus.server.container
+parameters:
+ docker:
+ client:
+ service:
+ prometheus_server:
+ network: monitoring
+ replica: 1
+ environment:
+ config_dir: /opt/prometheus/config
+ bind_port: ${prometheus:server:bind:port}
+ bind_address: ${prometheus:server:bind:address}
+ alertmanager_port: ${prometheus:alertmanager:bind:port}
+ storage_local_engine: ${prometheus:server:storage:local:engine}
+ storage_local_retention: ${prometheus:server:storage:local:retention}
+ storage_local_memory_chunks: ${prometheus:server:storage:local:memory_chunks}
+ storage_local_max_chunks_to_persist: ${prometheus:server:storage:local:max_chunks_to_persist}
+ storage_local_num_fingerprint_mutexes: ${prometheus:server:storage:local:num_fingerprint_mutexes}
+ restart:
+ condition: any
+ image: ${_param:docker_image_prometheus}
+ ports:
+ - 15010:${prometheus:server:bind:port}
+ volume:
+ site:
+ type: bind
+ source: /srv/volumes/prometheus-config
+ destination: /opt/prometheus/config