Homeโ€บโšก Advancedโ€บModule 111 min read ยท 12/15

Deploying to Production

Tutorial

Build and Deploy

# Build for production
npx dt-app build

# Deploy to your Dynatrace environment
npx dt-app deploy

IAM Permissions

Permission                    Required For
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
app-engine:apps:install       Deploy the app
app-engine:apps:run           Run the app
app-engine:apps:delete        Uninstall the app

CI/CD Deployment

# Set OAuth credentials as environment variables
export DT_APP_OAUTH_CLIENT_ID="dt0s02.XXXXXXXX"
export DT_APP_OAUTH_CLIENT_SECRET="dt0s02.XXXXXXXX.YYYYYYYY"

# Deploy from pipeline
npx dt-app deploy

Deployment Checklist

Step  Action                                    Status
โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€
1     All scopes declared in app.config.json      โ–ก
2     No hardcoded URLs or secrets                โ–ก
3     Error handling on all DQL queries            โ–ก
4     Loading states for all async operations      โ–ก
5     npx dt-app build succeeds without errors     โ–ก
6     npx dt-app deploy completes                  โ–ก
7     App appears in Dynatrace app launcher        โ–ก

โš ๏ธ Once deployed, the app runs with the scopes declared at deploy time. If new scopes are added, redeploy AND users must re-authorize.

๐Ÿ›  Try it: Run npx dt-app deploy from your app directory. Your app uploads to the environment and appears in the launcher. Share the URL with your team โ€” they can use it immediately with their own permissions.