Skip to content

Commit

Permalink
try fix read me
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridlah committed Dec 23, 2024
1 parent e7251ce commit ac5f036
Showing 1 changed file with 163 additions and 164 deletions.
327 changes: 163 additions & 164 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,142 +1,141 @@
# smartface



![Version: 0.8.9](https://img.shields.io/badge/Version-0.8.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5_4.29.0](https://img.shields.io/badge/AppVersion-v5_4.29.0-informational?style=flat-square)

SmartFace is a Scalable Facial Recognition Server Platform Able to Process Multiple Real-Time Video Streams. Currently the helm chart supports edge stream and Lightweight Face Identification System (LFIS) deployments

**Homepage:** <https://www.innovatrics.com/face-recognition-solutions/>

## TL;DR

```
helm install smartface oci://ghcr.io/innovatrics/sf-helm/smartface
```

## Prerequisites

The helm chart needs certain objects to be present in the cluster before it can be installed. Refer to `external-config.yaml` for examples for the required objects:

1. [Registry credentials secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line)
- Get the credentials from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `imagePullSecrets` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with credentials

1. License file secret
- Get the license file from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `license.secretName` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with license file

1. Optionally [KEDA](https://keda.sh/) for autoscaling
- see `autoscaling.*` values for more info

## Ingress

By default an ingress object is created with the helm chart. To configure the ingress please see the `ingress.*` values

## Tests

[Helm chart tests](https://helm.sh/docs/topics/chart_tests/) are included and can be run using `helm test` command. The aim of these tests is to touch most of the deployments to check wether SmartFace components deployed successfully and are working. Their successful completion is not a guarantee that the application is fully functional.

Based on the configured functionality of the helm chart (values) some tests might not be run as they might require functionality which is not deployed. Please see the test pod templates to see the impact of configured values to test pods which are run in the helm chart tests.

In case the tests fail please refer to the output of the test pod to identify the issue.

### Test data

During the tests some data (Watchlists / EdgeStreams) will be created in the deployed smartface. The tests will try to cleanup all data they created without touching any other data present in the system, but the note that the cleanup might fail for various reasons, resulting in test data being left behind in the system.



![Version: 0.8.9](https://img.shields.io/badge/Version-0.8.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5_4.29.0](https://img.shields.io/badge/AppVersion-v5_4.29.0-informational?style=flat-square)

SmartFace is a Scalable Facial Recognition Server Platform Able to Process Multiple Real-Time Video Streams. Currently the helm chart supports edge stream and Lightweight Face Identification System (LFIS) deployments

**Homepage:** <https://www.innovatrics.com/face-recognition-solutions/>

## TL;DR

```
helm install smartface oci://ghcr.io/innovatrics/sf-helm/smartface
```

## Prerequisites

The helm chart needs certain objects to be present in the cluster before it can be installed. Refer to `external-config.yaml` for examples for the required objects:

1. [Registry credentials secret](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line)
- Get the credentials from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `imagePullSecrets` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with credentials

1. License file secret
- Get the license file from [Customer portal](https://customerportal.innovatrics.com)
- The secret name must match `license.secretName` value
- see comments in `external-config.yaml` for commands to create kubernetes manifest with license file

1. Optionally [KEDA](https://keda.sh/) for autoscaling
- see `autoscaling.*` values for more info

## Ingress

By default an ingress object is created with the helm chart. To configure the ingress please see the `ingress.*` values

## Tests

[Helm chart tests](https://helm.sh/docs/topics/chart_tests/) are included and can be run using `helm test` command. The aim of these tests is to touch most of the deployments to check wether SmartFace components deployed successfully and are working. Their successful completion is not a guarantee that the application is fully functional.

Based on the configured functionality of the helm chart (values) some tests might not be run as they might require functionality which is not deployed. Please see the test pod templates to see the impact of configured values to test pods which are run in the helm chart tests.

In case the tests fail please refer to the output of the test pod to identify the issue.

### Test data

During the tests some data (Watchlists / EdgeStreams) will be created in the deployed smartface. The tests will try to cleanup all data they created without touching any other data present in the system, but the note that the cleanup might fail for various reasons, resulting in test data being left behind in the system.

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| oci://ghcr.io/innovatrics/sf-helm | sf-tenant-management | 0.4.4 |
| oci://registry-1.docker.io/bitnamicharts | minio | 12.8.15 |
| oci://registry-1.docker.io/bitnamicharts | postgresql | 13.2.1 |
| oci://registry-1.docker.io/bitnamicharts | rabbitmq | 12.0.4 |

All chart dependencies are optional and can be disabled and supplemented with other (for example cloud-based) alternatives

### RabbitMQ
To use non-chart managed rabbitmq:
- set `rabbitmq.enabled=false`
- provide rabbitmq configuration via:
- supplying values to `rabbitmq.rmqConfiguration` object
- or creating ConfigMap and setting `rabbitmq.rmqConfiguration.existingConfigMapName`
- see Sample objects for example
- create Secret with rabbitmq password
- supply `rabbitmq.existingSecretName` value with name of existing secret
- see Sample objects for example

#### Sample objects
```
apiVersion: v1
kind: ConfigMap
metadata:
name: "sf-rmq-connection"
data:
hostname: "<hostname>"
username: "<username>"
port: "5671"
useSsl: "true"
streamsPort: "5552"
```

```
apiVersion: v1
kind: Secret
metadata:
name: "rmq-pass"
stringData:
rabbitmq-password: "<password>"
```

### S3
To use S3 bucket managed by AWS:
- set `minio.enabled=false`
- provide s3 configuration via:
- supplying values to `configurations.s3` object
- or creating ConfigMap and setting `configurations.s3.existingConfigMapName`
- see Sample objects for example
- When using S3 bucket and running in AWS the authentication can be performed using could-native mechanisms:
- to authenticate using EC2 instance profile set `configurations.s3.authType` to `InstanceProfile`
- to authenticate using AssumedRole set `configurations.s3.authType` to `AssumedRole` (useful for example when using [EKS IRSA](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html))

#### Sample objects
```
apiVersion: v1
kind: ConfigMap
metadata:
name: "sf-s3-connection"
data:
name: "smartface"
region: "eu-central-1"
folder: "sface"
authType: "AssumedRole"
useBucketRegion: "true"
```

### Postgresql
To use externally managed PgSQL instance:
- set `postgresql.enabled=false`
- provide databse configuration:
- create a Secret - see `external-config.yaml` for example
- secret name must match `configurations.database.secretName` value
- key in the Secret must match `configurations.database.connectionStringKey` value
- see Sample objects for example

#### Sample objects
```
apiVersion: v1
stringData:
# supply pgsql server connection string - https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/connection-strings
cs: "Server=<hostname>;Database=<db-name>;Username=<username>;Password=<password>;"
kind: Secret
metadata:
name: db-cs
```

| oci://registry-1.docker.io/bitnamicharts | rabbitmq | 12.0.4 |

All chart dependencies are optional and can be disabled and supplemented with other (for example cloud-based) alternatives

### RabbitMQ
To use non-chart managed rabbitmq:
- set `rabbitmq.enabled=false`
- provide rabbitmq configuration via:
- supplying values to `rabbitmq.rmqConfiguration` object
- or creating ConfigMap and setting `rabbitmq.rmqConfiguration.existingConfigMapName`
- see Sample objects for example
- create Secret with rabbitmq password
- supply `rabbitmq.existingSecretName` value with name of existing secret
- see Sample objects for example

#### Sample objects
```
apiVersion: v1
kind: ConfigMap
metadata:
name: "sf-rmq-connection"
data:
hostname: "<hostname>"
username: "<username>"
port: "5671"
useSsl: "true"
streamsPort: "5552"
```

```
apiVersion: v1
kind: Secret
metadata:
name: "rmq-pass"
stringData:
rabbitmq-password: "<password>"
```

### S3
To use S3 bucket managed by AWS:
- set `minio.enabled=false`
- provide s3 configuration via:
- supplying values to `configurations.s3` object
- or creating ConfigMap and setting `configurations.s3.existingConfigMapName`
- see Sample objects for example
- When using S3 bucket and running in AWS the authentication can be performed using could-native mechanisms:
- to authenticate using EC2 instance profile set `configurations.s3.authType` to `InstanceProfile`
- to authenticate using AssumedRole set `configurations.s3.authType` to `AssumedRole` (useful for example when using [EKS IRSA](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html))

#### Sample objects
```
apiVersion: v1
kind: ConfigMap
metadata:
name: "sf-s3-connection"
data:
name: "smartface"
region: "eu-central-1"
folder: "sface"
authType: "AssumedRole"
useBucketRegion: "true"
```

### Postgresql
To use externally managed PgSQL instance:
- set `postgresql.enabled=false`
- provide databse configuration:
- create a Secret - see `external-config.yaml` for example
- secret name must match `configurations.database.secretName` value
- key in the Secret must match `configurations.database.connectionStringKey` value
- see Sample objects for example

#### Sample objects
```
apiVersion: v1
stringData:
# supply pgsql server connection string - https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/connection-strings
cs: "Server=<hostname>;Database=<db-name>;Username=<username>;Password=<password>;"
kind: Secret
metadata:
name: db-cs
```

## Values

| Key | Type | Default | Description |
Expand Down Expand Up @@ -746,43 +745,43 @@ metadata:
| wlStreamPopulationJob.image.tag | string | `nil` | Overrides the image tag whose default is the chart's appVersion |
| wlStreamPopulationJob.nodeSelector | object | `{}` | |
| wlStreamPopulationJob.resources | object | `{}` | |
| wlStreamPopulationJob.tolerations | list | `[]` | |

| wlStreamPopulationJob.tolerations | list | `[]` | |

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Innovatrics | | <https://www.innovatrics.com/> |

| Innovatrics | | <https://www.innovatrics.com/> |

## Source Code

* <https://github.com/innovatrics/sf-helm>
* <https://github.com/innovatrics/smartface>

## Breaking changes

### [v0.8.0]
- Changed default behavior for creating Authentication configuration. If you like to continue managing the previously created Authentication config map please use the `configurations.apiAuth.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.apiAuth`
- This change also includes renaming previous field `configurations.apiAuth.configName` -> `configurations.apiAuth.existingConfigMapName`

### [v0.6.0]
- deployment of SmartFace Station is now disabled by default. To reenable previous behavior with deploying SmartFace Station please set the `station.enabled` value to `true`.
- previous behavior with enabled SmartFace Station caused the installation of helm chart with default values to fail on validation because SmartFace Station is currently dependant on SmartFace API with enabled authentication, which in turn requires the existence of external authentication provider and correct configuration of relevant SmartFace services
- Changed default behavior for creating Authentication configuration. If you like to continue managing the previously created Authentication config map please use the `configurations.apiAuth.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.apiAuth`
- This change also includes renaming previous field `configurations.apiAuth.configName` -> `configurations.apiAuth.existingConfigMapName`

### [v0.5.0]
- MinIO subchart is enabled and used by default. To keep using S3 bucket managed outside of this helm chart please set the `minio.enabled` value to `false` and provide configuration details via `configurations.s3`
- Postgresql subchart is enabled and used by default. To keep using PgSQL instance managed outside of this helm chart please set the `postgresql.enabled` value to `false` and provide configuration details via `configurations.database`

### [v0.4.0]
- Changed default behavior for creating S3 configuration. If you like to continue managing the previously created S3 config map please use the `configurations.s3.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.s3`
- The ConfigMap keys for existing config map are no longer configurable, so if you want to keep using the ConfigMap not managed by this chart then please make sure that the key match what the helm chart expects
- Some values have had their keys changed or moved around:
- database secret -> value key changed from `configurations.database.secretName` to `configurations.database.existingSecretName`
- rmq secret values moved to auth parent object -> from `rabbitmq.existingSecretName` to `rabbitmq.auth.existingSecretName` and `rabbitmq.secretKey` to `rabbitmq.auth.secretKey`
- rmq configuration reworked -> value key `rabbitmq.configMapName` and `rabbitmq.mqttConfigMapName` replaced with `existingConfigMapName` key in `rabbitmq.rmqConfiguration` and `rabbitmq.mqttConfiguration` objects respectively
- mqtt dns host configuration changed -> value key `rabbitmq.mqttDnsHost` replaced with object with key `rabbitmq.mqttPublicService` that can be disabled
- deployment selectors changed
- autoscaling configuration reworked -> moved rmq and cron configuration related to services their respective sub-objects e.g. for detector from `autoscaling.detector` to `autoscaling.cron.detector` and `autoscaling.rmq.detector`
- Deployment label selectors and pod labels were modified to use a more standardized approach. Unfortunately since label selector are immutable and thus the helm release cannot be upgraded. Please first use `helm uninstall` and a fresh `helm install` for upgrading. For more information see the [official documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates)
* <https://github.com/innovatrics/smartface>

## Breaking changes

### [v0.8.0]
- Changed default behavior for creating Authentication configuration. If you like to continue managing the previously created Authentication config map please use the `configurations.apiAuth.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.apiAuth`
- This change also includes renaming previous field `configurations.apiAuth.configName` -> `configurations.apiAuth.existingConfigMapName`

### [v0.6.0]
- deployment of SmartFace Station is now disabled by default. To reenable previous behavior with deploying SmartFace Station please set the `station.enabled` value to `true`.
- previous behavior with enabled SmartFace Station caused the installation of helm chart with default values to fail on validation because SmartFace Station is currently dependant on SmartFace API with enabled authentication, which in turn requires the existence of external authentication provider and correct configuration of relevant SmartFace services
- Changed default behavior for creating Authentication configuration. If you like to continue managing the previously created Authentication config map please use the `configurations.apiAuth.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.apiAuth`
- This change also includes renaming previous field `configurations.apiAuth.configName` -> `configurations.apiAuth.existingConfigMapName`

### [v0.5.0]
- MinIO subchart is enabled and used by default. To keep using S3 bucket managed outside of this helm chart please set the `minio.enabled` value to `false` and provide configuration details via `configurations.s3`
- Postgresql subchart is enabled and used by default. To keep using PgSQL instance managed outside of this helm chart please set the `postgresql.enabled` value to `false` and provide configuration details via `configurations.database`

### [v0.4.0]
- Changed default behavior for creating S3 configuration. If you like to continue managing the previously created S3 config map please use the `configurations.s3.existingConfigMapName` field. Otherwise the ConfigMap will be managed by the helm chart using the values provided in `configurations.s3`
- The ConfigMap keys for existing config map are no longer configurable, so if you want to keep using the ConfigMap not managed by this chart then please make sure that the key match what the helm chart expects
- Some values have had their keys changed or moved around:
- database secret -> value key changed from `configurations.database.secretName` to `configurations.database.existingSecretName`
- rmq secret values moved to auth parent object -> from `rabbitmq.existingSecretName` to `rabbitmq.auth.existingSecretName` and `rabbitmq.secretKey` to `rabbitmq.auth.secretKey`
- rmq configuration reworked -> value key `rabbitmq.configMapName` and `rabbitmq.mqttConfigMapName` replaced with `existingConfigMapName` key in `rabbitmq.rmqConfiguration` and `rabbitmq.mqttConfiguration` objects respectively
- mqtt dns host configuration changed -> value key `rabbitmq.mqttDnsHost` replaced with object with key `rabbitmq.mqttPublicService` that can be disabled
- deployment selectors changed
- autoscaling configuration reworked -> moved rmq and cron configuration related to services their respective sub-objects e.g. for detector from `autoscaling.detector` to `autoscaling.cron.detector` and `autoscaling.rmq.detector`
- Deployment label selectors and pod labels were modified to use a more standardized approach. Unfortunately since label selector are immutable and thus the helm release cannot be upgraded. Please first use `helm uninstall` and a fresh `helm install` for upgrading. For more information see the [official documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates)

0 comments on commit ac5f036

Please sign in to comment.