From 1066c9b806a976010a5891ab45e223df251b5fee Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 16 Jun 2016 19:47:25 -0700 Subject: [PATCH 1/2] README: add dash, play.etcd.io, animated demo link --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ded78b56b..5d5624556 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ etcd is a distributed, consistent key-value store for shared configuration and s etcd is written in Go and uses the [Raft][raft] consensus algorithm to manage a highly-available replicated log. -etcd is used [in production by many companies](./Documentation/production-users.md), and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as [Kubernetes][k8s], [fleet][fleet], [locksmith][locksmith], [vulcand][vulcand], [Doorman][doorman], and many others. +etcd is used [in production by many companies](./Documentation/production-users.md), and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as [Kubernetes][k8s], [fleet][fleet], [locksmith][locksmith], [vulcand][vulcand], [Doorman][doorman], and many others. Reliability is further ensured by rigorous [testing][etcd-tests]. See [etcdctl][etcdctl] for a simple command line client. @@ -31,6 +31,7 @@ See [etcdctl][etcdctl] for a simple command line client. [locksmith]: https://github.com/coreos/locksmith [vulcand]: https://github.com/vulcand/vulcand [etcdctl]: https://github.com/coreos/etcd/tree/master/etcdctl +[etcd-tests]: http://dash.etcd.io ## Getting started @@ -63,7 +64,13 @@ ETCDCTL_API=3 etcdctl put mykey "this is awesome" ETCDCTL_API=3 etcdctl get mykey ``` -That's it! etcd is now running and serving client requests. +That's it! etcd is now running and serving client requests. For more + +- [Animated quick demo][demo-gif] +- [Interactive etcd playground][etcd-play] + +[demo-gif]: ./Documentation/demo.md +[etcd-play]: http://play.etcd.io/ ### etcd TCP ports From dde2aea21432e966adc5de03645264562dbc199e Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 16 Jun 2016 19:47:57 -0700 Subject: [PATCH 2/2] Documentation: add 'migrate' command example --- Documentation/demo.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/demo.md b/Documentation/demo.md index 2b2553a22..350ca8f3b 100644 --- a/Documentation/demo.md +++ b/Documentation/demo.md @@ -284,3 +284,31 @@ etcdctl --write-out=table --endpoints=$ENDPOINTS snapshot status my.db | c55e8b8 | 9 | 13 | 25 kB | +---------+----------+------------+------------+ ``` + + +## Migrate + +`migrate` to transform etcd v2 to v3 data: + +12_etcdctl_migrate_2016061602 + +``` +# write key in etcd version 2 store +export ETCDCTL_API=2 +etcdctl --endpoints=http://$ENDPOINT set foo bar + +# read key in etcd v2 +etcdctl --endpoints=$ENDPOINTS --output="json" get foo + +# stop etcd node to migrate, one by one + +# migrate v2 data +export ETCDCTL_API=3 +etcdctl --endpoints=$ENDPOINT migrate --data-dir="default.etcd" --wal-dir="default.etcd/member/wal" + +# restart etcd node after migrate, one by one + +# confirm that the key got migrated +etcdctl --endpoints=$ENDPOINTS get /foo +``` +