-
Notifications
You must be signed in to change notification settings - Fork 40k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flannel image for arm and amd64. Cross-build debian-iptables fo…
…r arm, arm64 and ppc64le. Build and push hyperkube for arm on every release
- Loading branch information
Showing
11 changed files
with
257 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
### debian-iptables | ||
|
||
Serves as the base image for `gcr.io/google_containers/kube-proxy-${ARCH}` and multiarch (not `amd64`) `gcr.io/google_containers/flannel-${ARCH}` images. | ||
|
||
This image is compiled for multiple architectures. | ||
|
||
#### How to release | ||
|
||
If you're editing the Dockerfile or some other thing, please bump the `TAG` in the Makefile. | ||
|
||
```console | ||
# Build for linux/amd64 (default) | ||
$ make push ARCH=amd64 | ||
# ---> gcr.io/google_containers/debian-iptables-amd64:TAG | ||
|
||
$ make push ARCH=arm | ||
# ---> gcr.io/google_containers/debian-iptables-arm:TAG | ||
|
||
$ make push ARCH=arm64 | ||
# ---> gcr.io/google_containers/debian-iptables-arm64:TAG | ||
|
||
$ make push ARCH=ppc64le | ||
# ---> gcr.io/google_containers/debian-iptables-ppc64le:TAG | ||
``` | ||
|
||
If you don't want to push the images, run `make` or `make build` instead | ||
|
||
|
||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/build/debian-iptables/README.md?pixel)]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2016 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM BASEIMAGE | ||
|
||
COPY flanneld /opt/bin/ | ||
COPY mk-docker-opts.sh /opt/bin/ | ||
|
||
CMD ["/opt/bin/flanneld"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Copyright 2016 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Build the flannel image | ||
# | ||
# Usage: | ||
# [TAG=0.5.5] [REGISTRY=gcr.io/google_containers] [ARCH=amd64] make build | ||
|
||
TAG?=0.5.5 | ||
ARCH?=amd64 | ||
REGISTRY?=gcr.io/google_containers | ||
KUBE_CROSS_TAG=v1.4.2-1 | ||
GOARM=6 | ||
TEMP_DIR:=$(shell mktemp -d) | ||
BASEIMAGE?=gcr.io/google_containers/debian-iptables-${ARCH}:v2 | ||
|
||
ifeq ($(ARCH),arm) | ||
CC=arm-linux-gnueabi-gcc | ||
endif | ||
|
||
build: | ||
ifeq ($(ARCH),amd64) | ||
# If we should build an amd64 flannel, go with the official one | ||
docker pull quay.io/coreos/flannel:$(TAG) | ||
|
||
docker tag -f quay.io/coreos/flannel:$(TAG) $(REGISTRY)/flannel-$(ARCH):$(TAG) | ||
else | ||
# Copy the content in this dir to the temp dir | ||
cp ./* $(TEMP_DIR) | ||
|
||
docker run -it -v $(TEMP_DIR):/flannel/bin gcr.io/google_containers/kube-cross:$(KUBE_CROSS_TAG) /bin/bash -c \ | ||
"curl -sSL https://github.com/coreos/flannel/archive/v${TAG}.tar.gz | tar -C /flannel -xz --strip-components=1 \ | ||
&& cd /flannel && GOARM=$(GOARM) GOARCH=$(ARCH) CC=$(CC) CGO_ENABLED=1 ./build" | ||
|
||
# Replace BASEIMAGE with the real base image | ||
cd $(TEMP_DIR) && sed -i "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile | ||
|
||
# Download mk-docker-opts.sh | ||
curl -sSL https://raw.githubusercontent.com/coreos/flannel/v$(TAG)/dist/mk-docker-opts.sh > $(TEMP_DIR)/mk-docker-opts.sh | ||
|
||
# And build the image | ||
docker build -t $(REGISTRY)/flannel-$(ARCH):$(TAG) $(TEMP_DIR) | ||
endif | ||
|
||
push: build | ||
gcloud docker push $(REGISTRY)/flannel-$(ARCH):$(TAG) | ||
|
||
all: build | ||
.PHONY: build push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### flannel | ||
|
||
This is used mostly for the `docker-multinode` config, but also in other places where flannel runs in a container. | ||
|
||
For `amd64`, this image equals to `quay.io/coreos/flannel` to maintain official support. | ||
For other architectures, `flannel` is cross-compiled. The `debian-iptables` image serves as base image. | ||
|
||
#### How to release | ||
|
||
```console | ||
# Build for linux/amd64 (default) | ||
$ make push ARCH=amd64 | ||
# ---> gcr.io/google_containers/flannel-amd64:TAG | ||
|
||
$ make push ARCH=arm | ||
# ---> gcr.io/google_containers/flannel-arm:TAG | ||
``` | ||
|
||
If you don't want to push the images, run `make` or `make build` instead | ||
|
||
|
||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/images/flannel/README.md?pixel)]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
### hyperkube | ||
|
||
`hyperkube` is an all-in-one binary for the Kubernetes server components | ||
Also, it's very easy to run this `hyperkube` setup dockerized. | ||
See http://kubernetes.io/docs/getting-started-guides/docker/ for up-to-date commands. | ||
|
||
`hyperkube` is built for multiple architectures and pushed on every release. | ||
|
||
#### How to release by hand | ||
|
||
```console | ||
# First, build the | ||
$ build/run.sh hack/build-cross.sh | ||
|
||
# Build for linux/amd64 (default) | ||
$ make push VERSION={target_version} ARCH=amd64 | ||
# ---> gcr.io/google_containers/hyperkube-amd64:VERSION | ||
# ---> gcr.io/google_containers/hyperkube:VERSION (image with backwards-compatible naming) | ||
|
||
$ make push VERSION={target_version} ARCH=arm | ||
# ---> gcr.io/google_containers/hyperkube-arm:VERSION | ||
``` | ||
|
||
If you don't want to push the images, run `make` or `make build` instead | ||
|
||
|
||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/images/hyperkube/README.md?pixel)]() |
Oops, something went wrong.
560268e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 20535 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 265 Build time: 00:04:58