Update etcd to 2.2.1

This commit is contained in:
Joe Beda 2015-10-30 15:25:23 -07:00
parent f64780d6eb
commit 993c1ee222
16 changed files with 27 additions and 23 deletions

View File

@ -35,8 +35,8 @@ RUN rm -rf /var/lib/apt/lists/
RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y rsync RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y rsync
# Download and symlink etcd. We need this for our integration tests. # Download and symlink etcd. We need this for our integration tests.
ENV ETCD_VERSION v2.0.12 RUN export ETCD_VERSION=v2.2.1; \
RUN mkdir -p /usr/local/src/etcd &&\ mkdir -p /usr/local/src/etcd &&\
cd /usr/local/src/etcd &&\ cd /usr/local/src/etcd &&\
curl -fsSLO https://github.com/coreos/etcd/releases/download/$ETCD_VERSION/etcd-$ETCD_VERSION-linux-amd64.tar.gz &&\ curl -fsSLO https://github.com/coreos/etcd/releases/download/$ETCD_VERSION/etcd-$ETCD_VERSION-linux-amd64.tar.gz &&\
tar xzf etcd-$ETCD_VERSION-linux-amd64.tar.gz &&\ tar xzf etcd-$ETCD_VERSION-linux-amd64.tar.gz &&\

View File

@ -23,7 +23,7 @@ RELEASES_DIR=${RELEASES_DIR:-/tmp/downloads}
FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.3"} FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.3"}
# Define etcd version to use. # Define etcd version to use.
ETCD_VERSION=${ETCD_VERSION:-"2.0.12"} ETCD_VERSION=${ETCD_VERSION:-"2.2.1"}
# Define k8s version to use. # Define k8s version to use.
K8S_VERSION=${K8S_VERSION:-"1.0.4"} K8S_VERSION=${K8S_VERSION:-"1.0.4"}

4
cluster/images/etcd/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
etcd
etcdctl
etcd-*-linux-amd64.tar.gz
etcd-*-linux-amd64/

View File

@ -5,7 +5,7 @@ ambassador:
command: "-name docker_apiserver_1" command: "-name docker_apiserver_1"
etcd: etcd:
hostname: etcd hostname: etcd
image: quay.io/coreos/etcd:v2.0.12 image: quay.io/coreos/etcd:v2.2.1
ports: [ "4001:4001" ] ports: [ "4001:4001" ]
command: > command: >
--listen-client-urls 'http://etcd:4001' --listen-client-urls 'http://etcd:4001'

View File

@ -20,7 +20,7 @@ set -o errexit
set -o nounset set -o nounset
set -o pipefail set -o pipefail
ETCD_VERSION=${ETCD_VERSION:-v2.0.12} ETCD_VERSION=${ETCD_VERSION:-v2.2.1}
full_name=etcd-${ETCD_VERSION}-linux-amd64 full_name=etcd-${ETCD_VERSION}-linux-amd64
archive_url=https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/${full_name}.tar.gz archive_url=https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/${full_name}.tar.gz

View File

