You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.mdx
+51-30Lines changed: 51 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Wave Application Configuration
1
+
# Wave application configuration
2
2
3
-
Set Wave configuration values using environment variables or in [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml) configuration file
3
+
Set Wave configuration values using environment variables or in the [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml) configuration file.
4
4
5
5
### config.yml configuration
6
6
@@ -16,15 +16,15 @@ Environment variables for various attributes has been listed in third column, ei
16
16
17
17
## General configuration
18
18
19
-
General configuration options such as wave application name, port, whether to allow anonymous access (without tower token), wave and Seqera platform url.
19
+
General configuration options such as Wave application name, port, whether to allow anonymous access (without tower token), Wave and Seqera platform url.
20
20
21
21
-**`micronaut.application.name`**: the name of the Wave application. By default, it is set to `wave-app`. *Optional*.
22
22
23
23
-**`micronaut.server.port`**: the port used by the Wave server. The default port is `8080`. *Optional*.
24
24
25
-
-**`wave.allowAnonymous`**: specifies whether anonymous access to the Wave server is permitted. By default, it is set to `false`, meaning authentication is required. Change this option based on your security requirements. *Mandatory*.
25
+
-**`wave.allowAnonymous`**: specifies whether anonymous access to the Wave server is permitted. By default, it is set to `false`, meaning authentication is required. Change this option based on your security requirements.*Mandatory*.
26
26
27
-
-**`wave.server.url`**: the URL for the Wave server. You can also set it using `${WAVE_SERVER_URL}` environment variable. *Optional*.
27
+
-**`wave.server.url`**: the URL for the Wave server. It can be set using `${WAVE_SERVER_URL}` environment variable. *Optional*.
28
28
29
29
-**`wave.tokens.cache.duration`**: the duration for cached tokens generated by Wave. The default is `1h`, and you can modify it according to your token caching preferences. *Optional*.
30
30
@@ -36,10 +36,13 @@ General configuration options such as wave application name, port, whether to al
36
36
## Container registry configuration
37
37
38
38
The generic format for the attributes is `wave.registries.<registry_name>.username` and `wave.registries.<registry_name>.password`.
39
-
You need to specify all the repositories you will use in the respective wave installation.
39
+
You need to specify all the repositories you will use in the respective Wave installation.
40
40
Below are the standard format for known registries, but you can change registry name `(azurecr.io)` to specific one like `seqeralabs.azurecr.io `.
41
41
42
-
**Note**: Container registry credentials can be defined in [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml) too. These configurations are important for the wave authentication to the repositories used to push or pull artifacts.
42
+
:::note
43
+
Container registry credentials can be defined in [`config.yml`](https://github.com/seqeralabs/wave/blob/master/config.yml) too.
44
+
These configurations are important for the Wave authentication to the repositories used to push or pull artifacts.
45
+
:::
43
46
44
47
-**`wave.registries.default`**: the default Docker registry for Wave. The default is `docker.io`, and it represents the Docker Hub. *Optional*.
45
48
@@ -55,10 +58,6 @@ Below are the standard format for known registries, but you can change registry
55
58
56
59
-**`wave.registries.<AWS ECR Repo name>.password`**: the AWS ECR password for authentication. An example AWS ECR Repo name is `195996028523.dkr.ecr.eu-west-1.amazonaws.com`. It can be set using `${AWS_SECRET_ACCESS_KEY}` environment variable. *Optional*.
57
60
58
-
-**`wave.registries.<azurecr Repo name>.username`**: the Azure Container Registry username for authentication. An example of an Azure Container Registry Repo name is `seqeralabs.azurecr.io`. It can be set using `${AZURECR_USER}` environment variable. *Optional*.
59
-
60
-
-**`wave.registries.<azurecr Repo name>.password`**: the Azure Container Registry password or PAT for authentication. An example of an Azure Container Registry Repo name is `seqeralabs.azurecr.io`. It can be set using `${AZURECR_PAT}` environment variable. *Optional*.
61
-
62
61
## HTTP client configuration
63
62
64
63
-**`wave.httpclient.connectTimeout`**: sets the connection timeout for the HTTP client. Its default value is `20s`. *Optional*.
@@ -73,7 +72,7 @@ Below are the standard format for known registries, but you can change registry
73
72
74
73
-**`wave.httpclient.retry.multiplier`**: defines the multiplier for HTTP client retries. Its default value is `1.0`. *Optional*.
75
74
76
-
-**`micronaut.http.services.stream-client.read-timeout`**: sets the read timeout for the streaming HTTP client. Its default value is `30s`. *Optional*.
75
+
-**`micronaut.http.services.stream-client.read-timeout`**: sets the read timeout for the streaming HTTP client. Its default value is `30s`.*Optional*.
77
76
78
77
-**`micronaut.http.services.stream-client.read-idle-timeout`**: configures the read idle timeout for the streaming HTTP client. Its default value is `120s`. *Optional*.
79
78
@@ -93,15 +92,15 @@ Below are the standard format for known registries, but you can change registry
93
92
94
93
-**`wave.build.repo`**: specifies the Docker container repository for the Docker images built by Wave. This setting is required to define where the images will be stored. *Mandatory*.
95
94
96
-
-**`wave.build.cache`**: determines the Docker container repository used to cache layers of images built by Wave. *Mandatory*.
95
+
-**`wave.build.cache`**: determines the Docker container repository used to cache layers of images built by Wave.*Mandatory*.
97
96
98
-
-**`wave.build.status.delay`**: sets the delay between build status checks. Its default value is `5s`, providing a reasonable interval for status checks. *Optional*.
97
+
-**`wave.build.status.delay`**: sets the delay between build status checks. Its default value is `5s`, providing a reasonable interval for status checks.*Optional*.
99
98
100
-
-**`wave.build.status.duration`**: defines the duration for build status checks. Its default value is `1d` (1 day), indicating how long the system should check the build status. *Optional*.
99
+
-**`wave.build.status.duration`**: defines the duration for build status checks. Its default value is `1d` (1 day), indicating how long the system should check the build status.*Optional*.
101
100
102
101
-**`wave.build.public`**: indicates whether the Docker container repository is public. If set to true, Wave freeze will prefer this public repository over `wave.build.repo`. *Optional*.
103
102
104
-
-**`wave.build.oci-mediatypes`**: defines whether to use OCI mediatypes in exported manifests. its default value is `true`. *Optional*.
103
+
-**`wave.build.oci-mediatypes`**: defines whether to use OCI media types in exported manifests. Its default value is `true`. *Optional*.
105
104
106
105
-**`wave.build.compression`**: defines which type of compression will be applied to cache layers. its default value is `gzip` and other options are `uncompressed|estargz|zstd`. *Optional*.
107
106
@@ -113,6 +112,10 @@ This configuration specifies attributes for the persistence of the logs fetched
113
112
114
113
-**`wave.build.logs.bucket`**: the AWS S3 bucket where Wave will store build process logs. *Mandatory*.
115
114
115
+
-**`wave.build.logs.path`**: the path inside `wave.build.logs.bucket`, where build logs will be stored. *Mandatory*.
116
+
117
+
-**`wave.build.locks.path`**: the path inside `wave.build.logs.bucket`, where conda lock files will be stored. *Mandatory*.
118
+
116
119
-**`wave.build.logs.prefix`**: sets the prefix to be used for build process log files in the specified S3 bucket. *Optional*.
117
120
118
121
-**`wave.build.logs.maxLength`**: determines the maximum number of bytes that can be read from a log file. If a log file exceeds this limit, it will be truncated. The default value is `100000` (100 KB). *Optional*.
@@ -122,7 +125,9 @@ This configuration specifies attributes for the persistence of the logs fetched
122
125
123
126
Kubernetes configuration has options specific for k8s, and most of them, except CPU and memory, are the same for the build and scan process.
124
127
125
-
**Note**: only applies when using Kubernetes.
128
+
:::note
129
+
These settings apply only when running on Kubernetes.
130
+
:::
126
131
127
132
-**`wave.build.k8s.namespace`**: the Kubernetes namespace where Wave will run its build pods. This is a required setting, specifying the namespace to isolate and manage the Wave build processes within the Kubernetes cluster. *Mandatory*.
128
133
@@ -156,7 +161,9 @@ Scan process configuration lets the user provide a [Trivy docker image](https://
156
161
157
162
Wave scan process uses the same k8s configuration of the build process except for CPU and memory requirements for the k8s pod.
158
163
159
-
**Note**: only applies when using Kubernetes.
164
+
:::note
165
+
These settings apply only when using Kubernetes.
166
+
:::
160
167
161
168
-**`wave.scan.k8s.resources.requests.cpu`**: the amount of [CPU resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes) allocated to Wave scan processes. For instance, you can set it to `2` or `1500Mi` (1.5 CPU cores). *Optional*.
162
169
@@ -166,7 +173,9 @@ Wave scan process uses the same k8s configuration of the build process except fo
166
173
167
174
Rate limit configuration controls the limits of anonymous and authenticated users' access to Wave.
168
175
169
-
**Note**: Change these properties to tweak rate limits in wave.
176
+
:::note
177
+
Change these properties to tweak rate limits in Wave.
178
+
:::
170
179
171
180
-**`rate-limit.build.anonymous`**: the rate limit for anonymous build requests. By default, it allows up to 25 build requests per hour (`25/1d`) from anonymous users. This setting controls the frequency at which anonymous users can trigger build processes in Wave. *Mandatory*.
172
181
@@ -180,19 +189,23 @@ Rate limit configuration controls the limits of anonymous and authenticated user
180
189
181
190
## Database and cache configuration
182
191
192
+
### Redis configuration
193
+
183
194
-**`redis.uri`**: the Uniform Resource Identifier (URI) for connecting to Redis, a popular in-memory data store. By default, it uses the format `redis://${REDIS_HOST:redis}:${REDIS_PORT:6379}`, allowing customization of the Redis host and port through environment variables. *Mandatory*.
184
195
185
196
-**`redis.pool.enabled`**: whether to enable the Redis pool. It is set to `true` by default, enabling the use of a connection pool for efficient management of connections to the Redis server. *Optional*.
186
197
187
-
-**`redis.pool.minIdle`**: Specifies the minimum number of idle connections to maintain in the Redis connection pool. The default value is `0`. This ensures that connections are readily available for use. *Optional*.
198
+
-**`redis.pool.minIdle`**: specifies the minimum number of idle connections to maintain in the Redis connection pool. The default value is `0`. This ensures that connections are readily available for use. *Optional*.
188
199
189
-
-**`redis.pool.maxIdle`**: Specifies the maximum number of idle connections to maintain in the Redis connection pool. The default value is `10`. *Optional*.
200
+
-**`redis.pool.maxIdle`**: specifies the maximum number of idle connections to maintain in the Redis connection pool. The default value is `10`. *Optional*.
190
201
191
-
-**`redis.pool.maxTotal`**: Specifies the maximum number of connections that can be maintained in the Redis connection pool. The default value is `50`. This helps to manage resource usage efficiently while supporting high demand. *Optional*.
202
+
-**`redis.pool.maxTotal`**: specifies the maximum number of connections that can be maintained in the Redis connection pool. The default value is `50`. This helps to manage resource usage efficiently while supporting high demand. *Optional*.
192
203
193
-
-**`redis.client.timeout`**: Defines the timeout duration (in milliseconds) for Redis client operations. The default value is `5000` (5 seconds). *Optional*.
204
+
-**`redis.client.timeout`**: defines the timeout duration (in milliseconds) for Redis client operations. The default value is `5000` (5 seconds). *Optional*.
194
205
195
-
-**`redis.password`**: Specifies the password used to authenticate with the Redis server. This is needed when redis authentication is enabled. *Optional*.
206
+
-**`redis.password`**: specifies the password used to authenticate with the Redis server. This is needed when redis authentication is enabled. *Optional*.
207
+
208
+
### SurrealDB configuration
196
209
197
210
-**`surreal.default.ns`**: the namespace for the Surreal database. It can be set using `${SURREALDB_NS}` environment variable. *Mandatory*.
198
211
@@ -206,6 +219,14 @@ Rate limit configuration controls the limits of anonymous and authenticated user
206
219
207
220
-**`surreal.default.init-db`**: whether to create database tables, records and indices at application startup and `db`. *Optional*.
208
221
222
+
### PostgreSQL configuration
223
+
224
+
-**`wave.db.uri`**: JDBC connection string for the PostgreSQL database. For example, `jdbc:postgresql://localhost:5432/wave`. It can be set using `${WAVE_DB_URI}` environment variable. *Mandatory*.
225
+
226
+
-**`wave.db.user`**: Username for authenticating with the PostgreSQL database. It can be set using `${WAVE_DB_USER}` environment variable. *Mandatory*.
227
+
228
+
-**`wave.db.password`**: Password for the PostgreSQL database user. It can be set using `${WAVE_DB_PASSWORD}` environment variable. *Mandatory*.
229
+
209
230
## Blob Cache configuration
210
231
211
232
Wave offers a feature to provide a cache for Docker blobs, which improves the performance of supplying blobs to the client. If you use Kubernetes, Wave can also use the k8s pod to delegate the transfer task for scalability.
@@ -222,7 +243,7 @@ Wave offers a feature to provide a cache for Docker blobs, which improves the pe
222
243
223
244
-**`wave.blobCache.baseUrl`**: the URL, which will override the base URL (part of URL before the blob path) of blobs sent to the end client. *Optional*.
224
245
225
-
-**`wave.blobCache.signing-strategy`**: the URL signing strategy for different services. Currently, Wave offers it for AWS S3 and Cloudflare and you can use the respective values to enable them `aws-presigned-url` and `cloudflare-waf-token`. *Mandatory*.
246
+
-**`wave.blobCache.signing-strategy`**: the URL signing strategy for different services. Currently, Wave offers it for AWS S3 and Cloudflare and you can use the respective values to enable them `aws-presigned-url` and `cloudflare-waf-token`. *Mandatory*.
226
247
227
248
-**`wave.blobCache.cloudflare.lifetime`**: the validity of the cloud flare WAF token. *Mandatory*.
228
249
@@ -246,20 +267,20 @@ Wave offers a feature to provide a cache for Docker blobs, which improves the pe
246
267
247
268
## Email configuration
248
269
249
-
Email id to send emails from on the behalf of the Wave service.
270
+
Email ID to send emails from on the behalf of the Wave service.
250
271
251
-
-**`mail.from`**: specifies the sender's email address for Wave notifications. This email address serves as the point of origin for any emails sent by Wave, providing a recognizable source for notifications. This setting is crucial for configuring the sender identity when Wave sends email notifications. *Mandatory*.
272
+
-**`mail.from`**: specifies the sender's email address for Wave notifications. This email address serves as the point of origin for any emails sent by Wave, providing a recognizable source for notifications. This setting is crucial for configuring the sender identity when Wave sends email notifications. *Mandatory*.
252
273
253
274
## Metrics configuration
254
275
255
276
Wave Metrics service provides data about container builds and pulls per ip, container image, and user.
256
277
257
-
-**`wave.metrics.enabled`**: whether to enable the wave metrics. It is `false` by default. *Optional*.
278
+
-**`wave.metrics.enabled`**: whether to enable the Wave metrics. It is `false` by default. *Optional*.
258
279
259
280
## Accounts configuration
260
281
261
-
-**`wave.accounts`**: Specifies a list of credentials to access authenticated wave APIs like metrics APIs. *Mandatory*.<br/>
282
+
-**`wave.accounts`**: specifies a list of credentials to access authenticated Wave APIs like metrics APIs. *Mandatory*.<br/>
- Ensure you have a PostgreSQL database set up and accessible from wave.
6
+
7
+
## Migration Steps
8
+
1. Create verification data, run some builds, scans, augmentation and mirror operations in Wave and note down buildId, scanId, token and mirrorId respectively for verification.
1. Ensure you have all necessary credentials for both [SurrealDB](configuration.mdx#SurrealDB configuration) and [PostgreSQL](configuration.mdx#PostgreSQL configuration).
32
+
2. Enable the following environment by adding them in `MICRONAUT_ENVIRONMENTS`:
33
+
-`postgres`
34
+
-`surrealdb`
35
+
-`migrate`
36
+
-`redis`
37
+
3. Start Wave application and check whether the migration is successful by checking the logs.
38
+
```
39
+
INFO i.s.w.s.p.m.DataMigrationService - Data migration service initialized
40
+
```
41
+
4. check for the following logs:
42
+
```
43
+
INFO i.s.w.s.p.m.DataMigrationService - All wave_request records migrated.
44
+
INFO i.s.w.s.p.m.DataMigrationService - All wave_scan records migrated.
45
+
INFO i.s.w.s.p.m.DataMigrationService - All wave_build records migrated.
46
+
INFO i.s.w.s.p.m.DataMigrationService - All wave_mirror records migrated.
47
+
```
48
+
5. Remove the `migrate` and `surrealdb`environment from `MICRONAUT_ENVIRONMENTS` to stop the migration process and restart wave.
49
+
50
+
6. Verify the migration by checking the PostgreSQL database for the migrated data and also run same curl from step one.
0 commit comments