Skip to content

Commit 4c77408

Browse files
committed
Add a script for downloading official binaries
1 parent 44b2429 commit 4c77408

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
addons/images/bin
22
scripts/cross-compile-k8s/bin
3+
scripts/download-official-binaries/bin

Diff for: scripts/download-official-binaries/Makefile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARCH?=arm
2+
OUTPUT?=$(shell pwd)/bin/$(ARCH)
3+
TMPDIR:=$(shell mktemp -d)
4+
5+
ETCD_VERSION = 2.2.5
6+
FLANNEL_VERSION = 0.5.5
7+
K8S_VERSION = v1.3.0
8+
9+
all: compress
10+
compress: etcd flanneld kube
11+
cd $(TMPDIR)/bin && tar -czf $(OUTPUT)/kube-$(K8S_VERSION)-$(ARCH).tar.gz .
12+
13+
etcd: dirs
14+
docker export $(shell docker create gcr.io/google_containers/etcd-$(ARCH):2.2.5) | tar -x -C $(TMPDIR)/etcd
15+
cp $(TMPDIR)/etcd/usr/local/bin/etcd $(TMPDIR)/etcd/usr/local/bin/etcdctl $(TMPDIR)/bin/
16+
17+
flanneld: dirs
18+
docker export $(shell docker create gcr.io/google_containers/flannel-$(ARCH):0.5.5) | tar -x -C $(TMPDIR)/flannel
19+
cp $(TMPDIR)/flannel/opt/bin/flanneld $(TMPDIR)/bin/
20+
21+
kube: dirs
22+
curl -sSL https://storage.googleapis.com/kubernetes-release/release/$(K8S_VERSION)/bin/linux/$(ARCH)/kubectl > $(TMPDIR)/bin/kubectl
23+
curl -sSL https://storage.googleapis.com/kubernetes-release/release/$(K8S_VERSION)/bin/linux/$(ARCH)/hyperkube > $(TMPDIR)/bin/hyperkube
24+
curl -sSL https://storage.googleapis.com/kubernetes-release/release/$(K8S_VERSION)/bin/linux/$(ARCH)/e2e.test > $(TMPDIR)/bin/e2e.test
25+
curl -sSL https://storage.googleapis.com/kubernetes-release/release/$(K8S_VERSION)/bin/linux/$(ARCH)/e2e_node.test > $(TMPDIR)/bin/e2e_node.test
26+
27+
dirs:
28+
mkdir -p $(TMPDIR)/flannel $(TMPDIR)/etcd $(TMPDIR)/bin $(OUTPUT)

0 commit comments

Comments
 (0)