From 53e8782cd3ff966b6bb962f038faa05261b0d985 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sat, 27 Jul 2013 12:12:58 -0700 Subject: [PATCH 1/3] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9692c76e7..147ad5579 100644 --- a/README.md +++ b/README.md @@ -369,9 +369,13 @@ The first server we set up should be the leader, if it has not dead during these Now we can do normal SET and GET operations on keys as we explored earlier. ```sh -curl http://127.0.0.1:4001/v1/keys/foo -d value=bar +curl http://127.0.0.1:4001/v1/keys/foo -d value=bar -L ``` +When the client sends a sensitive command (```set```, ```delete```, ```testAndset``` ) to the server, the command needs to be redirect to the leader of the cluster. +So we add the ``` -L ``` flag to make curl follow location hints in http location header when there is a redirection http response. + +The response should be ```json {"action":"SET","key":"/foo","value":"bar","newKey":true,"index":5} ``` From 3f53e4fc97daaaa0b306283d95e04d71bc7c8e0b Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sat, 27 Jul 2013 12:20:40 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 147ad5579..4063b061a 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ which meas `foo=barbar` is a key-value pair under `/foo` and `foo_dir` is a dire #### Using HTTPS between server and client Etcd supports SSL/TLS and client cert authentication for clients to server, as well as server to server communication -Before that we need to have a CA cert```clientCA.crt``` and signed key pair ```client.crt, client.key``` . +Before that we need to have a CA cert`clientCA.crt` and signed key pair `client.crt, client.key` . This site has a good reference for how to generate self-signed key pairs ```url @@ -251,8 +251,8 @@ http://www.g-loaded.eu/2005/11/10/be-your-own-ca/ ./etcd -clientCert client.crt -clientKey client.key -i ``` -```-i``` is to ignore the previously created default configuration file. -```-clientCert``` and ```-clientKey``` are the key and cert for transport layer security between client and server +`-i` is to ignore the previously created default configuration file. +`-clientCert` and `-clientKey` are the key and cert for transport layer security between client and server ```sh curl https://127.0.0.1:4001/v1/keys/foo -d value=bar -v -k @@ -371,7 +371,7 @@ Now we can do normal SET and GET operations on keys as we explored earlier. ```sh curl http://127.0.0.1:4001/v1/keys/foo -d value=bar -L ``` -When the client sends a sensitive command (```set```, ```delete```, ```testAndset``` ) to the server, the command needs to be redirect to the leader of the cluster. +When the client sends a sensitive command (`set`, `delete`, `testAndset` ) to the server, the command needs to be redirect to the leader of the cluster. So we add the ``` -L ``` flag to make curl follow location hints in http location header when there is a redirection http response. From 7d876fc4147ff2c103f75f31e1baef7bdb69ada1 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sat, 27 Jul 2013 12:23:20 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4063b061a..390cf79e9 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ which meas `foo=barbar` is a key-value pair under `/foo` and `foo_dir` is a dire #### Using HTTPS between server and client Etcd supports SSL/TLS and client cert authentication for clients to server, as well as server to server communication -Before that we need to have a CA cert`clientCA.crt` and signed key pair `client.crt, client.key` . +Before that we need to have a CA cert`clientCA.crt` and signed key pair `client.crt`, `client.key` . This site has a good reference for how to generate self-signed key pairs ```url @@ -373,7 +373,7 @@ curl http://127.0.0.1:4001/v1/keys/foo -d value=bar -L ``` When the client sends a sensitive command (`set`, `delete`, `testAndset` ) to the server, the command needs to be redirect to the leader of the cluster. -So we add the ``` -L ``` flag to make curl follow location hints in http location header when there is a redirection http response. +So we add the ` -L ` flag to make curl follow location hints in http location header when there is a redirection http response. The response should be ```json