UBERF-12325: Add mongo warning for v7 (#9543)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-07-15 16:52:37 +07:00
committed by GitHub
parent 05b6da54b3
commit eb11d3515e
13 changed files with 67 additions and 36 deletions
+1
View File
@@ -1,3 +1,4 @@
STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
MONGO_URL=mongodb://mongodb:27018?compressors=snappy
DB_PG_URL=postgresql://root@cockroach:26257/defaultdb?sslmode=disable
QUEUE_CONFIG=redpanda:9093
+21 -24
View File
@@ -1,15 +1,13 @@
version: '3'
services:
mongodb:
image: 'mongo:7-jammy'
cockroach:
image: cockroachdb/cockroach:v24.1.2
extra_hosts:
- 'huly.local:host-gateway'
command: mongod --port 27018
environment:
- PUID=1000
- PGID=1000
ports:
- 27018:27018
- '26258:26257'
- '18089:8080'
command: start-single-node --insecure
restart: unless-stopped
redpanda:
image: docker.redpanda.com/redpandadata/redpanda:v24.3.6
@@ -93,7 +91,7 @@ services:
- 'huly.local:host-gateway'
pull_policy: never
links:
- mongodb
- cockroach
- minio
ports:
- 3003:3003
@@ -104,7 +102,7 @@ services:
- ACCOUNT_PORT=3003
- SERVER_SECRET=secret
- WORKSPACE_LIMIT_PER_USER=100
- DB_URL=mongodb://mongodb:27018
- DB_URL=${DB_PG_URL}
- TRANSACTOR_URL=ws://transactor:3334;ws://huly.local:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
- BRANDING_PATH=/var/cfg/branding-test.json
@@ -113,15 +111,14 @@ services:
extra_hosts:
- 'huly.local:host-gateway'
links:
- mongodb
- cockroach
- minio
volumes:
- ./branding-test.json:/var/cfg/branding.json
environment:
- QUEUE_CONFIG=${QUEUE_CONFIG}
- SERVER_SECRET=secret
- DB_URL=mongodb://mongodb:27018
- MONGO_URL=mongodb://mongodb:27018
- DB_URL=${DB_PG_URL}
- TRANSACTOR_URL=ws://transactor:3334;ws://huly.local:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
- ACCOUNTS_URL=http://account:3003
@@ -134,7 +131,7 @@ services:
pull_policy: never
links:
- account
- mongodb
- cockroach
- minio
- elastic
- collaborator
@@ -147,7 +144,6 @@ services:
- SERVER_PORT=8083
- SERVER_SECRET=secret
- ACCOUNTS_URL=http://huly.local:3003
- MONGO_URL=mongodb://mongodb:27018
- UPLOAD_URL=/files
- GMAIL_URL=http://huly.local:8088
- CALENDAR_URL=http://huly.local:8095
@@ -164,7 +160,7 @@ services:
- 'huly.local:host-gateway'
pull_policy: never
links:
- mongodb
- cockroach
- minio
- rekoni
- account
@@ -177,7 +173,7 @@ services:
- SERVER_PROVIDER=${SERVER_PROVIDER}
- SERVER_PORT=3334
- SERVER_SECRET=secret
- DB_URL=mongodb://mongodb:27018
- DB_URL=${DB_PG_URL}
- METRICS_CONSOLE=false
- METRICS_FILE=metrics.txt
- STORAGE_CONFIG=${STORAGE_CONFIG}
@@ -194,7 +190,7 @@ services:
extra_hosts:
- 'huly.local:host-gateway'
links:
- mongodb
- cockroach
- minio
- transactor
ports:
@@ -204,7 +200,6 @@ services:
- SECRET=secret
- ACCOUNTS_URL=http://account:3003
- UPLOAD_URL=/files
- MONGO_URL=mongodb://mongodb:27018
- STORAGE_CONFIG=${STORAGE_CONFIG}
restart: unless-stopped
rekoni:
@@ -221,8 +216,6 @@ services:
- 4003:4005
environment:
- SECRET=secret
- MONGO_URL=${MONGO_URL}
- MONGO_OPTIONS={"appName":"print","maxPoolSize":1}
- STORAGE_CONFIG=${STORAGE_CONFIG}
- ACCOUNTS_URL=http://account:3003
deploy:
@@ -241,8 +234,6 @@ services:
- ../services/sign/pod-sign/debug/branding.json:/var/cfg/branding.json
environment:
- SECRET=secret
- MONGO_URL=${MONGO_URL}
- MONGO_OPTIONS={"appName":"sign","maxPoolSize":1}
- MINIO_ENDPOINT=minio
- MINIO_ACCESS_KEY=minioadmin
- ACCOUNTS_URL=http://account:3003
@@ -257,17 +248,23 @@ services:
fulltext:
image: hardcoreeng/fulltext
restart: unless-stopped
depends_on:
redpanda:
condition: service_started
cockroach:
condition: service_started
links:
- elastic
- mongodb
- cockroach
- rekoni
- redpanda
ports:
- 4710:4710
environment:
- QUEUE_CONFIG=${QUEUE_CONFIG}
- PORT=4710
- SERVER_SECRET=secret
- DB_URL=mongodb://mongodb:27018
- DB_URL=${DB_PG_URL}
- FULLTEXT_DB_URL=http://elastic:9200
- ELASTIC_INDEX_NAME=local_storage_index
- STORAGE_CONFIG=${STORAGE_CONFIG}
+2 -2
View File
@@ -3,8 +3,8 @@ export MINIO_ACCESS_KEY=minioadmin
export MINIO_SECRET_KEY=minioadmin
export MINIO_ENDPOINT=localhost:9000
export MONGO_URL=mongodb://localhost:27017
export DB_URL=mongodb://localhost:27017
export ACCOUNT_DB_URL=mongodb://localhost:27017
export DB_URL=postgresql://root@localhost:26257/defaultdb?sslmode=disable
export ACCOUNT_DB_URL=postgresql://root@localhost:26257/defaultdb?sslmode=disable
export ACCOUNTS_URL=http://localhost:3000
export TRANSACTOR_URL=ws://localhost:3333
export SERVER_SECRET=secret
+2 -2
View File
@@ -6,8 +6,8 @@ export MINIO_ENDPOINT=localhost:9002
export ACCOUNTS_URL=http://localhost:3003
export TRANSACTOR_URL=ws://localhost:3334
export MONGO_URL=mongodb://localhost:27018
export ACCOUNT_DB_URL=mongodb://localhost:27018
export DB_URL=mongodb://localhost:27018
export ACCOUNT_DB_URL=postgresql://root@localhost:26258/defaultdb?sslmode=disable
export DB_URL=postgresql://root@localhost:26258/defaultdb?sslmode=disable
export SERVER_SECRET=secret
export STORAGE_CONFIG="minio|localhost:9002?accessKey=minioadmin&secretKey=minioadmin"
export QUEUE_CONFIG=huly.local:19093
+23
View File
@@ -49,6 +49,29 @@ export function serveAccount (measureCtx: MeasureContext, brandings: BrandingMap
process.exit(1)
}
if (dbUrl.startsWith('mongodb://')) {
if (process.env.PROCEED_V7_MONGO !== 'true') {
console.error(`
⚠️ IMPORTANT: MongoDB Deprecation Notice
MongoDB support is deprecated in v7 and will be removed in future versions. Important details:
1. New features may not be available with MongoDB
2. Testing coverage for MongoDB will be limited
3. Upgrading to v7 with MongoDB will PERMANENTLY LOCK your deployment to MongoDB-specific types
4. Migration to CockroachDB will NOT be possible after upgrading
➡️ Recommended Action:
Migrate to CockroachDB before upgrading to v7. See migration instructions at:
https://github.com/hcengineering/huly-selfhost
To proceed with MongoDB (despite these limitations):
Set environment variable PROCEED_V7_MONGO=true.
`)
process.exit(1)
}
}
const oldAccsUrl = process.env.OLD_ACCOUNTS_URL ?? (dbUrl.startsWith('mongodb://') ? dbUrl : undefined)
const oldAccsNs = process.env.OLD_ACCOUNTS_NS
@@ -74,7 +74,6 @@ export interface Workspace {
endpoint: string
region?: string // Transactor group name
targetRegion?: string // Transactor region to move to
backupInfo?: BackupStatus
@@ -32,7 +32,8 @@ export function getMigrations (ns: string): [string, string][] {
getV11Migration(ns),
getV12Migration(ns),
getV13Migration(ns),
getV14Migration(ns)
getV14Migration(ns),
getV15Migration(ns)
]
}
@@ -425,3 +426,13 @@ function getV14Migration (ns: string): [string, string] {
`
]
}
function getV15Migration (ns: string): [string, string] {
return [
'account_db_v15_add_target_region_to_workspace_status',
`
ALTER TABLE ${ns}.workspace_status
ADD COLUMN IF NOT EXISTS target_region STRING;
`
]
}
+1
View File
@@ -2,6 +2,7 @@ services:
account:
environment:
- DB_URL=${DB_PG_URL}
- PROCEED_V7_MONGO=false
transactor:
environment:
- DB_URL=${DB_PG_URL}
+1
View File
@@ -125,6 +125,7 @@ services:
- ADMIN_EMAILS=admin,${PLATFORM_ADMIN_EMAILS}
- WORKSPACE_LIMIT_PER_USER=100
- DB_URL=${MONGO_URL}
- PROCEED_V7_MONGO=true
- REGION_INFO=|America
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
- STORAGE_CONFIG=${STORAGE_CONFIG}
+1 -1
View File
@@ -137,7 +137,7 @@ services:
- ADMIN_EMAILS=admin,${PLATFORM_ADMIN_EMAILS}
- STATS_URL=http://huly.local:4901
- WORKSPACE_LIMIT_PER_USER=100
- DB_URL=${MONGO_URL}
- DB_URL=${DB_EU_URL}
# - REGION_INFO=|America;europe| # Europe without name will not be available for creation of new workspaces.
- REGION_INFO=|America;europe|Europe
- TRANSACTOR_URL=ws://huly.local:3334;ws://huly.local:3334,ws://huly.local:3335;ws://huly.local:3335;europe
+1 -2
View File
@@ -6,8 +6,7 @@ export MINIO_SECRET_KEY=minioadmin
export MINIO_ENDPOINT=huly.local:9002
export ACCOUNTS_URL=http://huly.local:3003
export TRANSACTOR_URL=ws://huly.local:3334
# export ACCOUNT_DB_URL=postgresql://root@huly.local:26258/defaultdb?sslmode=disable
export ACCOUNT_DB_URL=mongodb://huly.local:27018
export ACCOUNT_DB_URL=postgresql://root@huly.local:26258/defaultdb?sslmode=disable
export MONGO_URL=mongodb://huly.local:27018
export ELASTIC_URL=http://huly.local:9201
export SERVER_SECRET=secret
+1 -1
View File
@@ -4,7 +4,7 @@ export MINIO_SECRET_KEY=minioadmin
export MINIO_ENDPOINT=huly.local:9000
export MONGO_URL=mongodb://huly.local:27017
export DB_URL=mongodb://huly.local:27017
export ACCOUNT_DB_URL=mongodb://huly.local:27017
export ACCOUNT_DB_URL=postgresql://root@huly.local:26257/defaultdb?sslmode=disable
export ACCOUNTS_URL=http://huly.local:3000
export TRANSACTOR_URL=ws://huly.local:3333
export ELASTIC_URL=http://huly.local:9200
+1 -2
View File
@@ -6,8 +6,7 @@ export MINIO_SECRET_KEY=minioadmin
export MINIO_ENDPOINT=huly.local:9002
export ACCOUNTS_URL=http://huly.local:3003
export TRANSACTOR_URL=ws://huly.local:3334
# export ACCOUNT_DB_URL=postgresql://root@huly.local:26258/defaultdb?sslmode=disable
export ACCOUNT_DB_URL=mongodb://huly.local:27018
export ACCOUNT_DB_URL=postgresql://root@huly.local:26258/defaultdb?sslmode=disable
export MONGO_URL=mongodb://huly.local:27018
export ELASTIC_URL=http://huly.local:9201
export SERVER_SECRET=secret