Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command storeconfig #551

Merged
merged 1 commit into from
Jul 22, 2016
Merged

Conversation

cocap10
Copy link

@cocap10 cocap10 commented Jul 21, 2016

This PR adds the command storeconfig which stores the static traefik configuration into a Key-value stores.

TODO :

  • code test-integration
  • review code
  • review doc

@cocap10 cocap10 force-pushed the upload-config-kv branch 5 times, most recently from e882005 to eacd025 Compare July 21, 2016 13:42
@cocap10 cocap10 changed the title WIP : Add command storeconfig Add command storeconfig Jul 21, 2016
To do that, we can send the Key-value pairs via [curl commands](https://www.consul.io/intro/getting-started/kv.html) or via the [Web UI](https://www.consul.io/intro/getting-started/ui.html).

Hopefully, we had automated this process with the `storeconfig` Træfɪk command.
Please refer to the [store Træfɪk configuration](/user-guide/kv-config/#store-configuration-in-key-value-store) section to get documentation on it.

Here the toml configuration we would like to store in the Key-value Store :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is

@emilevauge
Copy link
Member

You should specify that "In case you are setting key values manually", because you were talking about using storeconfig https://github.com/containous/traefik/pull/551/files?diff=unified#diff-91724a2dd65e9b63a22411496e3b9968R115

# Store configuration in Key-value store

The static Træfɪk configuration can be automatically uploaded form Træfɪk into a Key-value Store.
Copy link
Member

@emilevauge emilevauge Jul 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uration can be automatically -> soooo much spaces ^^

@emilevauge
Copy link
Member

Well done @cocap10 🎉
I made few comments.

/cc @containous/traefik

@cocap10
Copy link
Author

cocap10 commented Jul 22, 2016

Thank you @emilevauge
I modified where you commented ;)
Hope is ok now :)

@cocap10
Copy link
Author

cocap10 commented Jul 22, 2016

And rebased ;)


Here the toml configuration we would like to store in the Key-value Store :
Hopefully, we had automated this process with the `storeconfig` Træfɪk command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum not sure about the past here.

Hopefully, Træfɪk allows automation of this process using the `storeconfig` subcommand.

@vdemeester vdemeester added this to the 1.1 milestone Jul 22, 2016
@vdemeester
Copy link
Contributor

I guess it's for 1.1, so I added the milestone.

@cocap10 few nits/comments but overall looks pretty good !

os.Exit(-1)
}
// IF a KV Store is enable and no sub-command called in agrs
if kv != nil && usedCmd == traefikCmd {
s.AddSource(kv)
if _, err := s.LoadConfig(); err != nil {
fmtlog.Println(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No exit here ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cocap10 cocap10 force-pushed the upload-config-kv branch 2 times, most recently from 5ed8ed4 to a0ac6d6 Compare July 22, 2016 11:31
add test integration command storeconfig

update doc
@emilevauge
Copy link
Member

LGTM

@vdemeester
Copy link
Contributor

LGTM 🐸

@vdemeester vdemeester merged commit 986ad9f into traefik:master Jul 22, 2016
@Russell-IO
Copy link
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants