[etcd] Update to v3.4.x

pull/420/head
khs1994 2019-08-31 22:57:43 +08:00
parent 8747860b95
commit 6c6d2ac973
7 changed files with 38 additions and 40 deletions

View File

@ -9,7 +9,7 @@ version: "3.6"
services:
node1:
image: quay.io/coreos/etcd
image: quay.io/coreos/etcd:v3.4.0
volumes:
- node1-data:/etcd-data
expose:
@ -41,7 +41,7 @@ services:
- docker-etcd
node2:
image: quay.io/coreos/etcd
image: quay.io/coreos/etcd:v3.4.0
volumes:
- node2-data:/etcd-data
networks:
@ -73,7 +73,7 @@ services:
- docker-etcd
node3:
image: quay.io/coreos/etcd
image: quay.io/coreos/etcd:v3.4.0
volumes:
- node3-data:/etcd-data
networks:

View File

@ -2,7 +2,7 @@ version: "3.6"
services:
node1:
image: quay.io/coreos/etcd
image: quay.io/coreos/etcd:v3.4.0
volumes:
- node1-data:/etcd-data
expose:
@ -34,7 +34,7 @@ services:
- docker-etcd
node2:
image: quay.io/coreos/etcd
image: quay.io/coreos/etcd:v3.4.0
volumes:
- node2-data:/etcd-data
networks:
@ -66,7 +66,7 @@ services:
- docker-etcd
node3:
image: quay.io/coreos/etcd
image: quay.io/coreos/etcd:v3.4.0
volumes:
- node3-data:/etcd-data
networks:

View File

