mirror of
https://github.com/kerberos-io/agent.git
synced 2026-08-23 15:08:32 +00:00
Merge branch 'master' into develop
This commit is contained in:
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
31
.github/workflows/go.yml
vendored
Normal file
31
.github/workflows/go.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop, master ]
|
||||
pull_request:
|
||||
branches: [ develop, master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ^1.15
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get dependencies
|
||||
run: cd backend && go mod download
|
||||
|
||||
- name: Build
|
||||
run: cd backend && go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: cd backend && go test -v ./...
|
||||
32
.github/workflows/react.yml
vendored
Normal file
32
.github/workflows/react.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: React
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop, master ]
|
||||
pull_request:
|
||||
branches: [ develop, master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Yarn install
|
||||
run: cd frontend && yarn
|
||||
- name: Yarn test
|
||||
run: cd frontend && yarn test
|
||||
- name: Yarn build
|
||||
run: cd frontend && yarn build
|
||||
19
.travis.yml
Normal file
19
.travis.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.12.x
|
||||
- 1.13.x
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
- tip
|
||||
|
||||
before_install:
|
||||
- cd backend
|
||||
- go mod download
|
||||
|
||||
script:
|
||||
- go vet
|
||||
- go test -race -coverprofile=coverage.txt -covermode=atomic
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
2
LICENSE
2
LICENSE
@@ -8,6 +8,6 @@ For purposes of the foregoing, “Sell” means practicing any or all of the rig
|
||||
|
||||
Software: Kerberos Open Source
|
||||
|
||||
License: Apache 2.0
|
||||
License: Apache-2.0
|
||||
|
||||
Licensor: Kerberos.io
|
||||
|
||||
73
README.md
73
README.md
@@ -4,22 +4,25 @@
|
||||
<a href="https://twitter.com/kerberosio?ref_src=twsrc%5Etfw"><img src="https://img.shields.io/twitter/url.svg?label=Follow%20%40kerberosio&style=social&url=https%3A%2F%2Ftwitter.com%2Fkerberosio" alt="Twitter Widget"></a>
|
||||
<br>
|
||||
<a href="https://circleci.com/gh/kerberos-io/opensource"><img src="https://circleci.com/gh/kerberos-io/opensource.svg?style=svg"/></a>
|
||||
<a href="https://travis-ci.org/kerberos-io/opensource"><img src="https://travis-ci.org/kerberosio/opensource.svg?branch=master" alt="Build Status"></a>
|
||||
<a href="https://pkg.go.dev/github.com/pion/webrtc/v3"><img src="https://pkg.go.dev/badge/github.com/kerberos-io/opensource/v3" alt="PkgGoDev"></a>
|
||||
<a href="https://travis-ci.org/kerberos-io/opensource"><img src="https://travis-ci.org/kerberos-io/opensource.svg?branch=master" alt="Build Status"></a>
|
||||
<a href="https://pkg.go.dev/github.com/kerberos-io/opensource/backend"><img src="https://pkg.go.dev/badge/github.com/kerberos-io/opensource/backend" alt="PkgGoDev"></a>
|
||||
<a href="https://codecov.io/gh/kerberos-io/opensource"><img src="https://codecov.io/gh/kerberos-io/opensource/branch/master/graph/badge.svg" alt="Coverage Status"></a>
|
||||
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Commons Clause-yellow.svg" alt="License: Commons Clause"></a>
|
||||
|
||||
[](https://kerberos.io)
|
||||
|
||||
|
||||
[**Docker Hub**](https://hub.docker.com/r/kerberos/opensource) | [**Documentation**](https://doc.kerberos.io)
|
||||
|
||||
Kerberos Open source (v3) is a cutting edge video surveillance management system made available as Open source (Apache 2.0) with a Commons Clause License on top. This means that all the source code is available for you or your company, and you can use and transform it as long it is for non commercial usage. Read more [about the license here](LICENSE).
|
||||
|
||||
## Previous releases
|
||||
|
||||
This repository contains the next generation of Kerberos.io, **Kerberos Open Source (v3)**, and is the successor of the machinery and web repositories. A switch in technologies and architecture has been made.
|
||||
This repository contains the next generation of Kerberos.io, **Kerberos Open Source (v3)**, and is the successor of the machinery and web repositories. A switch in technologies and architecture has been made. This version is still under active development and can be followed on the [develop branch](https://github.com/kerberos-io/opensource/tree/develop) and [project overview](https://github.com/kerberos-io/opensource/projects/1). Kerberos Open Source (v3) is not yet released.
|
||||
|
||||
This version is still under active development and can be followed on the [develop branch](https://github.com/kerberos-io/opensource/tree/develop) and [project overview](https://github.com/kerberos-io/opensource/projects/1).
|
||||
Read more about this [at the FAQ](#faq) below.
|
||||
|
||||

|
||||
<img src="https://github.com//kerberos-io/opensource/raw/master/.github/images/kerberos-agent-v2-v3.png" width="500px">
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -48,14 +51,62 @@ Kerberos.io is a cutting edge video surveillance system with a strong focus on u
|
||||
|
||||
## How it works: A world of Agents 🕵🏼♂️
|
||||
|
||||
Kerberos.io applies the concept of agents. An agent is running next to or on your camera, and is processing a single camera feed. It applies motion based recording and make those recordings available through a user friendly web interface. Kerberos Open Source allows you to connect to other cloud services or custom applications. Kerberos Open Source is perfect for personal usage and/or is a great tool you only have a couple of surveillance cameras to be managed.
|
||||
Kerberos.io applies the concept of agents. An agent is running next to or on your camera, and is processing a single camera feed. It applies motion based recording and make those recordings available through a user friendly web interface. Kerberos Open Source allows you to connect to other cloud services or custom applications. Kerberos Open Source is perfect for personal usage and/or is a great tool if you only have a couple of surveillance cameras to be processed.
|
||||
|
||||
If you are looking for a solution that scales with your video surveillance or video analytics well, [Kerberos Enterprise might be a better fit](https://doc.kerberos.io/enterprise/introduction).
|
||||
|
||||
## Installation
|
||||
Kerberos Open Source comes with different installation flavours (it includes both the machinery and web repository). The reason is because depending on the use case one option is better than another. A short list of recommendations:
|
||||
Kerberos Open Source **will ship in different formats**: Docker, binary, snap, KiOS. Version 3 is still in active development right now, and not yet released.
|
||||
|
||||
- KiOS: You have a Raspberry Pi, and you only want to run a Kerberos agent on it.
|
||||
- Raspbian: You have a Raspberry Pi, but you want other services running next to the Kerberos agent.
|
||||
- Docker: You have a lot of IP cameras, and/or don't want to mess with dependencies.
|
||||
- Generic: You want to develop/extend Kerberos with your own features, or you want to run a Kerberos agent on a not supported OS/architecure.
|
||||
## Run
|
||||
|
||||
Kerberos Open Source is divided in two parts a `backend` and `frontend`. Both parts live in this repository in their relative folders.
|
||||
|
||||
### Backend
|
||||
|
||||
The `backend` is a **Golang** project which delivers two functions: it acts as the Kerberos Agent, and does the camera processing, on the other hand it acts as a webserver that communicaties directly with the front-end.
|
||||
|
||||
You can simply run the `backend` using following command.
|
||||
|
||||
git clone https://github.com/kerberos-io/opensource
|
||||
cd backend
|
||||
go run main.go run mycamername 8080
|
||||
|
||||
This will launch the Kerberos Agent and run a webserver on port `8080`. You can change the port by your own preference.
|
||||
|
||||
---
|
||||
|
||||
### Frontend
|
||||
|
||||
The `frontend` is a **React** project which is the main entry point for an end user to view recordings, a livestream, and modify the configuration of the `backend`
|
||||
|
||||
git clone https://github.com/kerberos-io/opensource
|
||||
cd frontend
|
||||
yarn start
|
||||
|
||||
This will start a webserver on port `3000`.
|
||||
|
||||
#### Build
|
||||
|
||||
After making changes you can run the `yarn build` command, this will create a build artifact and move it to the `backend/www` folder. By restarting the backend and navigating to `8080` you will see the React webpage (including your changes) visualised.
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
#### 1. Why a mono repo?
|
||||
|
||||
We have noticed in the past (v1 and v2) splitting the repositories (machinery and web), created a lot of confusion within our community. People didn't understand the different versions and so on. This caused a lack of collaboration, and made it impossible for some people to collaborate and contribute.
|
||||
|
||||
Having a mono repo, which is well organised, simplifies the entry point for new people who would like to use, understand and/or contribute to Kerberos Open Source.
|
||||
|
||||
#### 2. Why a change in technologies?
|
||||
|
||||
In previous version (v1 and v2) we used technologies like C++, PHP and BackboneJS. 7 years ago this was still acceptable, however time has changed and new technologies such as React and Golang became very popular.
|
||||
|
||||
Due to previous reason we have decided to rebuild the Kerberos Open Source technology from scratch, taking into account all the feedback we acquired over the years. Having these technologies available, we will enable more people to contribute and use our technology.
|
||||
|
||||
#### 3. What is the difference with Kerberos Enterprise?
|
||||
|
||||
We started the developments of Kerberos Enterprise a year ago, our main focus here was scalability, and fast development and easy deployment. We noticed that with technologies such as Golang and React, we can still provide a highly performant video surveillance system.
|
||||
|
||||
Kerberos Open Source will use the same technology stack, and some code pieces, of Kerberos Enterprise which we have already build. We have a very clear now, of how a well developed and documented video surveillance system needs to look like.
|
||||
13
backend/LICENSE
Normal file
13
backend/LICENSE
Normal file
@@ -0,0 +1,13 @@
|
||||
Commons Clause License Condition v1.0
|
||||
|
||||
The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.
|
||||
|
||||
Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.
|
||||
|
||||
For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.
|
||||
|
||||
Software: Kerberos Open Source
|
||||
|
||||
License: Apache-2.0
|
||||
|
||||
Licensor: Kerberos.io
|
||||
@@ -13,4 +13,3 @@
|
||||
|
||||
|
||||
[**Docker Hub**](https://hub.docker.com/r/kerberos/opensource) | [**Documentation**](https://doc.kerberos.io)
|
||||
|
||||
|
||||
5
backend/src/components/ONVIF.go
Normal file
5
backend/src/components/ONVIF.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package components
|
||||
|
||||
func Sum(x int, y int) int {
|
||||
return x + y
|
||||
}
|
||||
10
backend/src/components/ONVIF_test.go
Normal file
10
backend/src/components/ONVIF_test.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package components
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestSum(t *testing.T) {
|
||||
total := Sum(5, 5)
|
||||
if total != 10 {
|
||||
t.Errorf("Sum was incorrect, got: %d, want: %d.", total, 10)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user