@ -10,7 +10,7 @@
"containers":[ "containers":[
{ {
"name": "etcd-container", "name": "etcd-container",
"image": "gcr.io/google_containers/etcd:2.0.12", "image": "gcr.io/google_containers/etcd:2.2.1",
"resources": { "resources": {
"limits": { "limits": {
"cpu": {{ cpulimit }} "cpu": {{ cpulimit }}

View File

@ -43,7 +43,7 @@ cp flannel-${FLANNEL_VERSION}/flanneld binaries/master
cp flannel-${FLANNEL_VERSION}/flanneld binaries/minion cp flannel-${FLANNEL_VERSION}/flanneld binaries/minion
# ectd # ectd
ETCD_VERSION=${ETCD_VERSION:-"2.0.12"} ETCD_VERSION=${ETCD_VERSION:-"2.2.1"}
ETCD="etcd-v${ETCD_VERSION}-linux-amd64" ETCD="etcd-v${ETCD_VERSION}-linux-amd64"
echo "Prepare etcd ${ETCD_VERSION} release ..." echo "Prepare etcd ${ETCD_VERSION} release ..."
if [ ! -f etcd.tar.gz ] ; then if [ ! -f etcd.tar.gz ] ; then

View File

@ -33,7 +33,7 @@ Documentation for other releases can be found at
# etcd # etcd
[etcd](https://coreos.com/etcd/docs/2.0.12/) is a highly-available key value [etcd](https://coreos.com/etcd/docs/2.2.1/) is a highly-available key value
store which Kubernetes uses for persistent storage of all of its REST API store which Kubernetes uses for persistent storage of all of its REST API
objects. objects.
@ -49,7 +49,7 @@ Data Reliability: for reasonable safety, either etcd needs to be run as a
etcd) or etcd's data directory should be located on durable storage (e.g., GCE's etcd) or etcd's data directory should be located on durable storage (e.g., GCE's
persistent disk). In either case, if high availability is required--as it might persistent disk). In either case, if high availability is required--as it might
be in a production cluster--the data directory ought to be [backed up be in a production cluster--the data directory ought to be [backed up
periodically](https://coreos.com/etcd/docs/2.0.12/admin_guide.html#disaster-recovery), periodically](https://coreos.com/etcd/docs/2.2.1/admin_guide.html#disaster-recovery),
to reduce downtime in case of corruption. to reduce downtime in case of corruption.
## Default configuration ## Default configuration

View File

@ -68,13 +68,13 @@ across reboots and failures.
Run: Run:
```sh ```sh
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
``` ```
Next, you need to set a CIDR range for flannel. This CIDR should be chosen to be non-overlapping with any existing network you are using: Next, you need to set a CIDR range for flannel. This CIDR should be chosen to be non-overlapping with any existing network you are using:
```sh ```sh
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.0.12 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }' sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.2.1 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }'
``` ```

View File

@ -98,11 +98,11 @@ DOCKER_CONF=""
start_k8s(){ start_k8s(){
# Start etcd # Start etcd
docker -H unix:///var/run/docker-bootstrap.sock run --restart=always --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data docker -H unix:///var/run/docker-bootstrap.sock run --restart=always --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
sleep 5 sleep 5
# Set flannel net config # Set flannel net config
docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.0.12 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16", "Backend": {"Type": "vxlan"}}' docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.2.1 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16", "Backend": {"Type": "vxlan"}}'
# iface may change to a private network interface, eth0 is for default # iface may change to a private network interface, eth0 is for default
flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run --restart=always -d --net=host --privileged -v /dev/net:/dev/net quay.io/coreos/flannel:0.5.3 /opt/bin/flanneld -iface="eth0") flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run --restart=always -d --net=host --privileged -v /dev/net:/dev/net quay.io/coreos/flannel:0.5.3 /opt/bin/flanneld -iface="eth0")

View File

@ -86,7 +86,7 @@ parameters as follows:
### Step One: Run etcd ### Step One: Run etcd
```sh ```sh
docker run --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data docker run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
``` ```
### Step Two: Run the master ### Step Two: Run the master

View File

@ -107,7 +107,7 @@ Start etcd and verify that it is running:
```bash ```bash
sudo docker run -d --hostname $(uname -n) --name etcd \ sudo docker run -d --hostname $(uname -n) --name etcd \
-p 4001:4001 -p 7001:7001 quay.io/coreos/etcd:v2.0.12 \ -p 4001:4001 -p 7001:7001 quay.io/coreos/etcd:v2.2.1 \
--listen-client-urls http://0.0.0.0:4001 \ --listen-client-urls http://0.0.0.0:4001 \
--advertise-client-urls http://${KUBERNETES_MASTER_IP}:4001 --advertise-client-urls http://${KUBERNETES_MASTER_IP}:4001
``` ```
@ -115,7 +115,7 @@ sudo docker run -d --hostname $(uname -n) --name etcd \
```console ```console
$ sudo docker ps $ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fd7bac9e2301 quay.io/coreos/etcd:v2.0.12 "/etcd" 5s ago Up 3s 2379/tcp, 2380/... etcd fd7bac9e2301 quay.io/coreos/etcd:v2.2.1 "/etcd" 5s ago Up 3s 2379/tcp, 2380/... etcd
``` ```
It's also a good idea to ensure your etcd instance is reachable by testing it It's also a good idea to ensure your etcd instance is reachable by testing it

View File

@ -237,8 +237,8 @@ You have several choices for Kubernetes images:
command like `docker images` command like `docker images`
For etcd, you can: For etcd, you can:
- Use images hosted on Google Container Registry (GCR), such as `gcr.io/google_containers/etcd:2.0.12` - Use images hosted on Google Container Registry (GCR), such as `gcr.io/google_containers/etcd:2.2.1`
- Use images hosted on [Docker Hub](https://hub.docker.com/search/?q=etcd) or [Quay.io](https://quay.io/repository/coreos/etcd), such as `quay.io/coreos/etcd:v2.2.0` - Use images hosted on [Docker Hub](https://hub.docker.com/search/?q=etcd) or [Quay.io](https://quay.io/repository/coreos/etcd), such as `quay.io/coreos/etcd:v2.2.1`
- Use etcd binary included in your OS distro. - Use etcd binary included in your OS distro.
- Build your own image - Build your own image
- You can do: `cd kubernetes/cluster/images/etcd; make` - You can do: `cd kubernetes/cluster/images/etcd; make`

View File

@ -60,7 +60,7 @@ work, which has been merge into this document.
Internet to download the necessary files, while worker nodes do not. Internet to download the necessary files, while worker nodes do not.
3. These guide is tested OK on Ubuntu 14.04 LTS 64bit server, but it can not work with 3. These guide is tested OK on Ubuntu 14.04 LTS 64bit server, but it can not work with
Ubuntu 15 which uses systemd instead of upstart. Ubuntu 15 which uses systemd instead of upstart.
4. Dependencies of this guide: etcd-2.0.12, flannel-0.5.3, k8s-1.0.6, may work with higher versions. 4. Dependencies of this guide: etcd-2.2.1, flannel-0.5.3, k8s-1.0.6, may work with higher versions.
5. All the remote servers can be ssh logged in without a password by using key authentication. 5. All the remote servers can be ssh logged in without a password by using key authentication.
@ -77,7 +77,7 @@ $ git clone https://github.com/kubernetes/kubernetes.git
#### Configure and start the Kubernetes cluster #### Configure and start the Kubernetes cluster
The startup process will first download all the required binaries automatically. The startup process will first download all the required binaries automatically.
By default etcd version is 2.0.12, flannel version is 0.5.3 and k8s version is 1.0.6. By default etcd version is 2.2.1, flannel version is 0.5.3 and k8s version is 1.0.6.
You can customize your etcd version, flannel version, k8s version by changing corresponding variables You can customize your etcd version, flannel version, k8s version by changing corresponding variables
`ETCD_VERSION` , `FLANNEL_VERSION` and `KUBE_VERSION` like following. `ETCD_VERSION` , `FLANNEL_VERSION` and `KUBE_VERSION` like following.

View File

@ -20,7 +20,7 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
ETCD_VERSION=${ETCD_VERSION:-v2.0.12} ETCD_VERSION=${ETCD_VERSION:-v2.2.1}
cd "${KUBE_ROOT}/third_party" cd "${KUBE_ROOT}/third_party"
curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \ curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \

View File

@ -19,14 +19,14 @@
EVENT_STORE_IP=$1 EVENT_STORE_IP=$1
EVENT_STORE_URL="http://${EVENT_STORE_IP}:4002" EVENT_STORE_URL="http://${EVENT_STORE_IP}:4002"
if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then
sudo docker run --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd \ sudo docker run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd \
--listen-peer-urls http://127.0.0.1:2381 \ --listen-peer-urls http://127.0.0.1:2381 \
--addr=127.0.0.1:4002 \ --addr=127.0.0.1:4002 \
--bind-addr=0.0.0.0:4002 \ --bind-addr=0.0.0.0:4002 \
--data-dir=/var/etcd/data --data-dir=/var/etcd/data
fi fi
sudo docker run --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd \ sudo docker run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd \
--listen-peer-urls http://127.0.0.1:2380 \ --listen-peer-urls http://127.0.0.1:2380 \
--addr=127.0.0.1:4001 \ --addr=127.0.0.1:4001 \
--bind-addr=0.0.0.0:4001 \ --bind-addr=0.0.0.0:4001 \