@ -2,7 +2,7 @@
`etcdctl` `etcd` `HTTP API` 便 `etcd` `etcdctl` `HTTP API`
`etcd` `etcdctl` [github.com/coreos/etcd/releases](https://github.com/coreos/etcd/releases) 下载。
`etcd` `etcdctl` [github.com/etcd-io/etcd/releases](https://github.com/etcd-io/etcd/releases) 下载。
`etcdctl`

View File

@ -2,7 +2,7 @@
`etcdctl` `etcd` `HTTP API` 便 `etcd` `etcdctl` `HTTP API`
`etcd` `etcdctl` [github.com/coreos/etcd/releases](https://github.com/coreos/etcd/releases) 下载。
`etcd` `etcdctl` [github.com/etcd-io/etcd/releases](https://github.com/etcd-io/etcd/releases) 下载。
`etcdctl`
@ -14,10 +14,10 @@ USAGE:
etcdctl
VERSION:
3.2.10
3.4.0
API VERSION:
3.2
3.4
COMMANDS:

View File

@ -1,19 +1,19 @@
##
`etcd` `Go` [](https://github.com/coreos/etcd) 下载源代码自行编译,也可以下载编译好的二进制文件,甚至直接使用制作好的 `Docker` 镜像文件来体验。
`etcd` `Go` [](https://github.com/etcd-io/etcd) 下载源代码自行编译,也可以下载编译好的二进制文件,甚至直接使用制作好的 `Docker` 镜像文件来体验。
> etcd `3.x`
> etcd `3.4.x`
###
[github.com/coreos/etcd/releases](https://github.com/coreos/etcd/releases/) 页面,用户可以选择需要的版本,或通过下载工具下载。
[github.com/etcd-io/etcd/releases](https://github.com/etcd-io/etcd/releases/) 页面,用户可以选择需要的版本,或通过下载工具下载。
使 `curl`
```bash
$ curl -L https://github.com/coreos/etcd/releases/download/v3.2.10/etcd-v3.2.10-linux-amd64.tar.gz -o etcd-v3.2.10-linux-amd64.tar.gz
$ tar xzvf etcd-v3.2.10-linux-amd64.tar.gz
$ cd etcd-v3.2.10-linux-amd64
$ curl -L https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz -o etcd-v3.4.0-linux-amd64.tar.gz
$ tar xzvf etcd-v3.4.0-linux-amd64.tar.gz
$ cd etcd-v3.4.0-linux-amd64
```
@ -35,14 +35,7 @@ $ sudo cp etcd* /usr/local/bin/
```bash
$ etcd
2017-12-03 11:18:34.406082 I | etcdmain: etcd Version: 3.2.10
2017-12-03 11:18:34.406226 I | etcdmain: Git SHA: GitNotFound
2017-12-03 11:18:34.406235 I | etcdmain: Go Version: go1.9.2
2017-12-03 11:18:34.406242 I | etcdmain: Go OS/Arch: darwin/amd64
2017-12-03 11:18:34.406250 I | etcdmain: setting maximum number of CPUs to 4, total number of available CPUs is 4
2017-12-03 11:18:34.406265 N | etcdmain: failed to detect default host (default host not supported on darwin_amd64)
2017-12-03 11:18:34.406279 W | etcdmain: no data-dir provided, using default data-dir ./default.etcd
2017-12-03 11:18:34.406457 N | etcdmain: the server is already initialized as member before, starting as etcd member...
...
2017-12-03 11:18:34.411579 I | embed: listening for peers on http://localhost:2380
2017-12-03 11:18:34.411938 I | embed: listening for client requests on localhost:2379
```
@ -68,22 +61,27 @@ hello world
`quay.io/coreos/etcd` `etcd` `2379` `2380`
```bash
$ export NODE1=192.168.1.21
$ docker run --name etcd \
$ docker run \
-p 2379:2379 \
-p 2380:2380 \
--volume=etcd-data:/etcd-data \
quay.io/coreos/etcd:latest \
--mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
--name etcd-gcr-v3.4.0 \
quay.io/coreos/etcd:v3.4.0 \
/usr/local/bin/etcd \
--data-dir=/etcd-data --name node1 \
--initial-advertise-peer-urls http://${NODE1}:2380 --listen-peer-urls http://0.0.0.0:2380 \
--advertise-client-urls http://${NODE1}:2379 --listen-client-urls http://0.0.0.0:2379 \
--initial-cluster node1=http://${NODE1}:2380
--name s1 \
--data-dir /etcd-data \
--listen-client-urls http://0.0.0.0:2379 \
--advertise-client-urls http://0.0.0.0:2379 \
--listen-peer-urls http://0.0.0.0:2380 \
--initial-advertise-peer-urls http://0.0.0.0:2380 \
--initial-cluster s1=http://0.0.0.0:2380 \
--initial-cluster-token tkn \
--initial-cluster-state new \
--log-level info \
--logger zap \
--log-outputs stderr
```
>etcd `quay.io/coreos/etcd` `gcr.io/etcd-development/etcd` 使
`etcd`
### macOS

View File

@ -4,7 +4,7 @@
`etcd` `CoreOS` 2013 6 `key-value` `Go` `CoreOS` `etcd`
`etcd` [github.com/coreos/etcd](https://github.com/coreos/etcd) 进行维护。
`etcd` [github.com/etcd-io/etcd](https://github.com/etcd-io/etcd) 进行维护。
[Apache ZooKeeper](https://zookeeper.apache.org/) 项目和 [doozer](https://github.com/ha/doozerd) 项目的启发,`etcd` 在设计的时候重点考虑了下面四个要素:

View File

@ -40,7 +40,7 @@ FROM scratch
`scratch`
[`swarm`](https://hub.docker.com/_/swarm/)、[`coreos/etcd`](https://quay.io/repository/coreos/etcd)。对于 Linux 下静态编译的程序来说,并不需要有操作系统提供运行时支持,所需的一切库都已经在可执行文件里了,因此直接 `FROM scratch` 会让镜像体积更加小巧。使用 [Go 语言](https://golang.org/) 开发的应用很多会使用这种方式来制作镜像,这也是为什么有人认为 Go 是特别适合容器微服务架构的语言的原因之一。
[`swarm`](https://hub.docker.com/_/swarm/)、[`etcd`](https://quay.io/repository/coreos/etcd)。对于 Linux 下静态编译的程序来说,并不需要有操作系统提供运行时支持,所需的一切库都已经在可执行文件里了,因此直接 `FROM scratch` 会让镜像体积更加小巧。使用 [Go 语言](https://golang.org/) 开发的应用很多会使用这种方式来制作镜像,这也是为什么有人认为 Go 是特别适合容器微服务架构的语言的原因之一。
### RUN