|
| 1 | +--- |
| 2 | +sidebar_position: 3 |
| 3 | +--- |
| 4 | + |
| 5 | +import Prerequisites from './_prerequisites.mdx'; |
| 6 | + |
| 7 | +# App management |
| 8 | + |
| 9 | +Manage your AppKit application throughout its lifecycle using the Databricks CLI. This guide covers deploying, starting, stopping, monitoring, and deleting apps. |
| 10 | + |
| 11 | +<Prerequisites /> |
| 12 | + |
| 13 | +## Create app |
| 14 | + |
| 15 | +See the [Quick start](./index.md#quick-start-options) section to create a new Databricks app with AppKit installed. |
| 16 | + |
| 17 | +## Configuration |
| 18 | + |
| 19 | +Before deploying your app, configure it according to your needs. See the [Databricks Apps Configuration](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/configuration) documentation for details on: |
| 20 | + |
| 21 | +- App configuration file (`app.yaml`) |
| 22 | +- Environment variables |
| 23 | +- Authorization and permissions |
| 24 | +- Networking configuration |
| 25 | + |
| 26 | +## Deploy app |
| 27 | + |
| 28 | +Deploy your AppKit application using the automated deployment pipeline: |
| 29 | + |
| 30 | +```bash |
| 31 | +databricks apps deploy |
| 32 | +``` |
| 33 | + |
| 34 | +This command runs a complete deployment pipeline: |
| 35 | +1. Builds the frontend (`npm run build`) |
| 36 | +2. Deploys the bundle to the workspace |
| 37 | +3. Runs the app |
| 38 | + |
| 39 | +:::note |
| 40 | + |
| 41 | +For all available options, run: |
| 42 | +```bash |
| 43 | +databricks apps deploy --help |
| 44 | +``` |
| 45 | +::: |
| 46 | + |
| 47 | +### Examples |
| 48 | + |
| 49 | +- Deploy to a specific target: |
| 50 | + |
| 51 | + ```bash |
| 52 | + databricks apps deploy --target prod |
| 53 | + ``` |
| 54 | + |
| 55 | +- Deploy with custom variables: |
| 56 | + |
| 57 | + ```bash |
| 58 | + databricks apps deploy --var="warehouse_id=abc123" |
| 59 | + ``` |
| 60 | + |
| 61 | +- Skip the build step for faster iteration: |
| 62 | + |
| 63 | + ```bash |
| 64 | + databricks apps deploy --skip-build |
| 65 | + ``` |
| 66 | + |
| 67 | +- Force deploy (override Git branch validation): |
| 68 | + |
| 69 | + ```bash |
| 70 | + databricks apps deploy --force |
| 71 | + ``` |
| 72 | + |
| 73 | +## Start app |
| 74 | + |
| 75 | +To start a stopped app, run: |
| 76 | + |
| 77 | +```bash |
| 78 | +databricks apps start {name} |
| 79 | +``` |
| 80 | + |
| 81 | +## Stop app |
| 82 | + |
| 83 | +Stop a running app without deleting it: |
| 84 | + |
| 85 | +```bash |
| 86 | +databricks apps stop {name} |
| 87 | +``` |
| 88 | + |
| 89 | +## List all apps |
| 90 | + |
| 91 | +```bash |
| 92 | +databricks apps list |
| 93 | +``` |
| 94 | + |
| 95 | +## Get detailed app information |
| 96 | + |
| 97 | +```bash |
| 98 | +databricks apps get {name} |
| 99 | +``` |
| 100 | + |
| 101 | +## Stream app Logs |
| 102 | + |
| 103 | +Stream application logs in real-time: |
| 104 | + |
| 105 | +```bash |
| 106 | +databricks apps logs {name} |
| 107 | +``` |
| 108 | + |
| 109 | +By default, this shows the most recent 200 log lines and exits. |
| 110 | + |
| 111 | +> **Note:** For all available options, run `databricks apps logs --help` |
| 112 | +
|
| 113 | +### Examples |
| 114 | + |
| 115 | +- Show the last 50 log lines: |
| 116 | + |
| 117 | + ```bash |
| 118 | + databricks apps logs my-app --tail-lines 50 |
| 119 | + ``` |
| 120 | + |
| 121 | +- Follow logs with a search filter: |
| 122 | + |
| 123 | + ```bash |
| 124 | + databricks apps logs my-app --follow --search ERROR |
| 125 | + ``` |
| 126 | + |
| 127 | +- Filter logs by source: |
| 128 | + |
| 129 | + ```bash |
| 130 | + databricks apps logs my-app --follow --source APP |
| 131 | + ``` |
| 132 | + |
| 133 | +- Save logs to a file: |
| 134 | + |
| 135 | + ```bash |
| 136 | + databricks apps logs my-app --follow --output-file app.log |
| 137 | + ``` |
| 138 | + |
| 139 | +- Stream logs for 5 minutes: |
| 140 | + |
| 141 | + ```bash |
| 142 | + databricks apps logs my-app --follow --timeout 5m |
| 143 | + ``` |
| 144 | + |
| 145 | +## Delete app |
| 146 | + |
| 147 | +Permanently delete an app: |
| 148 | + |
| 149 | +```bash |
| 150 | +databricks apps delete {name} |
| 151 | +``` |
| 152 | + |
| 153 | +**⚠️ Warning:** This action cannot be undone. All app data and configurations will be removed. |
| 154 | + |
| 155 | +## See also |
| 156 | + |
| 157 | +For more information about Databricks Apps, including platform architecture, use cases, security, and advanced features, see the [Databricks Apps documentation](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/). |
0 commit comments