Remove sudo from installation and cri release
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
parent
4e0b13544e
commit
65df8db289
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -354,8 +354,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo PATH=$PATH script/setup/install-seccomp
|
sudo PATH=$PATH script/setup/install-seccomp
|
||||||
gosu root script/setup/install-runc
|
gosu root script/setup/install-runc
|
||||||
script/setup/install-cni
|
gosu root script/setup/install-cni
|
||||||
script/setup/install-critools
|
gosu root script/setup/install-critools
|
||||||
working-directory: src/github.com/containerd/containerd
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
- name: Install criu
|
- name: Install criu
|
||||||
|
24
Makefile
24
Makefile
@ -261,21 +261,21 @@ install-cri-deps: $(BINARIES)
|
|||||||
cp bin/* $(CRIDIR)
|
cp bin/* $(CRIDIR)
|
||||||
else
|
else
|
||||||
install-cri-deps: $(BINARIES)
|
install-cri-deps: $(BINARIES)
|
||||||
@sudo rm -rf ${CRIDIR}
|
@rm -rf ${CRIDIR}
|
||||||
@sudo install -d ${CRIDIR}/usr/local/bin
|
@install -d ${CRIDIR}/usr/local/bin
|
||||||
@sudo install -D -m 755 bin/* ${CRIDIR}/usr/local/bin
|
@install -D -m 755 bin/* ${CRIDIR}/usr/local/bin
|
||||||
@sudo install -d ${CRIDIR}/opt/containerd/cluster
|
@install -d ${CRIDIR}/opt/containerd/cluster
|
||||||
@sudo cp -r contrib/gce ${CRIDIR}/opt/containerd/cluster/
|
@cp -r contrib/gce ${CRIDIR}/opt/containerd/cluster/
|
||||||
@sudo install -d ${CRIDIR}/etc/systemd/system
|
@install -d ${CRIDIR}/etc/systemd/system
|
||||||
@sudo install -m 644 containerd.service ${CRIDIR}/etc/systemd/system
|
@install -m 644 containerd.service ${CRIDIR}/etc/systemd/system
|
||||||
echo "CONTAINERD_VERSION: '$(VERSION:v%=%)'" | sudo tee ${CRIDIR}/opt/containerd/cluster/version
|
echo "CONTAINERD_VERSION: '$(VERSION:v%=%)'" | tee ${CRIDIR}/opt/containerd/cluster/version
|
||||||
|
|
||||||
DESTDIR=$(CRIDIR) USESUDO=true script/setup/install-runc
|
DESTDIR=$(CRIDIR) USESUDO=false script/setup/install-runc
|
||||||
DESTDIR=$(CRIDIR) script/setup/install-cni
|
DESTDIR=$(CRIDIR) script/setup/install-cni
|
||||||
DESTDIR=$(CRIDIR) script/setup/install-critools
|
DESTDIR=$(CRIDIR) script/setup/install-critools
|
||||||
|
|
||||||
@sudo install -d $(CRIDIR)/bin
|
@install -d $(CRIDIR)/bin
|
||||||
@sudo install $(BINARIES) $(CRIDIR)/bin
|
@install $(BINARIES) $(CRIDIR)/bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(GOOS),windows)
|
ifeq ($(GOOS),windows)
|
||||||
@ -308,7 +308,7 @@ clean: ## clean up binaries
|
|||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
@rm -f $(BINARIES)
|
@rm -f $(BINARIES)
|
||||||
@rm -f releases/*.tar.gz*
|
@rm -f releases/*.tar.gz*
|
||||||
@if [[ -d $(OUTPUTDIR) ]]; then sudo rm -rf $(OUTPUTDIR); fi
|
@rm -rf $(OUTPUTDIR)
|
||||||
|
|
||||||
clean-test: ## clean up debris from previously failed tests
|
clean-test: ## clean up debris from previously failed tests
|
||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
|
@ -29,10 +29,10 @@ go get -d github.com/containernetworking/plugins/...
|
|||||||
cd "$GOPATH"/src/github.com/containernetworking/plugins
|
cd "$GOPATH"/src/github.com/containernetworking/plugins
|
||||||
git checkout $CNI_COMMIT
|
git checkout $CNI_COMMIT
|
||||||
./build_linux.sh
|
./build_linux.sh
|
||||||
sudo mkdir -p $CNI_DIR
|
mkdir -p $CNI_DIR
|
||||||
sudo cp -r ./bin $CNI_DIR
|
cp -r ./bin $CNI_DIR
|
||||||
sudo mkdir -p $CNI_CONFIG_DIR
|
mkdir -p $CNI_CONFIG_DIR
|
||||||
cat << EOF | sudo tee $CNI_CONFIG_DIR/10-containerd-net.conflist
|
cat << EOF | tee $CNI_CONFIG_DIR/10-containerd-net.conflist
|
||||||
{
|
{
|
||||||
"cniVersion": "0.4.0",
|
"cniVersion": "0.4.0",
|
||||||
"name": "containerd-net",
|
"name": "containerd-net",
|
||||||
|
@ -26,7 +26,7 @@ go get -d github.com/kubernetes-sigs/cri-tools/...
|
|||||||
cd "$GOPATH"/src/github.com/kubernetes-sigs/cri-tools
|
cd "$GOPATH"/src/github.com/kubernetes-sigs/cri-tools
|
||||||
git checkout $CRITEST_COMMIT
|
git checkout $CRITEST_COMMIT
|
||||||
make
|
make
|
||||||
sudo make install -e BINDIR=${DESTDIR:=''}/usr/local/bin
|
make install -e BINDIR=${DESTDIR:=''}/usr/local/bin
|
||||||
cat << EOF | sudo 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
|
||||||
|
Loading…
Reference in New Issue
Block a user