diff --git a/Documentation/dev-internal/release.md b/Documentation/dev-internal/release.md index 890c32dafa1..fb7417252eb 100644 --- a/Documentation/dev-internal/release.md +++ b/Documentation/dev-internal/release.md @@ -53,7 +53,7 @@ All releases version numbers follow the format of [semantic versioning 2.0.0](ht Run release script in root directory: ``` -./scripts/release.sh ${VERSION} +TAG=gcr.io/etcd-development/etcd ./scripts/release.sh ${VERSION} ``` It generates all release binaries and images under directory ./release. @@ -90,13 +90,41 @@ The public key for GPG signing can be found at [CoreOS Application Signing Key]( - Select whether it is a pre-release. - Publish the release! +## Publish docker image in gcr.io + +- Push docker image: + +``` +gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd.json)" https://gcr.io + +for TARGET_ARCH in "-arm64" "-ppc64le" ""; do + gcloud docker -- push gcr.io/etcd-development/etcd:${VERSION}${TARGET_ARCH} +done +``` + +- Add `latest` tag to the new image on [gcr.io](https://console.cloud.google.com/gcr/images/etcd-development/GLOBAL/etcd?project=etcd-development&authuser=1) if this is a stable release. + ## Publish docker image in Quay.io +- Build docker images with quay.io: + +``` +for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do + TAG=quay.io/coreos/etcd GOARCH=${TARGET_ARCH} \ + BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} \ + BUILDDIR=release \ + ./scripts/build-docker ${VERSION} +done +``` + - Push docker image: ``` docker login quay.io -docker push quay.io/coreos/etcd:${VERSION} + +for TARGET_ARCH in "-arm64" "-ppc64le" ""; do + docker push quay.io/coreos/etcd:${VERSION}${TARGET_ARCH} +done ``` - Add `latest` tag to the new image on [quay.io](https://quay.io/repository/coreos/etcd?tag=latest&tab=tags) if this is a stable release. diff --git a/Documentation/op-guide/container.md b/Documentation/op-guide/container.md index bed9c08f28e..586501b653c 100644 --- a/Documentation/op-guide/container.md +++ b/Documentation/op-guide/container.md @@ -79,11 +79,15 @@ export NODE1=192.168.1.21 Run the latest version of etcd: ``` +REGISTRY=quay.io/coreos/etcd +# available from v3.2.5 +REGISTRY=gcr.io/etcd-development/etcd + docker run \ -p 2379:2379 \ -p 2380:2380 \ --volume=${DATA_DIR}:/etcd-data \ - --name etcd quay.io/coreos/etcd:latest \ + --name etcd ${REGISTRY}:latest \ /usr/local/bin/etcd \ --data-dir=/etcd-data --name node1 \ --initial-advertise-peer-urls http://${NODE1}:2380 --listen-peer-urls http://${NODE1}:2380 \ @@ -100,6 +104,10 @@ etcdctl --endpoints=http://${NODE1}:2379 member list ### Running a 3 node etcd cluster ``` +REGISTRY=quay.io/coreos/etcd +# available from v3.2.5 +REGISTRY=gcr.io/etcd-development/etcd + # For each machine ETCD_VERSION=latest TOKEN=my-etcd-token @@ -120,7 +128,7 @@ docker run \ -p 2379:2379 \ -p 2380:2380 \ --volume=${DATA_DIR}:/etcd-data \ - --name etcd quay.io/coreos/etcd:${ETCD_VERSION} \ + --name etcd ${REGISTRY}:${ETCD_VERSION} \ /usr/local/bin/etcd \ --data-dir=/etcd-data --name ${THIS_NAME} \ --initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \ @@ -135,7 +143,7 @@ docker run \ -p 2379:2379 \ -p 2380:2380 \ --volume=${DATA_DIR}:/etcd-data \ - --name etcd quay.io/coreos/etcd:${ETCD_VERSION} \ + --name etcd ${REGISTRY}:${ETCD_VERSION} \ /usr/local/bin/etcd \ --data-dir=/etcd-data --name ${THIS_NAME} \ --initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \ @@ -150,7 +158,7 @@ docker run \ -p 2379:2379 \ -p 2380:2380 \ --volume=${DATA_DIR}:/etcd-data \ - --name etcd quay.io/coreos/etcd:${ETCD_VERSION} \ + --name etcd ${REGISTRY}:${ETCD_VERSION} \ /usr/local/bin/etcd \ --data-dir=/etcd-data --name ${THIS_NAME} \ --initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \ @@ -173,11 +181,17 @@ To provision a 3 node etcd cluster on bare-metal, the examples in the [baremetal The etcd release container does not include default root certificates. To use HTTPS with certificates trusted by a root authority (e.g., for discovery), mount a certificate directory into the etcd container: +``` +REGISTRY=quay.io/coreos/etcd +# available from v3.2.5 +REGISTRY=gcr.io/etcd-development/etcd +``` + ``` rkt run \ --volume etcd-ssl-certs-bundle,kind=host,source=/etc/ssl/certs/ca-certificates.crt \ --mount volume=etcd-ssl-certs-bundle,target=/etc/ssl/certs/ca-certificates.crt \ - quay.io/coreos/etcd:latest -- --name my-name \ + ${REGISTRY}:latest -- --name my-name \ --initial-advertise-peer-urls http://localhost:2380 --listen-peer-urls http://localhost:2380 \ --advertise-client-urls http://localhost:2379 --listen-client-urls http://localhost:2379 \ --discovery https://discovery.etcd.io/c11fbcdc16972e45253491a24fcf45e1 @@ -188,7 +202,7 @@ docker run \ -p 2379:2379 \ -p 2380:2380 \ --volume=/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt \ - quay.io/coreos/etcd:latest \ + ${REGISTRY}:latest \ /usr/local/bin/etcd --name my-name \ --initial-advertise-peer-urls http://localhost:2380 --listen-peer-urls http://localhost:2380 \ --advertise-client-urls http://localhost:2379 --listen-client-urls http://localhost:2379 \