github datalens-tech/datalens v2.0.0
v2.0.0 (2025-04-10)

latest releases: v2.5.0, v2.4.2, v2.4.1...
5 months ago

Image versions

BREAKING CHANGES

  • Single PostgreSQL container now hosts all databases (pg-us-db, pg-auth-db, pg-compeng-db, pg-demo-db) for a simplified architecture and easier management
  • Demo data is now provided with the datalens-postgres container that can be enabled/disabled via the init script
  • PostgreSQL data is now stored in a persistent volume (db-postgres) instead of local filesystem storage for better data durability
  • Zitadel has been removed and replaced with a new native auth service (datalens-auth) for improved authentication and authorization
  • User accounts from Zitadel will be removed during migration. You need to recreate users in the new auth system
  • New security scheme with randomly generated value of CONTROL_API_CRYPTO_KEY variable for improving data protection
  • New production-ready docker-compose setup with init.sh script for automated deployment and configuration

Migration guide from 1.x.x to 2.x.x

# if you use a version earlier to 1.23.0 you need to delete old table columns before migration
docker compose exec -T pg-us psql -U us -d us-db-ci_purgeable -c 'ALTER TABLE workbooks DROP COLUMN project_id;'
docker compose exec -T pg-us psql -U us -d us-db-ci_purgeable -c 'ALTER TABLE collections DROP COLUMN project_id;'

# backup all united-storage entries with command
docker compose exec -T pg-us pg_dump --inserts --on-conflict-do-nothing -Fc -a \
  --table entries \
  --table revisions \
  --table workbooks \
  --table collections \
  --table links \
  -U us us-db-ci_purgeable >./datalens_db.dump

# down docker compose
docker compose down

# checkout to the actual main branch with git
git checkout origin/main

# up new datalens production ready version with auto generated secrets
./init.sh --disable-demo --up

# restore backup with built-in script

# ? if you want restore without demo data database
./scripts/restore-entries.sh ./datalens_db.dump

# ? if you want restore with demo data database
./scripts/restore-entries.sh --demo ./datalens_db.dump

# ? if you do not want override old passwords at connections use
./scripts/restore-entries.sh --disable-fix-connections ./datalens_db.dump

# after success migration you can delete old database persistence directories
rm -rf metadata && rm -rf pg-demo-connection

Notes:

  • If you use a new value of CONTROL_API_CRYPTO_KEY you need to update your source passwords in Connections resources in the DataLens interface after migration is completed.

  • If you use the old demo data with the old database schema opensource-demo. you need to run manually this command after migration is completed:

docker compose exec -T postgres psql --username pg-user --dbname pg-us-db -c "UPDATE revisions SET data = REPLACE(data::text, 'opensource-demo', 'public')::jsonb;"

Deploy

  • Backend: Add linux/arm64 images for all services datalens-tech/datalens-backend#893
  • Add Helm chart support for Kubernetes deployment with customizable configuration options (see helm/ directory)
  • Add Terraform example for infrastructure deployment on cloud providers with complete application setup (see terraform/ directory)
  • Add help argument for init.sh script with all available options (run ./init.sh --help for details)

New features

Bug fixes

Dependencies

Don't miss a new datalens release

NewReleases is sending notifications on new releases.