Merge pull request #5132 from mikebrow/add-some-debug-out-for-dep-setups
adds a new install-deps in the makefile; and some refactoring of the scripts
This commit is contained in:
		
							
								
								
									
										17
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								Makefile
									
									
									
									
									
								
							| @@ -123,7 +123,7 @@ TESTFLAGS_PARALLEL ?= 8 | |||||||
| OUTPUTDIR = $(join $(ROOTDIR), _output) | OUTPUTDIR = $(join $(ROOTDIR), _output) | ||||||
| CRIDIR=$(OUTPUTDIR)/cri | CRIDIR=$(OUTPUTDIR)/cri | ||||||
|  |  | ||||||
| .PHONY: clean all AUTHORS build binaries test integration generate protos checkprotos coverage ci check help install uninstall vendor release mandir install-man genman install-cri-deps cri-release cri-cni-release cri-integration bin/cri-integration.test | .PHONY: clean all AUTHORS build binaries test integration generate protos checkprotos coverage ci check help install uninstall vendor release mandir install-man genman install-cri-deps cri-release cri-cni-release cri-integration install-deps bin/cri-integration.test | ||||||
| .DEFAULT: default | .DEFAULT: default | ||||||
|  |  | ||||||
| all: binaries | all: binaries | ||||||
| @@ -262,6 +262,7 @@ release: releases/$(RELEASE).tar.gz | |||||||
| 	@echo "$(WHALE) $@" | 	@echo "$(WHALE) $@" | ||||||
| 	@cd releases && sha256sum $(RELEASE).tar.gz >$(RELEASE).tar.gz.sha256sum | 	@cd releases && sha256sum $(RELEASE).tar.gz >$(RELEASE).tar.gz.sha256sum | ||||||
|  |  | ||||||
|  | # install of cri deps into release output directory | ||||||
| ifeq ($(GOOS),windows) | ifeq ($(GOOS),windows) | ||||||
| install-cri-deps: $(BINARIES) | install-cri-deps: $(BINARIES) | ||||||
| 	mkdir -p $(CRIDIR) | 	mkdir -p $(CRIDIR) | ||||||
| @@ -343,6 +344,18 @@ uninstall: | |||||||
| 	@echo "$(WHALE) $@" | 	@echo "$(WHALE) $@" | ||||||
| 	@rm -f $(addprefix $(DESTDIR)/bin/,$(notdir $(BINARIES))) | 	@rm -f $(addprefix $(DESTDIR)/bin/,$(notdir $(BINARIES))) | ||||||
|  |  | ||||||
|  | ifeq ($(GOOS),windows) | ||||||
|  | install-deps: | ||||||
|  | 	# TODO: need a script for hcshim something like containerd/cri/hack/install/windows/install-hcsshim.sh | ||||||
|  | 	script/setup/install-critools | ||||||
|  | 	script/setup/install-cni-windows | ||||||
|  | else | ||||||
|  | install-deps: ## install cri dependencies | ||||||
|  | 	script/setup/install-seccomp | ||||||
|  | 	script/setup/install-runc | ||||||
|  | 	script/setup/install-critools | ||||||
|  | 	script/setup/install-cni | ||||||
|  | endif | ||||||
|  |  | ||||||
| coverage: ## generate coverprofiles from the unit tests, except tests that require root | coverage: ## generate coverprofiles from the unit tests, except tests that require root | ||||||
| 	@echo "$(WHALE) $@" | 	@echo "$(WHALE) $@" | ||||||
| @@ -373,7 +386,7 @@ root-coverage: ## generate coverage profiles for unit tests that require root | |||||||
| 		fi; \ | 		fi; \ | ||||||
| 	done ) | 	done ) | ||||||
|  |  | ||||||
| vendor: | vendor: ## vendor | ||||||
| 	@echo "$(WHALE) $@" | 	@echo "$(WHALE) $@" | ||||||
| 	@go mod tidy | 	@go mod tidy | ||||||
| 	@go mod vendor | 	@go mod vendor | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								script/setup/critools-version
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								script/setup/critools-version
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | 0f5f734a7e1da0979915c6e7d5b6641bd9dc2627 | ||||||
| @@ -25,8 +25,9 @@ CNI_COMMIT=$(grep containernetworking/plugins "$GOPATH"/src/github.com/container | |||||||
| CNI_DIR=${DESTDIR:=''}/opt/cni | CNI_DIR=${DESTDIR:=''}/opt/cni | ||||||
| CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d | CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d | ||||||
|  |  | ||||||
| git clone https://github.com/containernetworking/plugins.git "$GOPATH"/src/github.com/containernetworking/plugins | TMPROOT=$(mktemp -d) | ||||||
| cd "$GOPATH"/src/github.com/containernetworking/plugins | git clone https://github.com/containernetworking/plugins.git "${TMPROOT}"/plugins | ||||||
|  | pushd "${TMPROOT}"/plugins | ||||||
| git checkout $CNI_COMMIT | git checkout $CNI_COMMIT | ||||||
| ./build_linux.sh | ./build_linux.sh | ||||||
| mkdir -p $CNI_DIR | mkdir -p $CNI_DIR | ||||||
| @@ -66,3 +67,6 @@ cat << EOF | tee $CNI_CONFIG_DIR/10-containerd-net.conflist | |||||||
|   ] |   ] | ||||||
| } | } | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
|  | popd | ||||||
|  | rm -fR "${TMPROOT}" | ||||||
|   | |||||||
| @@ -20,15 +20,23 @@ | |||||||
| # | # | ||||||
| set -eu -o pipefail | set -eu -o pipefail | ||||||
|  |  | ||||||
|  | script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)" | ||||||
|  |  | ||||||
| cd "$GOPATH" | cd "$GOPATH" | ||||||
| go get -u github.com/onsi/ginkgo/ginkgo | go get -u github.com/onsi/ginkgo/ginkgo | ||||||
| CRITEST_COMMIT=0f5f734a7e1da0979915c6e7d5b6641bd9dc2627 |  | ||||||
|  |  | ||||||
| git clone https://github.com/kubernetes-sigs/cri-tools.git "$GOPATH"/src/github.com/kubernetes-sigs/cri-tools | : "${CRITEST_COMMIT:=$(cat "${script_dir}/critools-version")}" | ||||||
| cd "$GOPATH"/src/github.com/kubernetes-sigs/cri-tools |  | ||||||
|  | TMPROOT=$(mktemp -d) | ||||||
|  | git clone https://github.com/kubernetes-sigs/cri-tools.git "${TMPROOT}"/cri-tools | ||||||
|  | pushd "${TMPROOT}"/cri-tools | ||||||
| git checkout "$CRITEST_COMMIT" | git checkout "$CRITEST_COMMIT" | ||||||
| make | make | ||||||
| make install -e BINDIR=${DESTDIR:=''}/usr/local/bin | make install -e BINDIR=${DESTDIR:=''}/usr/local/bin | ||||||
|  |  | ||||||
| cat << EOF | tee ${DESTDIR}/etc/crictl.yaml | cat << EOF | tee ${DESTDIR}/etc/crictl.yaml | ||||||
| runtime-endpoint: unix:///run/containerd/containerd.sock | runtime-endpoint: unix:///run/containerd/containerd.sock | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
|  | popd | ||||||
|  | rm -fR "${TMPROOT}" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Mike Brown
					Mike Brown