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/salt/master/formula/git/monitoring.yml b/salt/master/formula/git/monitoring.yml
new file mode 100644
index 0000000..e0cf30d
--- /dev/null
+++ b/salt/master/formula/git/monitoring.yml
@@ -0,0 +1,14 @@
+parameters:
+ salt:
+ master:
+ environment:
+ dev:
+ formula:
+ prometheus:
+ source: git
+ address: '${_param:salt_master_environment_repository}/salt-formula-prometheus.git'
+ revision: ${_param:salt_master_environment_revision}
+ telegraf:
+ source: git
+ address: '${_param:salt_master_environment_repository}/salt-formula-telegraf.git'
+ revision: ${_param:salt_master_environment_revision}
diff --git a/salt/master/formula/pkg/monitoring.yml b/salt/master/formula/pkg/monitoring.yml
new file mode 100644
index 0000000..375cbd8
--- /dev/null
+++ b/salt/master/formula/pkg/monitoring.yml
@@ -0,0 +1,12 @@
+parameters:
+ salt:
+ master:
+ environment:
+ prd:
+ formula:
+ prometheus:
+ source: pkg
+ name: salt-formula-prometheus
+ telegraf:
+ source: pkg
+ name: salt-formula-telegraf
diff --git a/salt/master/git.yml b/salt/master/git.yml
index bcde77c..02d0b67 100644
--- a/salt/master/git.yml
+++ b/salt/master/git.yml
@@ -6,6 +6,7 @@
- system.salt.master.formula.git.openstack
- system.salt.master.formula.git.saltstack
- system.salt.master.formula.git.stacklight
+- system.salt.master.formula.git.monitoring
parameters:
_param:
salt_master_environment_repository: "https://github.com/salt-formulas"
diff --git a/salt/master/pkg.yml b/salt/master/pkg.yml
index 7686f07..046512f 100644
--- a/salt/master/pkg.yml
+++ b/salt/master/pkg.yml
@@ -6,4 +6,5 @@
- system.salt.master.formula.pkg.openstack
- system.salt.master.formula.pkg.saltstack
- system.salt.master.formula.pkg.stacklight
+- system.salt.master.formula.pkg.monitoring
- system.linux.system.repo.tcp_salt
diff --git a/salt/minion/cert/k8s_client_prometheus.yml b/salt/minion/cert/k8s_client_prometheus.yml
new file mode 100644
index 0000000..04cd374
--- /dev/null
+++ b/salt/minion/cert/k8s_client_prometheus.yml
@@ -0,0 +1,12 @@
+parameters:
+ salt:
+ minion:
+ cert:
+ k8s_client_prometheus:
+ host: ${_param:salt_minion_ca_host}
+ authority: ${_param:salt_minion_ca_authority}
+ key_file: /srv/volumes/prometheus-config/kubelet-client.key
+ cert_file: /srv/volumes/prometheus-config/kubelet-client.crt
+ common_name: kubelet-client
+ signing_policy: cert_client
+ alternative_names: IP:${_param:cluster_vip_address},IP:${_param:cluster_node01_address},IP:${_param:cluster_node02_address},IP:${_param:cluster_node03_address},IP:${_param:kubernetes_internal_api_address}