Skip to content

Commit

Permalink
Add Manual Installation docs for release archive
Browse files Browse the repository at this point in the history
This will facilitate installation for distributions that support BCC and systemd but we don't provide distro specific packaging

Added makefile target for local test releases
  • Loading branch information
daemon1024 committed Jan 11, 2022
1 parent a9400ff commit 9d5cde2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
25 changes: 7 additions & 18 deletions KubeArmor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,32 +93,21 @@ ifeq (, $(shell which gosec))
endif
cd $(CURDIR); gosec ./...

.PHONY: systemd-deb
systemd-deb: build
ifeq (, $(shell which nfpm))
.PHONY: local-release
local-release: build
ifeq (, $(shell which goreleaser))
@{ \
set -e ;\
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
go install github.com/goreleaser/goreleaser@latest
}
endif
cd $(CURDIR); VERSION=$(shell git describe --tags --always --dirty) nfpm pkg --packager deb

.PHONY: systemd-rpm
systemd-rpm: build
ifeq (, $(shell which nfpm))
@{ \
set -e ;\
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
}
endif
cd $(CURDIR); VERSION=$(shell git describe --tags --always --dirty) nfpm pkg --packager rpm

.PHONY: systemd
systemd: systemd-deb systemd-rpm
cd $(CURDIR); curl -sfL https://raw.githubusercontent.com/kubearmor/kubearmor-client/main/install.sh | sh -s -- -b .
cd $(CURDIR); VERSION=$(shell git describe --tags --always --dirty) goreleaser release --rm-dist --skip-publish --skip-sign --skip-validate

.PHONY: clean
clean:
cd $(CURDIR); sudo rm -f kubearmor /tmp/kubearmor.log
cd $(CURDIR); sudo rm -rf dist
cd $(CURDIR); find . -name .coverprofile | xargs -I {} rm {}

.PHONY: vagrant-check
Expand Down
21 changes: 18 additions & 3 deletions getting-started/kubearmor_vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,24 @@ This recipe explains how to use KubeArmor directly on VM/Bare-Metal host and was

## Download and Install KubeArmor

1. Install pre-requisites `sudo apt install bpfcc-tools linux-headers-$(uname -r)` (For distros other than Ubuntu checkout [Installing BCC](https://github.com/iovisor/bcc/blob/master/INSTALL.md#installing-bcc))
2. Download the [latest release of KubeArmor](https://github.com/kubearmor/KubeArmor/releases)
2. Install KubeArmor `sudo dpkg -i kubearmor_VER_linux-amd64.deb` ... where VER is the kubearmor release version
1. Download the [latest release of KubeArmor](https://github.com/kubearmor/KubeArmor/releases)
2. Install KubeArmor `sudo apt install ./kubearmor_${VER}_linux-amd64.deb` ... where VER is the kubearmor release version. This will automatically install the required dependencies.

<details><summary>For distributions other than Ubuntu/Debian</summary>
<p>
1. Refer [Installing BCC](https://github.com/iovisor/bcc/blob/master/INSTALL.md#installing-bcc) to install pre-requisites.
2. Download release tarball from KubeArmor releases for the version you want

```
wget https://github.com/daemon1024/KubeArmor/releases/download/v${VER}/kubearmor_${VER}_linux-amd64.tar.gz
```
3. Unpack the tarball to the root directory:
```
sudo tar --no-overwrite-dir -C / -xzf kubearmor_${VER}_linux-amd64.tar.gz
sudo systemctl daemon-reload
```
</p>
</details>

## Start KubeArmor

Expand Down

0 comments on commit 9d5cde2

Please sign in to comment.