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
Once your Codefresh On-Prem instance is installed, configured, and confirmed to be ready for production use, the following variables must be set to `false` or removed:
182
+
183
+
```yaml
184
+
global:
185
+
env:
186
+
MONGOOSE_AUTO_INDEX: "false"
187
+
MONGO_AUTOMATIC_INDEX_CREATION: "false"
188
+
```
189
+
170
190
## Chart Configuration
171
191
172
192
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
@@ -1391,6 +1411,85 @@ To see all the claims supported by Codefresh OIDC provider, see `claims_supporte
1391
1411
1392
1412
Use [obtain-oidc-id-token](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/obtain-oidc-id-token/step.yaml#L27-L58) and [aws-sts-assume-role-with-web-identity](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/aws-sts-assume-role-with-web-identity/step.yaml#L29-L63) steps to exchange the OIDC token (JWT) for a cloud access token.
1393
1413
1414
+
## Maintaining MongoDB Indexes
1415
+
1416
+
Sometimes, in new releases of Codefresh On-Prem, index requirements change. When this happens, it's mentioned in the [Upgrading section](#upgrading) for the specific release.
1417
+
1418
+
> ℹ️ If you're upgrading from version `X` to version `Y`, and index requirements were updated in any of the intermediate versions, you only need to align your indexes with the index requirements of version `Y`. To do that, follow [Index alignment](#index-alignment) instructions.
1419
+
1420
+
### Index alignment
1421
+
1422
+
The required index definitions for each release can be found at the following resources:
The indexes are stored in JSON files with keys and options specified.
1427
+
1428
+
The directory structure is:
1429
+
1430
+
```console
1431
+
indexes
1432
+
├── <DB_NAME> # MongoDB database name
1433
+
│ ├── <COLLECTION_NAME>.json # MongoDB indexes for the specified collection
1434
+
```
1435
+
1436
+
**Overview of the index alignment process:**
1437
+
1438
+
1. Identify the differences between the indexes in your MongoDB instance and the required index definitions.
1439
+
2. Create any missing indexes one by one. (It's important not to create them in bulk.)
1440
+
3. Perform the upgrade of Codefresh On-Prem installation.
1441
+
4. Then remove any unnecessary indexes.
1442
+
1443
+
> ⚠️ **Note! Any changes to indexes should be performed during a defined maintenance window or during periods of lowest traffic to MongoDB.**
1444
+
>
1445
+
> Building indexes during time periods where the target collection is under heavy write load can result in reduced write performance and longer index builds. ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/index-creation/#index-build-impact-on-database-performance))
1446
+
>
1447
+
> Even minor changes to indexes (e.g., index removal) can cause brief but noticeable performance degradation ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/query-plans/#plan-cache-flushes))
1448
+
1449
+
#### Self-hosted MongoDB
1450
+
1451
+
For self-hosted MongoDB, follow the instructions below:
1452
+
1453
+
- Connect to the MongoDB server using the [mongosh](https://www.mongodb.com/docs/mongodb-shell/install/) shell. Open your terminal or command prompt and run the following command, replacing `<connection_string>` with the appropriate MongoDB connection string for your server:
1454
+
1455
+
```shell
1456
+
mongosh "<connection_string>"
1457
+
```
1458
+
1459
+
- Retrieve the list of indexes for a specific collection:
- Compare your indexes with the required indexes for the target release, and adjust them by creating any missing indexes or removing any unnecessary ones
1466
+
1467
+
**Index creation**
1468
+
1469
+
> ⚠ **Note! Always create indexes sequentially, one by one. Don't create them in bulk.**
1470
+
1471
+
- To create an index, use the `createIndex()` method:
If you're hosting MongoDB on [Atlas](https://www.mongodb.com/atlas/database), use the following [Manage Indexes](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/) guide to View, Create or Remove indexes.
1490
+
1491
+
> ⚠️ **Important!** In Atlas, for production environments, it is recommended to use rolling index builds by enabling the "Build index via rolling process" checkbox. ([*MongoDB official documentation*](https://www.mongodb.com/docs/v6.0/tutorial/build-indexes-on-replica-sets/))
1492
+
1394
1493
## Upgrading
1395
1494
1396
1495
### To 2.0.0
@@ -1926,6 +2025,10 @@ cfapi:
1926
2025
1927
2026
### To 2.6.0
1928
2027
2028
+
> ⚠️ **WARNING! MongoDB indexes changed!**
2029
+
>
2030
+
> Please, follow [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) guide to meet index requirements **BEFORE** the upgrade process.
2031
+
1929
2032
### [What's new in 2.6.x](https://codefresh.io/docs/docs/whats-new/on-prem-release-notes/#on-premises-version-26)
1930
2033
1931
2034
#### Affected values
@@ -1964,32 +2067,6 @@ cfapi:
1964
2067
digest: ""
1965
2068
```
1966
2069
1967
-
#### Auto-index creation in MongoDB
1968
-
1969
-
In Codefresh On-Prem 2.6.x, the `cfapi` can create indexes in MongoDB automatically. This feature is disabled by default. To enable it, set the following environment variable:
1970
-
1971
-
> **Note!** Enabling this feature can cause performance degradation during the index creation process.
1972
-
1973
-
> **Note!** It is recommended to add indexes during a maintenance window. The indexes list is provided in `codefresh/files/indexes/<MAJOR.MINOR>/<collection_name>.json` files.
1974
-
1975
-
```yaml
1976
-
cfapi:
1977
-
container:
1978
-
env:
1979
-
MONGOOSE_AUTO_INDEX: "true"
1980
-
```
1981
-
1982
-
```yaml
1983
-
argo-platform:
1984
-
api-graphql:
1985
-
env:
1986
-
MONGO_AUTOMATIC_INDEX_CREATION: "true"
1987
-
```
1988
-
1989
-
Ref:
1990
-
- [Create an Index in Atlas DB](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/#create-an-index)
1991
-
- [Create an Index with mongosh](https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndex/)
1992
-
1993
2070
## Troubleshooting
1994
2071
1995
2072
### Error: Failed to validate connection to Docker daemon; caused by Error: certificate has expired
Once your Codefresh On-Prem instance is installed, configured, and confirmed to be ready for production use, the following variables must be set to `false` or removed:
183
+
184
+
```yaml
185
+
global:
186
+
env:
187
+
MONGOOSE_AUTO_INDEX: "false"
188
+
MONGO_AUTOMATIC_INDEX_CREATION: "false"
189
+
```
190
+
171
191
## Chart Configuration
172
192
173
193
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
@@ -1397,6 +1417,85 @@ To see all the claims supported by Codefresh OIDC provider, see `claims_supporte
1397
1417
1398
1418
Use [obtain-oidc-id-token](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/obtain-oidc-id-token/step.yaml#L27-L58) and [aws-sts-assume-role-with-web-identity](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/aws-sts-assume-role-with-web-identity/step.yaml#L29-L63) steps to exchange the OIDC token (JWT) for a cloud access token.
1399
1419
1420
+
## Maintaining MongoDB Indexes
1421
+
1422
+
Sometimes, in new releases of Codefresh On-Prem, index requirements change. When this happens, it's mentioned in the [Upgrading section](#upgrading) for the specific release.
1423
+
1424
+
> ℹ️ If you're upgrading from version `X` to version `Y`, and index requirements were updated in any of the intermediate versions, you only need to align your indexes with the index requirements of version `Y`. To do that, follow [Index alignment](#index-alignment) instructions.
1425
+
1426
+
### Index alignment
1427
+
1428
+
The required index definitions for each release can be found at the following resources:
The indexes are stored in JSON files with keys and options specified.
1433
+
1434
+
The directory structure is:
1435
+
1436
+
```console
1437
+
indexes
1438
+
├── <DB_NAME> # MongoDB database name
1439
+
│ ├── <COLLECTION_NAME>.json # MongoDB indexes for the specified collection
1440
+
```
1441
+
1442
+
**Overview of the index alignment process:**
1443
+
1444
+
1. Identify the differences between the indexes in your MongoDB instance and the required index definitions.
1445
+
2. Create any missing indexes one by one. (It's important not to create them in bulk.)
1446
+
3. Perform the upgrade of Codefresh On-Prem installation.
1447
+
4. Then remove any unnecessary indexes.
1448
+
1449
+
> ⚠️ **Note! Any changes to indexes should be performed during a defined maintenance window or during periods of lowest traffic to MongoDB.**
1450
+
>
1451
+
> Building indexes during time periods where the target collection is under heavy write load can result in reduced write performance and longer index builds. ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/index-creation/#index-build-impact-on-database-performance))
1452
+
>
1453
+
> Even minor changes to indexes (e.g., index removal) can cause brief but noticeable performance degradation ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/query-plans/#plan-cache-flushes))
1454
+
1455
+
#### Self-hosted MongoDB
1456
+
1457
+
For self-hosted MongoDB, follow the instructions below:
1458
+
1459
+
- Connect to the MongoDB server using the [mongosh](https://www.mongodb.com/docs/mongodb-shell/install/) shell. Open your terminal or command prompt and run the following command, replacing `<connection_string>` with the appropriate MongoDB connection string for your server:
1460
+
1461
+
1462
+
```shell
1463
+
mongosh "<connection_string>"
1464
+
```
1465
+
1466
+
- Retrieve the list of indexes for a specific collection:
- Compare your indexes with the required indexes for the target release, and adjust them by creating any missing indexes or removing any unnecessary ones
1473
+
1474
+
**Index creation**
1475
+
1476
+
> ⚠ **Note! Always create indexes sequentially, one by one. Don't create them in bulk.**
1477
+
1478
+
- To create an index, use the `createIndex()` method:
If you're hosting MongoDB on [Atlas](https://www.mongodb.com/atlas/database), use the following [Manage Indexes](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/) guide to View, Create or Remove indexes.
1497
+
1498
+
> ⚠️ **Important!** In Atlas, for production environments, it is recommended to use rolling index builds by enabling the "Build index via rolling process" checkbox. ([*MongoDB official documentation*](https://www.mongodb.com/docs/v6.0/tutorial/build-indexes-on-replica-sets/))
1400
1499
1401
1500
## Upgrading
1402
1501
@@ -1934,6 +2033,10 @@ cfapi:
1934
2033
1935
2034
### To 2.6.0
1936
2035
2036
+
> ⚠️ **WARNING! MongoDB indexes changed!**
2037
+
>
2038
+
> Please, follow [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) guide to meet index requirements **BEFORE** the upgrade process.
2039
+
1937
2040
### [What's new in 2.6.x](https://codefresh.io/docs/docs/whats-new/on-prem-release-notes/#on-premises-version-26)
1938
2041
1939
2042
#### Affected values
@@ -1972,33 +2075,6 @@ cfapi:
1972
2075
digest: ""
1973
2076
```
1974
2077
1975
-
#### Auto-index creation in MongoDB
1976
-
1977
-
In Codefresh On-Prem 2.6.x, the `cfapi` can create indexes in MongoDB automatically. This feature is disabled by default. To enable it, set the following environment variable:
1978
-
1979
-
> **Note!** Enabling this feature can cause performance degradation during the index creation process.
1980
-
1981
-
> **Note!** It is recommended to add indexes during a maintenance window. The indexes list is provided in `codefresh/files/indexes/<MAJOR.MINOR>/<collection_name>.json` files.
1982
-
1983
-
```yaml
1984
-
cfapi:
1985
-
container:
1986
-
env:
1987
-
MONGOOSE_AUTO_INDEX: "true"
1988
-
```
1989
-
1990
-
```yaml
1991
-
argo-platform:
1992
-
api-graphql:
1993
-
env:
1994
-
MONGO_AUTOMATIC_INDEX_CREATION: "true"
1995
-
```
1996
-
1997
-
Ref:
1998
-
- [Create an Index in Atlas DB](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/#create-an-index)
1999
-
- [Create an Index with mongosh](https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndex/)
2000
-
2001
-
2002
2078
## Troubleshooting
2003
2079
2004
2080
### Error: Failed to validate connection to Docker daemon; caused by Error: certificate has expired
0 commit comments