add pipeline

This commit is contained in:
cedricve
2021-10-01 21:34:07 +02:00
parent 721b85c99d
commit f884da3d27
7 changed files with 528 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

View File

@@ -46,7 +46,7 @@ You can create a new site, by navigating to the sites page and clicking the `(+
{{< figure src="hub-add-site.gif" alt="Structure your Kerberos Agents by using sites, and introduce Access Control for sub accounts." caption="Structure your Kerberos Agents by using sites, and introduce Access Control for sub accounts." class="stretch">}}
### Groups
## Groups
Groups are similar to sites, the only difference is that it is more abstract than a site. A group can be for example "Cash desks", "Entrance gates", "All stores of Belgium", "EMEA sites", etc. A group can be either a collection of sites, what we call then a **site group**, or it can contain a number of cameras from one or more sites, what we call a **group**.
@@ -55,3 +55,37 @@ Similar to sites, groups can also be used to give access to specific Kerberos Ag
You can create a new group, by navigating to the groups page and clicking the `(+ Add Group)` button at the left top.
{{< figure src="hub-add-group.gif" alt="Structure your Kerberos Agents by using groups, another level of flexibility." caption="Structure your Kerberos Agents by using groups, another level of flexibility." class="stretch">}}
## Cameras
On the cameras page you will have an overview of all the
cameras, Kerberos Agents, your (sub) account has access too. This means that if your account only has access to a couple of sites or groups, the cameras page will only show the Kerberos Agents that belong to the relating groups and sites.
{{< figure src="hub-cameras.gif" alt="Structure your Kerberos Agents by using groups, another level of flexibility." caption="Structure your Kerberos Agents by using groups, another level of flexibility." class="stretch">}}
By clicking on the `(+ Add Camera)` button, you will see a modal explaining you how to connect a Kerberos Agents to Kerberos Hub, and the different deployments which are available.
### Assign a Kerberos Agent
As explained in the modal, there are different possibilities to set up and run a Kerberos Agent.
Nevertheless, how you deployed a Kerberos Agent, to connect the Kerberos Agent to Kerberos Hub, you will require the account credentials from your Kerberos Hub account to be shared with your Kerberos Agents. By sharing those credentials you are linking your Kerberos Agents to the relevant Kerberos Hub account.
By navigating to the profile page, and selecting your plan you will find the required credentials for your Kerberos Agents.
Please note that when you are using the Kerberos Hub Saas offering you will need both an access and secret key. If you are using Kerberos Hub self-hosted you will only need an access key.
{{< figure src="hub-link-agent.gif" alt="Get your credentials to link your Kerberos Agents." caption="Get your credentials to link your Kerberos Agents." class="stretch">}}
## Integrations
You got your accounts setup, sites and groups created and last but not least some Kerberos Agents connected to your Kerberos Hub.
Now it is time to configure some integrations using alerts and channels. The idea of integrations is that you can send messages to other third-party solutions on your own APIs, when an important/interesting event occurred.
{{< figure src="hub-alerts.gif" alt="Get your credentials to link your Kerberos Agents." caption="Get your credentials to link your Kerberos Agents." class="stretch">}}
## What's next
Want to learn more how Kerberos Hub is working under the hood? Then [have a look at the Kerberos Hub pipeline page](/hub/pipeline) where we introduce the microservice architecture.

View File

@@ -13,5 +13,5 @@ weight: 305
toc: true
---
Kerberos Hub is licensed through a monthly or yearly subscription. Depending on the
Kerberos Hub is licensed through a monthly or yearly subscription. Find more information about the licensing and features on [the Kerberos Hub landing page](https://kerberos.io/product/hub/).

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 103 KiB

View File

@@ -12,5 +12,77 @@ menu:
weight: 304
toc: true
---
Kerberos Hub leverages a pipeline of microservices to execute specific tasks. Each time a recording is uploaded to Kerberos Vault, it will forward an event to Kerberos Hub, which on its turn will activate a pipeline consisting of a series of microservices.
{{< figure src="hub-pipeline.svg" alt="Pipelines to scale the processing." caption="Pipelines to scale the processing." class="stretch">}}
Each microservice in the Kerberos Hub pipeline will be responsible for a specific action or process. The pipeline acts as an event mesh, that sends messages from one microservice to the other in an asynchronous matter. Important to note is that it is possible to customize the pipeline and bring you own microservices inside the pipeline; using the programming languages you prefer.
# How it works
Each time a recording is being uploaded to Kerberos Vault, and event is sent to Kerberos Hub, and a pipeline is started for that specific recording; and thus event. The pipeline will start sending messages towards to the different microservices in sequence and/or in parallel, depending on how the microservices and pipeline is configured. Once the pipeline is executed, and all related microservices are finished, the pipeline is done, and it will go in idle mode until the next event is received.
The distribution of messages is done through a Kafka broker and the concept of Kafka topics. Each microservice consume messages of its own Kafka topic. As soon as a microservice receives a message on its topic, it knows it has to do something, and execute the action he is responsible for. By having Kafka and the concept of topics we have a loosely coupled event architecture that we can easily extend with additional function and features (microservices).
The different kafka topics and microservices we have in place are.
- Orchestrator - `kcloud-event-queue`
- Monitoring - `kcloud-monitor-queue`
- Sequencer - `kcloud-sequence-queue`
- Analyser - `kcloud-analysis-queue`
- Throttler - `kcloud-throttler-queue`
- Notification - `kcloud-notification-queue`
## Orchestrator
> kcloud-event-queue
A pipeline starts with the first microservice being executed, that is the event microservice, listening to the `kcloud-event-queue` topic. The event microservice is the dispatcher service that forwards messages back and forth. It reads the to be processed microservices, and forwards the message to the next microservice, so it can be consumed. Once the microservice is completed it will send the message back to the event microservice.
## Monitoring
> kcloud-monitor-queue
The first microservice in the pipeline is the monitoring microservice, this will verify a couple of things and store some metadata. It will keep track of
- the MB of data being stored,
- the latest event for each Kerberos Agent,
- if an account has to be disabled due to reaching its upload limit
- etc.
The monitoring microservice is like the name said, a monitoring step in the entire pipeline, it will keep track of some analytics that are useful to be shown in the Kerberos Hub application.
## Sequencer
> kcloud-sequence-queue
This is where the magic happens. The sequencer is responsible for grouping recordings that belong to a close time window, it makes it possible to handle individual events as group of events, so that it can be more easily queried.
The sequencer microservice is build in such a way that it can group events, even if they are delayed, or the connection from the Kerberos Agent was interrupted for some time. The sequencer will be able to recover and properly sequence in whatever situation.
## Analyser
> kcloud-analysis-queue
As recordings are sequenced the analyser will take care of some post-processing. Additional computations and algorithms are being executed in parallel on the uploaded recordings such as:
- Dominant color
- thumbnail,
- machine learning and object tracking, etc.
Once the analyser is hit, it will send out several messages in parallel to the different microservices to compute the previously mentioned requests. As soon as results come in, asynchronously, the analysis step is completed, and the next microservice is triggered.
## Throttler
> kcloud-throttler-queue
Messages that reach the throttler microservice will go in a throttling function, that controls the number of events going out. The reason of throttling is to limit the number of message being sent to the next microservice. Easy said, it is a way to limit and protect it against a huge amount of incoming data.
Let's say you have a lot of recordings being generated at once, this would result in a lot of messages being generated. When this happens you do not want to send notifications or other actions for every single message, you rather have a single message for all of them. This is what the throttler is for.
## Notification
> kcloud-notification-queue
After the throttler has been executed, it's time to send out alerts and notifications which you have setup. Depending on your alert settings, the notification microservice will send out a specific notification to your selected channels.