Skip to content

Commit 0e14d6f

Browse files
authored
docs: Refactor the Environments page (#9110)
1 parent 6d75c60 commit 0e14d6f

File tree

4 files changed

+135
-82
lines changed

4 files changed

+135
-82
lines changed

docs/pages/product/deployment/cloud/deployments.mdx

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,20 @@ user-specific state of the deployment:
7575

7676
## Cube version
7777

78-
Each deployment in Cube Cloud runs a specific version of Cube, depending on the
79-
branch of the source code and the selected [update channel](#update-channels).
78+
Each [environment][ref-environments] within a Cube Cloud deployment runs a specific
79+
version of Cube that depends on the environment type and the selected [update
80+
channel](#update-channels).
8081

8182
### Current version
8283

83-
You can check the current version of Cube that your deployment runs by
84+
You can check the current version of Cube that your deployment (environment) runs by
8485
navigating to <Btn>Overview → Resources & Logs → Cube API</Btn>:
8586

8687
<Screenshot
8788
src="https://ucarecdn.com/83a5010a-3c02-4ce1-8e4f-fdbb2efc6a90/"
8889
highlight="inset(42.5% 42.5% 32.5% 4% round 10px)"
8990
/>
9091

91-
Non-main branches and [development mode][ref-dev-mode] branches always run
92-
the most up-to-date version of Cube.
93-
9492
### Update channels
9593

9694
Cube Cloud provides two update channels:
@@ -110,25 +108,12 @@ General → Cube version</Btn>:
110108

111109
## Resource consumption
112110

113-
Each deployment allocates and consumes the following resources:
114-
115-
* For the main branch of the source code, a set of resources in line with
116-
the [deployment type][ref-deployment-types].
117-
* For any other branch of the source code, a [development
118-
instance][ref-dev-instance].
119-
* For any user-specific [development mode][ref-dev-mode] branch, a
120-
[development instance][ref-dev-instance].
121-
* If pre-aggregations are used, a minimum of two Cube Store workers.
122-
123-
Cube Cloud only consumes resources when they are needed to run workloads:
124-
125-
* For the main branch, resources are always consumed unless a deployment is
126-
[auto-suspended][ref-auto-sus].
127-
* For any other branch or any user-specific development mode branch,
128-
a development instance is allocated while there's some activity in the
129-
branch, e.g., API endpoints are serving requests, a user is active in
130-
Cube Cloud, etc. After a period of inactivity, the development instance
131-
is deallocated.
111+
Cube Cloud deployments only consume resources when they are needed to run workloads:
112+
113+
* For the [production environment][ref-environments-prod], resources are always consumed
114+
unless a deployment is [suspended][ref-auto-sus].
115+
* For any other [environment][ref-environments], a development instance is allocated
116+
while it's active. After a period of inactivity, the development instance is deallocated.
132117
* For pre-aggregations, Cube Store workers are allocated while there's some
133118
activity related to pre-aggregations, e.g., API endpoints are serving
134119
requests to pre-aggregations, pre-aggregations are being built, etc.
@@ -140,7 +125,6 @@ resource consumption in different scenarios.
140125

141126
[cube-cloud-signup]: https://cubecloud.dev/auth/signup
142127
[ref-deployment-types]: /product/deployment/cloud/deployment-types
143-
[ref-dev-instance]: /product/deployment/cloud/deployment-types#development-instance
144128
[ref-dev-mode]: /product/workspace/dev-mode
145129
[ref-auto-sus]: /product/deployment/cloud/auto-suspension
146130
[ref-total-cost]: /product/deployment/cloud/pricing#total-cost-examples
@@ -150,4 +134,6 @@ resource consumption in different scenarios.
150134
[ref-dynamic-data-models]: /product/data-modeling/dynamic
151135
[ref-config-options]: /product/configuration#configuration-options
152136
[ref-data-model]: /product/workspace/data-model
153-
[ref-playground]: /product/workspace/playground
137+
[ref-playground]: /product/workspace/playground
138+
[ref-environments]: /product/workspace/environments
139+
[ref-environments-prod]: /product/workspace/environments#production-environment

docs/pages/product/workspace.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ In Cube Cloud, you can:
1919
the data model of your semantic layer.
2020
- Use [Visual Modeler][ref-visual-modeler] to build and edit your data model
2121
using a canvas-based UI.
22-
- Access the data model through different [Environments][ref-environments].
2322
- Use [Playground][ref-playground] to run queries and test the data model.
2423
- Use [Chart Prototyping][ref-vizard] to generate code of a front-end
2524
application that works with Cube.
@@ -35,6 +34,7 @@ to BIs, spreadsheets, and other visualization tools.
3534
of your deployment as a whole.
3635
- Use [Monitoring Integrations][ref-monitoring-integrations] to export logs and
3736
metrics to external monitoring tools.
37+
- Access the data model through different [environments][ref-environments].
3838
- Use the [access control page][ref-access-control] to manage users of your
3939
Cube Cloud account and [single sign-on][ref-sso].
4040
- Use [Audit Log][ref-audit-log] to review security-related events in your

docs/pages/product/workspace/dev-mode.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ redirect_from:
66
# Development mode
77

88
Development mode allows to test and debug the data model in an isolated
9-
environment before releasing any changes to production. When the development
10-
mode is enabled, you'll have access to your personal API endpoints that will track the branch you're on and will be updated automatically when you make changes to the data model.
11-
Read more about environments on the [Environments][ref-environments] page.
9+
[development environment][ref-environments-dev] before releasing any changes to production.
1210

1311
<SuccessBox>
1412

@@ -17,6 +15,10 @@ Development mode is available in Cube Cloud on
1715

1816
</SuccessBox>
1917

18+
When you enter the development mode, you'll have access to your personal API endpoints
19+
that will track the branch you're on and will be updated automatically when you make
20+
changes to the data model.
21+
2022
## Development flow
2123

2224
### Save changes
@@ -87,7 +89,7 @@ They will be shown on the Overview page:
8789
/>
8890
</div>
8991

90-
Read more about the available endpoints on the [Environments][ref-environments] page.
92+
Read more about the available endpoints on the [Environments][ref-environments-endpoints] page.
9193

9294
## Limitations
9395

@@ -106,10 +108,6 @@ Scheduled refresh is also disabled in the Development API. If you need to test
106108
scheduled refreshes, we recommend creating a separate deployment using a
107109
different Git branch of the same repository.
108110

109-
### Cube version guarantees
110-
111-
The version of Cube used in the Development API **is not** guaranteed to be the
112-
same each time. If this affects your development process, we recommend reaching
113-
out to our support team.
114111

115-
[ref-environments]: /product/workspace/environments
112+
[ref-environments-dev]: /product/workspace/environments#development-environments
113+
[ref-environments-endpoints]: /product/workspace/environments#api-endpoints
Lines changed: 113 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,118 @@
11
# Environments
22

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+
47108

48109
[ref-dev-mode]: /product/workspace/dev-mode
49110
[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

Comments
 (0)