Page MenuHomePhabricator

Configure etcd for dse-k8s cluster
Closed, ResolvedPublic3 Estimated Story Points

Description

We have three VMs for this role now, so the next step is to bootstrap an etcd cluster on them.

As per the instructions here: https://wikitech.wikimedia.org/wiki/Etcd#Bootstrapping_an_etcd_cluster

Event Timeline

Change 819565 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/dns@master] Add DNS SRV records for dse-k8s etcd cluster

https://gerrit.wikimedia.org/r/819565

Change 820090 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Add an option to use the PKI for etcd intra-cluster certificates

https://gerrit.wikimedia.org/r/820090

Change 819565 merged by Btullis:

[operations/dns@master] Add DNS SRV records for dse-k8s etcd cluster

https://gerrit.wikimedia.org/r/819565

Change 820090 merged by Btullis:

[operations/puppet@production] Add an option to use the PKI for etcd intra-cluster certificates

https://gerrit.wikimedia.org/r/820090

Change 820416 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Bootstrap etcd on the dse_k8s_etcd cluster

https://gerrit.wikimedia.org/r/820416

Change 821186 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/dns@master] Replace underscores with hyphens in dse-k8s-etcd cluster

https://gerrit.wikimedia.org/r/821186

Change 821186 merged by Btullis:

[operations/dns@master] Replace underscores with hyphens in dse-k8s-etcd cluster

https://gerrit.wikimedia.org/r/821186

Change 820416 merged by Btullis:

[operations/puppet@production] Bootstrap etcd on the dse_k8s_etcd cluster

https://gerrit.wikimedia.org/r/820416

Change 821691 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Change ownership of etcd certificates for cfssl usecase

https://gerrit.wikimedia.org/r/821691

Change 821691 merged by Btullis:

[operations/puppet@production] Change ownership of etcd certificates for cfssl usecase

https://gerrit.wikimedia.org/r/821691

Change 821721 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Change the output directory that cfssl uses for etcd

https://gerrit.wikimedia.org/r/821721

Change 821721 merged by Btullis:

[operations/puppet@production] Change the output directory that cfssl uses for etcd

https://gerrit.wikimedia.org/r/821721

Change 821780 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Use the chained certificate for the etcd cfssl option

https://gerrit.wikimedia.org/r/821780

Status update, we have decided to use the cfssl based PKI for thie etcd cluster, as opposed to the PuppetCA certificates.
As such I have added a boolean option to the etcd::v3 profile called use_pki_certs.

When this option is true the get_cert function is called which automatically generates the required certificates for etcd to use.

However, since the etcd servers all use TLS client authentication to verify each other before the cluster can form, we will need to create a new intermediate as per the policy here: https://wikitech.wikimedia.org/wiki/PKI/Policy#When_to_create_a_new_intermediate_CA

I also need to verify that etcd can send the intermediate CA certificate chain along with the host's certificate, which is what https://gerrit.wikimedia.org/r/821780 aims to do.

Change 821780 merged by Btullis:

[operations/puppet@production] Use the chained certificate for the etcd cfssl option

https://gerrit.wikimedia.org/r/821780

Change 822053 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Add a new intermediate CA for use with etcd

https://gerrit.wikimedia.org/r/822053

Change 822053 merged by Btullis:

[operations/puppet@production] Add a new intermediate CA for use with etcd

https://gerrit.wikimedia.org/r/822053

Change 822086 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Configure the new intermediate CA for etcd use

https://gerrit.wikimedia.org/r/822086

Change 822089 had a related patch set uploaded (by Btullis; author: Btullis):

[labs/private@master] Add a dummy private key for the etcd intermediate CA

https://gerrit.wikimedia.org/r/822089

Change 822089 merged by Btullis:

[labs/private@master] Add a dummy private key for the etcd intermediate CA

https://gerrit.wikimedia.org/r/822089

Change 822086 merged by Btullis:

[operations/puppet@production] Configure the new intermediate CA for etcd use

https://gerrit.wikimedia.org/r/822086

Change 822118 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Use specific etcd intermediate CA to generate etcd certs in PKI mode

https://gerrit.wikimedia.org/r/822118

Change 822118 merged by Btullis:

[operations/puppet@production] Use specific etcd intermediate CA to generate etcd certs in PKI mode

https://gerrit.wikimedia.org/r/822118

Success:

btullis@dse-k8s-etcd1001:~$ etcdctl  -C https://dse-k8s-etcd1001.eqiad.wmnet:2379 cluster-health
member 5fdf30a4c955ab6 is healthy: got healthy result from https://dse-k8s-etcd1002.eqiad.wmnet:2379
member 352f48bc392d9ef9 is healthy: got healthy result from https://dse-k8s-etcd1001.eqiad.wmnet:2379
member bc33f1310f30f8fd is healthy: got healthy result from https://dse-k8s-etcd1003.eqiad.wmnet:2379
cluster is healthy

Change 822120 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Remove the bootstrap param from the dse-k8s-etcd cluster

https://gerrit.wikimedia.org/r/822120

Change 822120 merged by Btullis:

[operations/puppet@production] Remove the bootstrap param from the dse-k8s-etcd cluster

https://gerrit.wikimedia.org/r/822120