ldez/traefik-certs-dumper

support --acme.storage

SvenDowideit opened this issue · 21 comments

it seems "someone" set ours to not-the-default

(I've just forked your repo, and will take a look - obviously this is unusual :)

ldez commented

Hello,

Maybe you are looking for :

--source string    Path to 'acme.json' file. (default "./acme.json")

https://github.com/ldez/traefik-certs-dumper/blob/master/docs/traefik-certs-dumper_file.md

does that get used for the kv suffix too?

ldez commented
--prefix string            Prefix used for KV store. (default "traefik")

https://github.com/ldez/traefik-certs-dumper/blob/master/docs/traefik-certs-dumper_kv.md

that's only the prefix - it seems someone put the accounts info into /traefic/acme/object

that said, I think i'm having some issue-between screen and keyboard thing (I setup a test traefik that's more normal, and even there, i'm having something go wrong):

sven@yoga260:~/src/csiro/onaci/swarm-infra$ docker run --network traefik_internal ldez/traefik-certs-dumper kv etcd --endpoints etcd:2379 --prefix /traefik
Error: unable to retrieve /traefik/acme/account/object value: Key not found in store
....

2019/10/09 00:32:25 root.go:46: unable to retrieve /traefik/acme/account/object value: Key not found in store
sven@yoga260:~/src/csiro/onaci/swarm-infra$ docker run --rm -it --network traefik_internal appcelerator/etcd etcdctl get /traefik/acme/account/object --prefix --endpoints etcd:2379 
/traefik/acme/account/object
���˓�8�����Y��ә���������
ldez commented

I will add an option for the suffix/storage.

That's what i was making a PR for... but it looks like I have more problems than just that

ldez commented

The suffix is an option now:

--suffix string            Suffix/Storage used for KV store. (default "/acme/account/object")

https://github.com/ldez/traefik-certs-dumper/blob/master/docs/traefik-certs-dumper_kv.md

looks like we made the same changes. >branch deleted<

but even so, traefik-certs-dumper seem to be telling me /traefik/acme/account/object not found, whereas ectdctl gives me a binary blob as expected. I guess I need to look into how to get valkeyrie to output debug info

ldez commented

are you using etcd v2 or v3 ?

v3

      "--etcd",
      "--etcd.endpoint=etcd:2379",
      "--etcd.watch=true",
      "--etcd.prefix=/traefik",
      "--etcd.useAPIV3=true",
      "--acme=true",
      "--acme.entrypoint=https",
      "--acme.acmelogging=true",
      "--acme.email=sven.dowideit@csiro.au",
      "--acme.onhostrule=true",
      "--acme.domains=*.${STACKDOMAIN:-loc.alho.st}",
      "--acme.storage=/traefik/acme/account",
      "--acme.${ACMECHALLENGE:-http}challenge=true",
      "--acme.${ACMECHALLENGEOPT:-httpchallenge.entrypoint=http}",
      "--acme.dnschallenge.resolvers=1.1.1.1:53",
      "--acme.dnschallenge.disablepropagationcheck=true",
      "--acme.dnschallenge.DelayBeforeCheck=10",
ldez commented

ok I think I find the issue:

config.Backend = store.ETCD

ETCD = etcd v2

oooo nice! makes the struggle worth it :)

ldez commented

now you can choose the etcd version e309f6b

I keep v2 as default for compatibility.

doomed :)

sven@yoga260:~/src/csiro/onaci/swarm-infra$ docker run --network traefik_internal test kv etcd --endpoints etcd:2379  --etcd-version etcdv3
Error: unable to create client of the store: Backend storage not supported yet, please choose one of 


ldez commented

Sorry it's my fault wait a bit.

ldez commented

e07b613

Could you retry?

YAY, Success!

docker run --network traefik_internal test kv etcd --endpoints etcd:2379  --etcd-version etcdv3 --prefix /traefik

works.

its odd to me that its only working with adding a leading slash on the suffix

ldez commented

Great! I will create a release.

Thank you for the tests.

mmm, other weirdness - i picked etcdv3 because i read that v2 was deprecated - ala

/usr/local/bin/traefik storeconfig --loglevel=DEBUG --etcd
WARN[0000] The ETCD API V2 is deprecated. Please use API V3 instead

thanks for the help, and the code! :)