From 05a11b742fd8faaa82b695c29453c4c3a7b4b0dc Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 20 Apr 2019 21:16:56 +0200 Subject: [PATCH] chore: add documentation --- docs/traefik-certs-dumper.md | 28 +++++++++ docs/traefik-certs-dumper_file.md | 36 +++++++++++ docs/traefik-certs-dumper_kv.md | 41 +++++++++++++ docs/traefik-certs-dumper_kv_boltdb.md | 43 +++++++++++++ docs/traefik-certs-dumper_kv_consul.md | 42 +++++++++++++ docs/traefik-certs-dumper_kv_etcd.md | 42 +++++++++++++ docs/traefik-certs-dumper_kv_zookeeper.md | 41 +++++++++++++ docs/traefik-certs-dumper_version.md | 35 +++++++++++ readme.md | 75 +++++++++++------------ 9 files changed, 344 insertions(+), 39 deletions(-) create mode 100644 docs/traefik-certs-dumper.md create mode 100644 docs/traefik-certs-dumper_file.md create mode 100644 docs/traefik-certs-dumper_kv.md create mode 100644 docs/traefik-certs-dumper_kv_boltdb.md create mode 100644 docs/traefik-certs-dumper_kv_consul.md create mode 100644 docs/traefik-certs-dumper_kv_etcd.md create mode 100644 docs/traefik-certs-dumper_kv_zookeeper.md create mode 100644 docs/traefik-certs-dumper_version.md diff --git a/docs/traefik-certs-dumper.md b/docs/traefik-certs-dumper.md new file mode 100644 index 0000000..4790da9 --- /dev/null +++ b/docs/traefik-certs-dumper.md @@ -0,0 +1,28 @@ +## traefik-certs-dumper + +Dump Let's Encrypt certificates from Traefik. + +### Synopsis + +Dump Let's Encrypt certificates from Traefik. + +### Options + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + -h, --help help for traefik-certs-dumper + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") +``` + +### SEE ALSO + +* [traefik-certs-dumper file](traefik-certs-dumper_file.md) - Dump the content of the "acme.json" file. +* [traefik-certs-dumper kv](traefik-certs-dumper_kv.md) - Dump the content of a KV store. +* [traefik-certs-dumper version](traefik-certs-dumper_version.md) - Display version + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_file.md b/docs/traefik-certs-dumper_file.md new file mode 100644 index 0000000..5c3dc50 --- /dev/null +++ b/docs/traefik-certs-dumper_file.md @@ -0,0 +1,36 @@ +## traefik-certs-dumper file + +Dump the content of the "acme.json" file. + +### Synopsis + +Dump the content of the "acme.json" file from Traefik to certificates. + +``` +traefik-certs-dumper file [flags] +``` + +### Options + +``` + -h, --help help for file + --source string Path to 'acme.json' file. (default "./acme.json") +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") +``` + +### SEE ALSO + +* [traefik-certs-dumper](traefik-certs-dumper.md) - Dump Let's Encrypt certificates from Traefik. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_kv.md b/docs/traefik-certs-dumper_kv.md new file mode 100644 index 0000000..3343203 --- /dev/null +++ b/docs/traefik-certs-dumper_kv.md @@ -0,0 +1,41 @@ +## traefik-certs-dumper kv + +Dump the content of a KV store. + +### Synopsis + +Dump the content of a KV store. + +### Options + +``` + --connection-timeout int Connection timeout in seconds. + --endpoints strings List of endpoints. (default [localhost:8500]) + -h, --help help for kv + --password string Password for connection. + --prefix string Prefix used for KV store. (default "traefik") + --username string Username for connection. + --watch Enable watching changes. +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") +``` + +### SEE ALSO + +* [traefik-certs-dumper](traefik-certs-dumper.md) - Dump Let's Encrypt certificates from Traefik. +* [traefik-certs-dumper kv boltdb](traefik-certs-dumper_kv_boltdb.md) - Dump the content of BoltDB. +* [traefik-certs-dumper kv consul](traefik-certs-dumper_kv_consul.md) - Dump the content of Consul. +* [traefik-certs-dumper kv etcd](traefik-certs-dumper_kv_etcd.md) - Dump the content of etcd. +* [traefik-certs-dumper kv zookeeper](traefik-certs-dumper_kv_zookeeper.md) - Dump the content of zookeeper. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_kv_boltdb.md b/docs/traefik-certs-dumper_kv_boltdb.md new file mode 100644 index 0000000..d4d1d71 --- /dev/null +++ b/docs/traefik-certs-dumper_kv_boltdb.md @@ -0,0 +1,43 @@ +## traefik-certs-dumper kv boltdb + +Dump the content of BoltDB. + +### Synopsis + +Dump the content of BoltDB. + +``` +traefik-certs-dumper kv boltdb [flags] +``` + +### Options + +``` + --bucket string Bucket for boltdb. (default "traefik") + -h, --help help for boltdb + --persist-connection Persist connection for boltdb. +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --connection-timeout int Connection timeout in seconds. + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --endpoints strings List of endpoints. (default [localhost:8500]) + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") + --password string Password for connection. + --prefix string Prefix used for KV store. (default "traefik") + --username string Username for connection. + --watch Enable watching changes. +``` + +### SEE ALSO + +* [traefik-certs-dumper kv](traefik-certs-dumper_kv.md) - Dump the content of a KV store. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_kv_consul.md b/docs/traefik-certs-dumper_kv_consul.md new file mode 100644 index 0000000..ce9250c --- /dev/null +++ b/docs/traefik-certs-dumper_kv_consul.md @@ -0,0 +1,42 @@ +## traefik-certs-dumper kv consul + +Dump the content of Consul. + +### Synopsis + +Dump the content of Consul. + +``` +traefik-certs-dumper kv consul [flags] +``` + +### Options + +``` + -h, --help help for consul + --token string Token for consul. +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --connection-timeout int Connection timeout in seconds. + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --endpoints strings List of endpoints. (default [localhost:8500]) + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") + --password string Password for connection. + --prefix string Prefix used for KV store. (default "traefik") + --username string Username for connection. + --watch Enable watching changes. +``` + +### SEE ALSO + +* [traefik-certs-dumper kv](traefik-certs-dumper_kv.md) - Dump the content of a KV store. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_kv_etcd.md b/docs/traefik-certs-dumper_kv_etcd.md new file mode 100644 index 0000000..b7077c0 --- /dev/null +++ b/docs/traefik-certs-dumper_kv_etcd.md @@ -0,0 +1,42 @@ +## traefik-certs-dumper kv etcd + +Dump the content of etcd. + +### Synopsis + +Dump the content of etcd. + +``` +traefik-certs-dumper kv etcd [flags] +``` + +### Options + +``` + -h, --help help for etcd + --sync-period int Sync period for etcd in seconds. +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --connection-timeout int Connection timeout in seconds. + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --endpoints strings List of endpoints. (default [localhost:8500]) + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") + --password string Password for connection. + --prefix string Prefix used for KV store. (default "traefik") + --username string Username for connection. + --watch Enable watching changes. +``` + +### SEE ALSO + +* [traefik-certs-dumper kv](traefik-certs-dumper_kv.md) - Dump the content of a KV store. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_kv_zookeeper.md b/docs/traefik-certs-dumper_kv_zookeeper.md new file mode 100644 index 0000000..9e275b6 --- /dev/null +++ b/docs/traefik-certs-dumper_kv_zookeeper.md @@ -0,0 +1,41 @@ +## traefik-certs-dumper kv zookeeper + +Dump the content of zookeeper. + +### Synopsis + +Dump the content of zookeeper. + +``` +traefik-certs-dumper kv zookeeper [flags] +``` + +### Options + +``` + -h, --help help for zookeeper +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --connection-timeout int Connection timeout in seconds. + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --endpoints strings List of endpoints. (default [localhost:8500]) + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") + --password string Password for connection. + --prefix string Prefix used for KV store. (default "traefik") + --username string Username for connection. + --watch Enable watching changes. +``` + +### SEE ALSO + +* [traefik-certs-dumper kv](traefik-certs-dumper_kv.md) - Dump the content of a KV store. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/docs/traefik-certs-dumper_version.md b/docs/traefik-certs-dumper_version.md new file mode 100644 index 0000000..2a40ad3 --- /dev/null +++ b/docs/traefik-certs-dumper_version.md @@ -0,0 +1,35 @@ +## traefik-certs-dumper version + +Display version + +### Synopsis + +Display version + +``` +traefik-certs-dumper version [flags] +``` + +### Options + +``` + -h, --help help for version +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $HOME/.traefik-certs-dumper.yaml) + --crt-ext string The file extension of the generated certificates. (default ".crt") + --crt-name string The file name (without extension) of the generated certificates. (default "certificate") + --dest string Path to store the dump content. (default "./dump") + --domain-subdir Use domain as sub-directory. + --key-ext string The file extension of the generated private keys. (default ".key") + --key-name string The file name (without extension) of the generated private keys. (default "privatekey") +``` + +### SEE ALSO + +* [traefik-certs-dumper](traefik-certs-dumper.md) - Dump Let's Encrypt certificates from Traefik. + +###### Auto generated by spf13/cobra on 20-Apr-2019 diff --git a/readme.md b/readme.md index 6a33fa4..967a980 100644 --- a/readme.md +++ b/readme.md @@ -43,47 +43,16 @@ docker run ldez/traefik-certs-dumper: ## Usage -```yaml -Dump the content of the "acme.json" file from Traefik to certificates. - -Usage: - traefik-certs-dumper [command] - -Available Commands: - dump Dump Let's Encrypt certificates from Traefik - help Help about any command - version Display version - -Flags: - -h, --help help for certs-dumper - --version version for certs-dumper - -Use "traefik-certs-dumper [command] --help" for more information about a command. -``` - -```yaml -Dump the content of the "acme.json" file from Traefik to certificates. - -Usage: - traefik-certs-dumper dump [flags] - -Flags: - --crt-ext string The file extension of the generated certificates. (default ".crt") - --crt-name string The file name (without extension) of the generated certificates. (default "certificate") - --dest string Path to store the dump content. (default "./dump") - --domain-subdir Use domain as sub-directory. - -h, --help help for dump - --key-ext string The file extension of the generated private keys. (default ".key") - --key-name string The file name (without extension) of the generated private keys. (default "privatekey") - --source string Path to 'acme.json' file. (default "./acme.json") -``` +- [traefik-certs-dumper](docs/traefik-certs-dumper.md) +- [traefik-certs-dumper file](docs/traefik-certs-dumper_file.md) +- [traefik-certs-dumper kv](docs/traefik-certs-dumper_kv.md) ## Examples ### Simple Dump ```console -$ traefik-certs-dumper dump +$ traefik-certs-dumper file dump ├──certs │ └──my.domain.com.key @@ -96,7 +65,7 @@ dump ### Change source and destination ```console -$ traefik-certs-dumper dump --source ./acme.json --dest ./dump/test +$ traefik-certs-dumper file --source ./acme.json --dest ./dump/test test ├──certs │ └──my.domain.com.key @@ -109,7 +78,7 @@ test ### Use domain as sub-directory ```console -$ traefik-certs-dumper dump --domain-subdir=true +$ traefik-certs-dumper file --domain-subdir=true dump ├──my.domain.com │ ├──certificate.crt @@ -121,7 +90,7 @@ dump #### Change file extension ```console -$ traefik-certs-dumper dump --domain-subdir=true --crt-ext=.pem --key-ext=.pem +$ traefik-certs-dumper file --domain-subdir=true --crt-ext=.pem --key-ext=.pem dump ├──my.domain.com │ ├──certificate.pem @@ -133,7 +102,7 @@ dump #### Change file name ```console -$ traefik-certs-dumper dump --domain-subdir=true --crt-name=fullchain --key-name=privkey +$ traefik-certs-dumper file --domain-subdir=true --crt-name=fullchain --key-name=privkey dump ├──my.domain.com │ ├──fullchain.crt @@ -141,3 +110,31 @@ dump └──private └──letsencrypt.key ``` + +### KV store + +#### Consul + +```console +$ traefik-certs-dumper kv consul --endpoints localhost:8500 +``` + +#### Etcd + +```console +$ traefik-certs-dumper kv etcd --endpoints localhost:2379 +``` + +#### Boltdb + +```console +$ traefik-certs-dumper kv boltdb --endpoints /the/path/to/mydb.db +``` + +#### Zookeeper + +```console +$ traefik-certs-dumper kv zookeeper --endpoints localhost:2181 +``` + +