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

initial v3 demo #3248

Merged
merged 7 commits into from
Aug 10, 2015
Merged

initial v3 demo #3248

merged 7 commits into from
Aug 10, 2015

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Aug 8, 2015

A non-clustered version of v3 key API, which includes put, range, delete
It will also include a demo command line tool.

Will follow-up with txn support.

start etcd server with v3 demo

go build
./etcd -v3demo
...

play with initial ctl

cd etcdctlv3
go build

./etcdctlv3 put foo bar
foo bar

./etcdctlv3 put foo1 bar1
foo1 bar1

./etcdctlv3 range foo
foo bar

./etcdctlv3 range foo z_last
foo bar
foo1 bar1

./etcdctlv3 delete-range foo
key foo is deleted

./etcdctlv3 delete-range foo z_last
range [foo, z_last) is deleted

./etcdctlv3 range foo z_last
(empty)

@xiang90 xiang90 added this to the v2.2.0-alpha0 milestone Aug 8, 2015
@xiang90 xiang90 changed the title WIP: initial v3 demo initial v3 demo Aug 8, 2015
@@ -208,6 +210,9 @@ func NewConfig() *config {
// version
fs.BoolVar(&cfg.printVersion, "version", false, "Print the version and exit")

// demo flag
fs.BoolVar(&cfg.v3demo, "v3demo", false, "Enable v3 demo")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have something that seems scarier? --enable-experimental-v3demo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@chancez
Copy link
Contributor

chancez commented Aug 9, 2015

Any reason the etcdctl doesn't just have a flag to enable the v3 api, changing the CLI params from those of v2? This would be more consistent with how you set up the server, also would allow for easier experimenting without having to build in another CLI tool. (I'm thinking if we ship experimental v3 features gated by feature flags in the CoreOS image, you don't want another CLI tool to bundle).

@xiang90
Copy link
Contributor Author

xiang90 commented Aug 9, 2015

@ecnahc515 Server and command line tool are different. We already have decent endpoint control on server side. We will end up with adding version prefix to the command line tool, which is ugly and worser than having the version separate in my opinion. If anyone holds very strong opinion on this, we might consider to combine them. In a word, I would like to have them as separate as possible at this point (demo).

To answer your CoreOS question, we do not really expect users to try it out; we expect developers to try it out at this point. So we do not even need to ship the clt in CoreOS image.

@chancez
Copy link
Contributor

chancez commented Aug 9, 2015

I think the best way for developers to try this out is running the demo on CoreOS, just behind a feature flag is all. I don't have a huge opinion one way or another either, just was curious.

@yichengq
Copy link
Contributor

pretty nice. it is good overall.

For CoreOS running, I think users should use etcd binary to test it out. This is much easier and controllable.

### Experimental Flags

##### -experimental-v3demo
+ Enable experimental v3 demo API
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a link to docs

@philips
Copy link
Contributor

philips commented Aug 10, 2015

change v3etcdctl to etcdctlv3?

@xiang90
Copy link
Contributor Author

xiang90 commented Aug 10, 2015

@philips All fixed.

@xiang90
Copy link
Contributor Author

xiang90 commented Aug 10, 2015

I am merging this. I will iterate on this one quickly.

xiang90 added a commit that referenced this pull request Aug 10, 2015
@xiang90 xiang90 merged commit a718329 into etcd-io:master Aug 10, 2015
@xiang90 xiang90 deleted the v3 branch August 10, 2015 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants