DE4 to DE5 App Migration

This guide can help you if your organization has upgraded from Dash Enterprise 4.X to Dash Enterprise 5.X
and you need to redeploy Dash apps that you previously deployed to Dash Enterprise 4.X.

Some DE4 features are not supported in DE5 and other features work differently,
meaning in many cases you’ll need to make some updates to your DE4 apps for them to run on DE5.
For example, although both DE4 and DE5 support pip and Conda buildpacks, the buildpacks use some different files in DE5.

Key differences in DE5
- Different default Python, pip, and Miniconda versions.
- For Conda apps, dependencies are now specified in an environment.yml file,
instead of with conda-requirements.txt and requirements.txt. A requirements.txt file prevents Conda-based dependencies from being installed.
- Changing the Python version is now done via a project.toml file instead of runtime.txt. In Conda,
the Python version can be set in environment.yml.
- Different URL for Dash Enterprise packages (you’ll need to change any --extra-index-urls).
- APT packages are now installed using one Aptfile.
- Pre-deploy and post-deploy scripts are configured in project.toml instead of app.json.

See also: Dash Enterprise 5.0 Breaking Changes.

App Migration Steps

  1. Initialize a new app on DE5.
  2. Update the app’s project structure and files to make the app DE5-compatible.
  3. Add any services that the app requires.
  4. Add any environment variables that the app requires.
  5. If your DE4 app uses local directory mappings, update the app to instead use DE5’s persistent filesystem.
  6. Deploy the app.

Note for admins migrating apps on behalf of developers

In order to do the migration work on behalf of a developer and have them retain ownership of the apps,
we recommend creating a new user
with a license seat.
Log in with the user’s credentials and initialize, migrate, and deploy the apps.
When you’re done, share the credentials with the developer and set their password to Temporary so that
they’ll be prompted to change it.

Updating Project Structure and Files

To change your app files and structure, you can either:
- Upload your existing DE4 app files to Workspaces and try running the app. If it doesn’t run, follow this guide to update it.
- Make the updates outlined here locally and then deploy the updated app to DE5.

Project Structure and File Updates

Dash Enterprise Package Compatibility

We recommend updating all Dash packages to their latest versions.

Resolving Dependency Issues

In your local environment or workspace, try the following:

Adding Services

As with DE4, DE5 provides managed Postgres and Redis services. A key difference between services in DE4 and DE5 is
that in DE5 services are app-specific, meaning a Redis or Postgres service you add to an app can only be used
by that app.

For details on how to add Redis and Postgres to an app, see:

Adding Environment Variables

If your DE4 apps relied on environment variables, you’ll need to add those environment variables in DE5.
The process is similar in DE5. See Adding Environment Variables
for full details on adding environment variables.

Directory Mappings

If you use local directory mappings for files for your DE4 app,
save these files to your DE5 app’s persistent filesystem.
You can reference files in an app’s persistent filesystem in your code with '../mount/<file-name>'.
See the Persistent Filesystem chapter for more details and examples.