Merge: b75e97eef c762d9d9b
Author: kobergj <jkoberg@owncloud.com>
Date:   Fri Dec 16 11:58:24 2022 +0100

    Merge pull request #5207 from kobergj/AsyncPostprocessing

    [full-ci] Async Postprocessing
This commit is contained in:
kobergj committed 2022-12-16 11:01:14 +00:00
1 parent 8c55d3aacf
commit 0335d88a0c
6 files changed
+197

No files matched your search

@@ -0,0 +1,123 @@
// set the attribute to true or leave empty, true without any quotes.
:show-deprecation: false
ifeval::[{show-deprecation} == true]
[[deprecation-note]]
[caption=]
[width="100%",cols="~,~,~,~",options="header"]
|===
| Deprecation Info
| Deprecation Version
| Removal Version
| Deprecation Replacment
|===
endif::[]
[caption=]
.Environment variables for the postprocessing service
[width="100%",cols="~,~,~,~",options="header"]
|===
| Name
| Type
| Default Value
| Description
a|`OCIS_LOG_LEVEL` +
`POSTPROCESSING_LOG_LEVEL` +
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
++ ++
a| [subs=-attributes]
The log level. Valid values are: "panic", "fatal", "error", "warn", "info", "debug", "trace".
a|`OCIS_LOG_PRETTY` +
`POSTPROCESSING_LOG_PRETTY` +
a| [subs=-attributes]
++bool ++
a| [subs=-attributes]
++false ++
a| [subs=-attributes]
Activates pretty log output.
a|`OCIS_LOG_COLOR` +
`POSTPROCESSING_LOG_COLOR` +
a| [subs=-attributes]
++bool ++
a| [subs=-attributes]
++false ++
a| [subs=-attributes]
Activates colorized log output.
a|`OCIS_LOG_FILE` +
`POSTPROCESSING_LOG_FILE` +
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
++ ++
a| [subs=-attributes]
The path to the log file. Activates logging to this file if set.
a|`POSTPROCESSING_EVENTS_ENDPOINT` +
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
++127.0.0.1:9233 ++
a| [subs=-attributes]
Endpoint of the event system.
a|`POSTPROCESSING_EVENTS_CLUSTER` +
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
++ocis-cluster ++
a| [subs=-attributes]
Cluster ID of the event system.
a|`OCIS_INSECURE` +
`SEARCH_EVENTS_TLS_INSECURE` +
a| [subs=-attributes]
++bool ++
a| [subs=-attributes]
++false ++
a| [subs=-attributes]
Whether to verify the server TLS certificates.
a|`SEARCH_EVENTS_TLS_ROOT_CA_CERTIFICATE` +
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
++ ++
a| [subs=-attributes]
The root CA certificate used to validate the server's TLS certificate. If provided SEARCH_EVENTS_TLS_INSECURE will be seen as false.
a|`POSTPROCESSING_VIRUSSCAN` +
a| [subs=-attributes]
++bool ++
a| [subs=-attributes]
++false ++
a| [subs=-attributes]
should the system do a virusscan? Needs antivirus service
a|`POSTPROCESSING_DELAY` +
a| [subs=-attributes]
++Duration ++
a| [subs=-attributes]
++0s ++
a| [subs=-attributes]
the sytem sleeps for this time while postprocessing
|===
@@ -331,6 +331,15 @@ a| [subs=-attributes]
a| [subs=-attributes]
When trying to lock files, ocis will multiply the cycle with this factor and use it as a millisecond timeout. Values of 0 or below will be ignored and the default value of 30 will be used.
a|`STORAGE_USERS_OCIS_ASYNC_UPLOADS` +
a| [subs=-attributes]
++bool ++
a| [subs=-attributes]
++false ++
a| [subs=-attributes]
Enable asynchronous file uploads.
a|`STORAGE_USERS_S3NG_ROOT` +
a| [subs=-attributes]
@@ -548,6 +557,24 @@ a| [subs=-attributes]
a| [subs=-attributes]
URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly exposed.
a|`STORAGE_USERS_DATA_GATEWAY_URL` +
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
++https://localhost:9200/data ++
a| [subs=-attributes]
URL of the data gateway server
a|`STORAGE_USERS_TRANSFER_EXPIRES` +
a| [subs=-attributes]
++int64 ++
a| [subs=-attributes]
++86400 ++
a| [subs=-attributes]
the time after which the token for upload postprocessing expires
a|`STORAGE_USERS_EVENTS_ENDPOINT` +
a| [subs=-attributes]
@@ -595,6 +622,15 @@ a| [subs=-attributes]
a| [subs=-attributes]
Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services..
a|`STORAGE_USERS_EVENTS_NUM_CONSUMERS` +
a| [subs=-attributes]
++int ++
a| [subs=-attributes]
++0 ++
a| [subs=-attributes]
The amount of concurrent event consumers to start. Event consumers are used for post-processing files. Multiple consumers increase parallelisation, but will also increase CPU and memory demands. The setting has no effect when the STORAGE_USERS_OCIS_ASYNC_UPLOADS is set to false. The default and minimum value is 1.
a|`OCIS_CACHE_STORE_TYPE` +
`STORAGE_USERS_CACHE_STORE_TYPE` +
`STORAGE_USERS_CACHE_STORE` +
@@ -0,0 +1,16 @@
# Autogenerated
# Filename: postprocessing-config-example.yaml
log:
level: ""
pretty: false
color: false
file: ""
postprocessing:
events:
endpoint: 127.0.0.1:9233
cluster: ocis-cluster
tls_insecure: false
tls_root_ca_certificate: ""
virusscan: false
delayprocessing: 0s
@@ -0,0 +1,14 @@
## Environment Variables
| Name | Type | Default Value | Description |
|------|------|---------------|-------------|
| OCIS_LOG_LEVEL<br/>POSTPROCESSING_LOG_LEVEL | string | | The log level. Valid values are: "panic", "fatal", "error", "warn", "info", "debug", "trace".|
| OCIS_LOG_PRETTY<br/>POSTPROCESSING_LOG_PRETTY | bool | false | Activates pretty log output.|
| OCIS_LOG_COLOR<br/>POSTPROCESSING_LOG_COLOR | bool | false | Activates colorized log output.|
| OCIS_LOG_FILE<br/>POSTPROCESSING_LOG_FILE | string | | The path to the log file. Activates logging to this file if set.|
| POSTPROCESSING_EVENTS_ENDPOINT | string | 127.0.0.1:9233 | Endpoint of the event system.|
| POSTPROCESSING_EVENTS_CLUSTER | string | ocis-cluster | Cluster ID of the event system.|
| OCIS_INSECURE<br/>SEARCH_EVENTS_TLS_INSECURE | bool | false | Whether to verify the server TLS certificates.|
| SEARCH_EVENTS_TLS_ROOT_CA_CERTIFICATE | string | | The root CA certificate used to validate the server's TLS certificate. If provided SEARCH_EVENTS_TLS_INSECURE will be seen as false.|
| POSTPROCESSING_VIRUSSCAN | bool | false | should the system do a virusscan? Needs antivirus service|
| POSTPROCESSING_DELAY | Duration | 0s | the sytem sleeps for this time while postprocessing|
@@ -46,6 +46,7 @@ drivers:
share_folder: /Shares
max_acquire_lock_cycles: 20
lock_cycle_duration_factor: 30
async_uploads: false
s3ng:
root: ~/.ocis/storage/users
user_layout: '{{.Id.OpaqueId}}'
@@ -72,12 +73,15 @@ drivers:
db_name: owncloud
users_provider_endpoint: localhost:9144
data_server_url: http://localhost:9158/data
data_gateway_url: https://localhost:9200/data
transfer_expires: 86400
events:
endpoint: 127.0.0.1:9233
cluster: ocis-cluster
tls_insecure: false
tls_root_ca_cert_path: ""
enable_tls: false
num_consumers: 0
cache:
store: memory
nodes: []
@@ -35,6 +35,7 @@
| STORAGE_USERS_OCIS_SHARE_FOLDER | string | /Shares | Name of the folder jailing all shares.|
| STORAGE_USERS_OCIS_MAX_ACQUIRE_LOCK_CYCLES | int | 20 | When trying to lock files, ocis will try this amount of times to acquire the lock before failing. After each try it will wait for an increasing amount of time. Values of 0 or below will be ignored and the default value of 20 will be used.|
| STORAGE_USERS_OCIS_LOCK_CYCLE_DURATION_FACTOR | int | 30 | When trying to lock files, ocis will multiply the cycle with this factor and use it as a millisecond timeout. Values of 0 or below will be ignored and the default value of 30 will be used.|
| STORAGE_USERS_OCIS_ASYNC_UPLOADS | bool | false | Enable asynchronous file uploads.|
| STORAGE_USERS_S3NG_ROOT | string | ~/.ocis/storage/users | The directory where the filesystem storage will store user files. If not definied, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users.|
| STORAGE_USERS_S3NG_USER_LAYOUT | string | {{.Id.OpaqueId}} | Template string for the user storage layout in the user directory.|
| STORAGE_USERS_PERMISSION_ENDPOINT<br/>STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT | string | 127.0.0.1:9191 | Endpoint of the permissions service.|
@@ -59,11 +60,14 @@
| STORAGE_USERS_OWNCLOUDSQL_DB_NAME | string | owncloud | Name of the database to be used.|
| STORAGE_USERS_OWNCLOUDSQL_USERS_PROVIDER_ENDPOINT | string | localhost:9144 | Endpoint of the users provider.|
| STORAGE_USERS_DATA_SERVER_URL | string | http://localhost:9158/data | URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly exposed.|
| STORAGE_USERS_DATA_GATEWAY_URL | string | https://localhost:9200/data | URL of the data gateway server|
| STORAGE_USERS_TRANSFER_EXPIRES | int64 | 86400 | the time after which the token for upload postprocessing expires|
| STORAGE_USERS_EVENTS_ENDPOINT | string | 127.0.0.1:9233 | The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture.|
| STORAGE_USERS_EVENTS_CLUSTER | string | ocis-cluster | The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system.|
| OCIS_INSECURE<br/>STORAGE_USERS_EVENTS_TLS_INSECURE | bool | false | Whether to verify the server TLS certificates.|
| STORAGE_USERS_EVENTS_TLS_ROOT_CA_CERT | string | | The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_EVENTS_TLS_INSECURE will be seen as false.|
| OCIS_EVENTS_ENABLE_TLS<br/>STORAGE_USERS_EVENTS_ENABLE_TLS | bool | false | Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services..|
| STORAGE_USERS_EVENTS_NUM_CONSUMERS | int | 0 | The amount of concurrent event consumers to start. Event consumers are used for post-processing files. Multiple consumers increase parallelisation, but will also increase CPU and memory demands. The setting has no effect when the STORAGE_USERS_OCIS_ASYNC_UPLOADS is set to false. The default and minimum value is 1.|
| OCIS_CACHE_STORE_TYPE<br/>STORAGE_USERS_CACHE_STORE_TYPE<br/>STORAGE_USERS_CACHE_STORE | string | memory | Store implementation for the cache. Valid values are "memory" (default), "redis", and "etcd".|
| OCIS_CACHE_STORE_ADDRESS<br/>STORAGE_USERS_CACHE_STORE_ADDRESS<br/>STORAGE_USERS_CACHE_NODES | []string | [] | Node addresses to use for the cache store.|
| STORAGE_USERS_CACHE_DATABASE | string | users | Database name of the cache.|