Compare commits

...

5 Commits

Author SHA1 Message Date
Cedric Verstraeten
7e6b69819e upgrade node build-ui image 2023-02-03 08:56:56 +01:00
Cedric Verstraeten
4aa8ce7513 align memory values 2023-02-02 22:12:47 +01:00
Cedric Verstraeten
30d59f2613 add systemd details, move to seperate deployment page 2023-02-02 13:14:36 +01:00
Cedric Verstraeten
be0277432b add documentation for static binary 2023-02-01 20:21:37 +01:00
Cedric Verstraeten
a3006f3b9f change output name 2023-02-01 19:32:31 +01:00
6 changed files with 49 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ jobs:
- name: Run Buildx with output
run: docker buildx build --platform linux/$(echo ${{matrix.architecture}} | tr - /) -t $REPO-arch:arch-$(echo ${{matrix.architecture}} | tr / -)-${{steps.short-sha.outputs.sha}} --output type=tar,dest=output-${{matrix.architecture}}.tar .
- name: Strip binary
run: mkdir -p output/ && tar -xf output-${{matrix.architecture}}.tar -C output && rm output-${{matrix.architecture}}.tar && cd output/ && tar -cf ../output-${{matrix.architecture}}.tar -C home/agent . && rm -rf output
run: mkdir -p output/ && tar -xf output-${{matrix.architecture}}.tar -C output && rm output-${{matrix.architecture}}.tar && cd output/ && tar -cf ../agent-${{matrix.architecture}}.tar -C home/agent . && rm -rf output
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.short-sha.outputs.sha }}
@@ -53,7 +53,7 @@ jobs:
latest: true
name: ${{ steps.short-sha.outputs.sha }}
tag: ${{ steps.short-sha.outputs.sha }}
artifacts: "output-${{matrix.architecture}}.tar"
artifacts: "agent-${{matrix.architecture}}.tar"
build-other:
runs-on: ubuntu-latest
permissions:
@@ -89,7 +89,7 @@ jobs:
- name: Run Buildx with output
run: docker buildx build --platform linux/$(echo ${{matrix.architecture}} | tr - /) -t $REPO-arch:arch-$(echo ${{matrix.architecture}} | tr / -)-${{steps.short-sha.outputs.sha}} --output type=tar,dest=output-${{matrix.architecture}}.tar .
- name: Strip binary
run: mkdir -p output/ && tar -xf output-${{matrix.architecture}}.tar -C output && rm output-${{matrix.architecture}}.tar && cd output/ && tar -cf ../output-${{matrix.architecture}}.tar -C home/agent . && rm -rf output
run: mkdir -p output/ && tar -xf output-${{matrix.architecture}}.tar -C output && rm output-${{matrix.architecture}}.tar && cd output/ && tar -cf ../agent-${{matrix.architecture}}.tar -C home/agent . && rm -rf output
- name: Create a release
uses: ncipollo/release-action@v1
with:
@@ -97,5 +97,5 @@ jobs:
allowUpdates: true
name: ${{ steps.short-sha.outputs.sha }}
tag: ${{ steps.short-sha.outputs.sha }}
artifacts: "output-${{matrix.architecture}}.tar"
artifacts: "agent-${{matrix.architecture}}.tar"

View File

@@ -69,7 +69,7 @@ RUN cd /tmp && git clone https://github.com/axiomatic-systems/Bento4 && cd Bento
mv /tmp/Bento4/Build/mp4fragment /dist/agent/ && \
rm -rf /tmp/Bento4
FROM node:16.13.0-alpine3.11 AS build-ui
FROM node:18.14.0-alpine3.16 AS build-ui
########################
# Build Web (React app)

View File

@@ -110,6 +110,7 @@ As described before a Kerberos Agent is a container, which can be deployed throu
We have documented the different deployment models [in the `deployments` directory](https://github.com/kerberos-io/agent/tree/master/deployments) of this repository. There you'll learn and find how to deploy using:
- [Static binary](https://github.com/kerberos-io/agent/tree/master/deployments#0-static-binary)
- [Docker](https://github.com/kerberos-io/agent/tree/master/deployments#1-docker)
- [Docker Compose](https://github.com/kerberos-io/agent/tree/master/deployments#2-docker-compose)
- [Kubernetes](https://github.com/kerberos-io/agent/tree/master/deployments#3-kubernetes)

View File

@@ -6,6 +6,7 @@ Due to it's nature, of acting as a micro service, there are many different ways
We will discuss following deployment models.
- [0. Static binary](#0-static-binary)
- [1. Docker](#1-docker)
- [2. Docker Compose](#2-docker-compose)
- [3. Kubernetes](#3-kubernetes)
@@ -14,6 +15,12 @@ We will discuss following deployment models.
- [6. Terraform](#6-terraform)
- [7. Salt](#7-salt)
## 0. Static binary
Kerberos Agents are now also shipped as static binaries. Within the Docker image build, we are extracting the Kerberos Agent binary and are [uploading them to the releases page](https://github.com/kerberos-io/agent/releases) in the repository. By opening a release you'll find a `.tar` with the relevant files.
> Learn more [about the Kerberos Agent binary here](https://github.com/kerberos-io/agent/tree/master/deployments/binary).
## 1. Docker
Leveraging `docker` is probably one of the easiest way to run and test the Kerberos Agent. Thanks to it's multi-architecture images you could run it on almost every machine. The `docker` approach is perfect for running one or two cameras in a (single machine) home deployment, a POC to verify its capabilities, or testing if your old/new IP camera is operational with our Kerberos Agent.

View File

@@ -0,0 +1,34 @@
# Binary
Kerberos Agents are now also shipped as static binaries. Within the Docker image build, we are extracting the Kerberos Agent binary and are [uploading them to the releases page](https://github.com/kerberos-io/agent/releases) in the repository. By opening a release you'll find a `.tar` with the relevant files.
- `main`: this is the Kerberos Agent binary.
- `data`: the folder containing the recorded video, configuration, etc.
- `mp4fragment`: a binary to transform MP4s to Fragmented MP4s.
- `www`: the Kerberos Agent ui (compiled React app).
You can run the binary as following on port `8080`:
main run cameraname 8080
## Systemd
When running on a Linux OS you might consider to auto-start the Kerberos Agent using systemd. Create a file called `/etc/systemd/system/kerberos-agent.service` and copy-paste following configuration. Update the `WorkingDirectory` and `ExecStart` accordingly.
[Unit]
Wants=network.target
[Service]
ExecStart=/home/pi/agent/main run camera 80
WorkingDirectory=/home/pi/agent/
[Install]
WantedBy=multi-user.target
To load your new service, we'll execute following commands.
sudo systemctl daemon-reload
sudo systemctl enable kerberos-agent
sudo systemctl start kerberos-agent
Confirm the service is running:
sudo systemctl status kerberos-agent

View File

@@ -233,9 +233,9 @@ func HandleHeartBeat(configuration *models.Configuration, communication *models.
"enterprise" : %t,
"hostname" : "%s",
"architecture" : "%s",
"freeMemory" : "%d",
"usedMemory" : "%d",
"totalMemory" : "%d",
"usedMemory" : "%d",
"freeMemory" : "%d",
"macs" : "%v",
"ips" : "%v",
"board" : "",