Reusable certificates
- store cert under /srv/salt/pki
- isolate certs per cluster name
- reclass overrides (openstack, wildcard)
diff --git a/salt/minion/cert/ceph/init.yml b/salt/minion/cert/ceph/init.yml
new file mode 100644
index 0000000..8b2e61c
--- /dev/null
+++ b/salt/minion/cert/ceph/init.yml
@@ -0,0 +1,12 @@
+parameters:
+ _param:
+ salt_minion_ca_authority: salt_master_ca
+ salt:
+ minion:
+ cert:
+ ceph:
+ host: ${_param:salt_minion_ca_host}
+ signing_policy: cert_server
+ authority: ${_param:salt_minion_ca_authority}
+ common_name: ${_param:cluster_public_host}
+
diff --git a/salt/minion/cert/ceph/openstack.yml b/salt/minion/cert/ceph/openstack.yml
new file mode 100644
index 0000000..664352d
--- /dev/null
+++ b/salt/minion/cert/ceph/openstack.yml
@@ -0,0 +1,11 @@
+classes:
+- system.salt.minion.cert.ceph
+parameters:
+ _param:
+ salt_pki_ceph_alt_names: IP:${_param:cluster_public_host},DNS:${_param:cluster_public_host}
+ salt:
+ minion:
+ cert:
+ ceph:
+ common_name: ceph
+ alternative_names: IP:127.0.0.1,${_param:salt_pki_ceph_alt_names}
diff --git a/salt/minion/cert/ceph/pki.yml b/salt/minion/cert/ceph/pki.yml
new file mode 100644
index 0000000..259fc38
--- /dev/null
+++ b/salt/minion/cert/ceph/pki.yml
@@ -0,0 +1,8 @@
+parameters:
+ salt:
+ minion:
+ cert:
+ ceph:
+ key_file: /srv/salt/pki/${_param:cluster_name}/ceph.${_param:cluster_public_host}.key
+ cert_file: /srv/salt/pki/${_param:cluster_name}/ceph.${_param:cluster_public_host}.crt
+ all_file: /srv/salt/pki/${_param:cluster_name}/ceph-with-key.${_param:cluster_public_host}.pem