|
1 | 1 | # Environments |
2 | 2 |
|
3 | | -An environment provides access to your data model. Cube Cloud provides the following environments: |
4 | | -- production (default) |
5 | | -- staging - providing access to the data model on a specific branch. |
6 | | - Each branch in the repository corresponds to a separate staging environment. |
7 | | - Changes must be committed to a branch to be viewable in this environment. |
8 | | -- development - providing access to the data model that you are currently working on. |
9 | | - The development environment is automatically created when you enter [development mode][ref-dev-mode]. |
10 | | - One development environment is allocated per user. |
11 | | - It tracks the branch you're currently on and is updated automatically when you save changes to the data model. |
12 | | - You cannot query the development enviornment unless your user is in dev mode on the branch you are trying to access. |
13 | | - |
14 | | -## Staging Environments |
15 | | -Staging environments are created for each branch in your repository. By default, these environments are only accessible when the branch is being viewed on the Data Model screen by at least one user. When no users are viewing the branch, the environment becomes inactive and inaccessible. |
16 | | - |
17 | | -To maintain continuous access to a staging environment regardless of user activity, you can use the "Always Active" toggle in Settings > Staging Environments. Here's how it works: |
18 | | - |
19 | | -- Toggle OFF (default): The environment is only accessible when users are viewing the branch. When no users are viewing the branch, queries to this environment will fail. |
20 | | -- Toggle ON: The environment remains active and accessible 24/7, regardless of user activity. |
21 | | - |
22 | | -### Cost Implications |
23 | | -Please note that staging environments consume resources only when they are being used: |
24 | | -- Environments automatically suspend after 10 minutes of inactivity, regardless of the "Always Active" toggle setting |
25 | | -- You are only charged for the time when environments are being used |
26 | | - |
27 | | -Therefore, the "Always Active" toggle only affects accessibility to inactive branches and does not impact your costs directly. |
28 | | - |
29 | | -<Screenshot |
30 | | - src="https://ucarecdn.com/b0e81a61-5887-424b-af89-d5e9cebb24f2/" |
31 | | - alt="Staging Environments settings" |
32 | | -/> |
33 | | - |
34 | | -## API Endpoints |
35 | | -Each environment provides its own set of API and SQL API endpoints. |
36 | | -You can reference them on the [Data Model][ref-data-model]'s Overview page and <Btn>BI Integrations</Btn> SQL API Connection tab. |
37 | | -To query a development environment's API endpoints, your user must be in dev mode and on the branch that has the saved changes. |
38 | | - |
39 | | -<Screenshot |
40 | | - src="https://ucarecdn.com/e1cddf72-3044-4d72-a0b9-023bf3285786/" |
41 | | - alt="Data Model's Overview page" |
42 | | -/> |
43 | | -<Screenshot |
44 | | - src="https://ucarecdn.com/64e244dc-3632-4403-bea5-38b9632094cc/" |
45 | | - alt="BI Integrations SQL API Connection tab" |
46 | | -/> |
| 3 | +Every Cube Cloud deployment provides a number of environments: |
| 4 | +- A single [production environment](#production-environment). |
| 5 | +- Multiple [staging environments](#staging-environments). |
| 6 | +- Per-user [development environments](#development-environments). |
| 7 | + |
| 8 | +<SuccessBox> |
| 9 | + |
| 10 | +Environments are available in Cube Cloud on |
| 11 | +[all product tiers](https://cube.dev/pricing). |
| 12 | + |
| 13 | +</SuccessBox> |
| 14 | + |
| 15 | +## Production environment |
| 16 | + |
| 17 | +This is the main environment. It runs the data model from the _main branch_. |
| 18 | + |
| 19 | +### Availability |
| 20 | + |
| 21 | +The production environment is _always available_ unless [suspended][ref-suspend]. |
| 22 | + |
| 23 | +### Resources and costs |
| 24 | + |
| 25 | +Depending on the [deployment type][ref-deployment-types], the production environment |
| 26 | +either runs on a development instance or on a production cluster with [multiple API |
| 27 | +instances][ref-api-instance-scalability], incurring [relevant |
| 28 | +costs][ref-pricing-deployment-tiers]. |
| 29 | + |
| 30 | +### Cube version |
| 31 | + |
| 32 | +Production environments run a [Cube version][ref-version] from the selected |
| 33 | +[update channel][ref-version-channel]. |
| 34 | + |
| 35 | +## Staging environments |
| 36 | + |
| 37 | +Staging environments are activated automatically for specific source code branches |
| 38 | +when a branch is switched to in the Cube Cloud UI. Any [development mode][ref-dev-mode] |
| 39 | +changes must be committed to a branch to be available in this environment. |
| 40 | + |
| 41 | +### Availability |
| 42 | + |
| 43 | +By default, they are only active and accessible while viewed by at least one user. |
| 44 | +When no users are viewing the branch, the environment becomes inactive and inaccessible. |
| 45 | + |
| 46 | +If you'd like to update this setting for a specific branch (e.g., for testing purposes), |
| 47 | +go to <Btn>Settings → Staging Environments</Btn> and check the toggle next to it: |
| 48 | + |
| 49 | +- **Toggle off** (default). A staging environment is only active when viewed by users. |
| 50 | +When no users are viewing the branch, queries to this environment will fail. |
| 51 | +- **Toggle on**. A staging environment remains _always active_ and accessible, |
| 52 | +regardless of user activity. |
| 53 | + |
| 54 | +<Screenshot src="https://ucarecdn.com/e0dcce34-a53a-4087-b021-25dbaf730a92/"/> |
| 55 | + |
| 56 | +### Resources and costs |
| 57 | + |
| 58 | +Staging environments run on development instances, incurring [relevant |
| 59 | +costs][ref-pricing-deployment-tiers]. However, they automatically suspend after 10 minutes |
| 60 | +of inactivity, regardless of the [availability](#availability) setting, so you are only |
| 61 | +charged for the time when staging environments are being used. |
| 62 | + |
| 63 | +### Cube version |
| 64 | + |
| 65 | +Staging environments always run the _most up-to-date_ Cube version. |
| 66 | + |
| 67 | +## Development environments |
| 68 | + |
| 69 | +A development environment is activated automatically when a user enters the [development |
| 70 | +mode][ref-dev-mode] on a specific branch of the source code. It updates automatically |
| 71 | +when a user saves changes to the data model. |
| 72 | + |
| 73 | +Only one development environment is allocated per user. |
| 74 | + |
| 75 | +### Availability |
| 76 | + |
| 77 | +A development environment is only active and accessible while viewed by a user in the |
| 78 | +development mode. Otherwise, queries to this environment will fail. |
| 79 | + |
| 80 | +### Resources and costs |
| 81 | + |
| 82 | +Development environments run on development instances, incurring [relevant |
| 83 | +costs][ref-pricing-deployment-tiers]. However, they automatically suspend after 10 minutes |
| 84 | +of inactivity, so you are only charged for the time when development environments are |
| 85 | +being used. |
| 86 | + |
| 87 | +### Cube version |
| 88 | + |
| 89 | +Development environments always run the _most up-to-date_ Cube version. |
| 90 | + |
| 91 | +{/* |
| 92 | +
|
| 93 | +TODO: |
| 94 | +Consumption? Resources? Move from http://localhost:3000/product/deployment/cloud/deployments#resource-consumption |
| 95 | +
|
| 96 | +*/} |
| 97 | + |
| 98 | +## API endpoints |
| 99 | + |
| 100 | +Each environment provides its own set of API endpoints. |
| 101 | + |
| 102 | +You can access them on the [<Btn>Overview</Btn> page][ref-overview] of your deployment |
| 103 | +or by navigating to the <Btn>Integrations</Btn> page and [clicking <Btn>API |
| 104 | +credentials</Btn>][ref-credentials]. |
| 105 | + |
| 106 | +<Screenshot src="https://ucarecdn.com/36cdf2c0-311f-4023-b7ca-e156c6ac288b/" /> |
| 107 | + |
47 | 108 |
|
48 | 109 | [ref-dev-mode]: /product/workspace/dev-mode |
49 | 110 | [ref-data-model]: /product/workspace/data-model |
| 111 | +[ref-deployment-types]: /product/deployment/cloud/deployment-types |
| 112 | +[ref-api-instance-scalability]: /product/deployment/cloud/scalability#auto-scaling-of-api-instances |
| 113 | +[ref-pricing-deployment-tiers]: /product/deployment/cloud/pricing#deployment-tiers |
| 114 | +[ref-suspend]: /product/deployment/cloud/auto-suspension |
| 115 | +[ref-overview]: /product/workspace/integrations#review-integrations |
| 116 | +[ref-credentials]: /product/workspace/integrations#view-api-credentials |
| 117 | +[ref-version]: /product/deployment/cloud/deployments#cube-version |
| 118 | +[ref-version-channel]: /product/deployment/cloud/deployments#update-channels |
0 commit comments