-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from codesandbox/draft/ubb-changes
Add UBB info
- Loading branch information
Showing
29 changed files
with
342 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"workspace": "Workspaces", | ||
"permissions": "User permissions" | ||
} |
32 changes: 28 additions & 4 deletions
32
...ts-docs/pages/learn/plans/permissions.mdx → ...s-docs/pages/learn/access/permissions.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"credits": "Credits", | ||
"monitoring-usage": "Monitoring usage", | ||
"controlling-usage": "Controlling usage" | ||
} |
43 changes: 43 additions & 0 deletions
43
packages/projects-docs/pages/learn/credit-usage/controlling-usage.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Controlling VM Usage | ||
description: Learn more about how you can remain in control of VM usage in your CodeSandbox workspace. | ||
--- | ||
|
||
import { Callout } from 'nextra-theme-docs' | ||
|
||
# Controlling VM Usage | ||
|
||
A workspace can control the use of virtual machines in several ways. The functionalities described below allow workspace admins to increase predictability of VM usage and credit spend. | ||
|
||
## Privacy | ||
|
||
VM runtime is billed to the workspace that owns the Devbox or Repository. VMs are required to run the code regardless of whether or not the code is being actively developed. This means that workspaces are responsible for the runtime of any project in their workspace, including running previews or spinning up the code for `read-only` users. | ||
|
||
Making Devboxes private allows workspace admins to have finer control over total VM spending. For this reason, Devboxes are created as private by default. Devbox and Sandbox privacy defaults can be controlled via the `Permissions` tab in the [workspace portal](codesandbox.io/t/permissions). | ||
|
||
## Templates | ||
|
||
VM runtime for templates is covered by CodeSandbox. By setting a Devbox as a template, you can share your work without worrying about the costs associated with non-workspace users running your Devbox. | ||
Once a Devbox is in a template state, it cannot be edited. If you want to continue making changes to the Devbox, you will need to switch it back out of template mode. | ||
|
||
## VM settings | ||
|
||
Each workspace has a range of VM sizes to choose from. The range of options varies depending on the subscription tier of the workspace. | ||
By default, all Devboxes and repositories will run on [Micro](/learn/credit-usage/credits). The default VM size can be changed on the VM [settings page](codesandbox.io/t/vm_settings) in the workspace portal. | ||
|
||
![VM settings page](../images/vm-settings.png) | ||
|
||
Individual Devboxes or repositories can be set to run on VMs other than the default. | ||
To set the VM of a Devbox or repositority, you can create a rule. This helps ensure that heavy compute projects get the power they need without increasing VM usage across the other projects. | ||
|
||
![VM Rule](../images/vm-rule.png) | ||
|
||
|
||
## Spending limit | ||
On-demand credits will never exceed the spending limit. | ||
Once subscription credits are used, the VMs will start running on on-demand credits. These credits will be aggregated and added to the end-of-month invoice. | ||
|
||
Every Pro workspace is required to have a maximum spending limit to ensure that there are no surprise bills at the end of the billing cycle. | ||
The spending limit is initially set during the Pro subscription check-out flow. Workspace admins can adjust this spending limit in the workspace portal at any time. | ||
|
||
Once the on-demand credits hit that limit, all Devboxes and Repositories will enter a [frozen state](/learn/plans/pricing-faq#my-devbox-is-frozen-what-does-that-mean) until more credits have been added or the next billing cycle begins. |
44 changes: 44 additions & 0 deletions
44
packages/projects-docs/pages/learn/credit-usage/credits.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Credits | ||
description: Learn more about how CodeSandbox uses credits for usage-based billing. | ||
--- | ||
|
||
import { Callout } from 'nextra-theme-docs' | ||
|
||
# Credits | ||
|
||
Credits serve as the unit of measurement for VM runtime. They simplify understanding and managing the costs of running your Devboxes and Repositories. One credit equates to a specific amount of resources used per hour, which ensures clarity and transparency in your billing. | ||
|
||
| VM size | Credits / hour | Cost / hour | CPU | RAM | | ||
| ------ | -------------- | ----------- | -------- | ------ | | ||
| Nano | 10 credits | $0.18 | 2 cores | 4 GB | | ||
| Micro | 20 credits | $0.36 | 4 cores | 8 GB | | ||
| Small | 40 credits | $0.72 | 8 cores | 16 GB | | ||
| Medium | 80 credits | $1.44 | 16 cores | 32 GB | | ||
| Large | 160 credits | $2.88 | 32 cores | 64 GB | | ||
| XLarge | 320 credits | $5.76 | 64 cores | 128 GB | | ||
|
||
<Callout emoji="ℹ️"> | ||
Sandboxes do not run on VMs, so any time spent on a Sandbox will not count toward your credit spend. | ||
</Callout> | ||
|
||
## Types of credits | ||
|
||
### Subscription credits | ||
Subscription credits are allocated monthly credits per workspace according to the subscription plan. A workspace on the free plan gets 400 credits per month. The Pro plan has a base of 1000 credits a month, but more can be purchased with credit add-ons. | ||
|
||
<Callout emoji="ℹ️"> | ||
Unused credits do not roll over month-to-month. | ||
</Callout> | ||
|
||
### On-demand credits | ||
Once subscription credits have been used, VM usage will begin running on on-demand credits. These credits will be tracked and billed at the end of the billing cycle. | ||
On-demand credits are not subject to discount and are billed at a standard $0.18 per hour. | ||
|
||
To prevent unexpected bills due to unusually high on-demand credit usage, every Pro workspace is required to set a [spending limit](/learn/credit-usage/controlling-usage#spending-limit). | ||
|
||
|
||
|
||
|
||
|
||
|
23 changes: 23 additions & 0 deletions
23
packages/projects-docs/pages/learn/credit-usage/monitoring-usage.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: Monitoring VM Usage | ||
description: How to have visibility over how VMs are being used in your CodeSandbox workspace. | ||
--- | ||
|
||
import { Callout } from 'nextra-theme-docs' | ||
|
||
# Monitoring usage | ||
|
||
VM usage is reported in the workspace portal under the [virtual machine usage tab](https://codesandbox.io/t/usage). | ||
In this view, you can find information about the workspace credit spend during the current cycle as well as logs from each session. | ||
|
||
![VM Rule](../images/vm-usage.png) | ||
|
||
## Understanding VM starts and stops | ||
|
||
There are two different ways to wake up a VM: | ||
- Through user interaction, such as spinning up a repository branch in the editor. | ||
- Through automated jobs like making an HTTP wake-up call to start up a preview. | ||
|
||
These job-related starts usually add up to a few minutes of VM time in a billing cycle. They are accounted for in the VM usage logs in the workspace portal. | ||
|
||
CodeSandbox automatically uses hibernation timeouts to conserve VM use. If a VM has not had any interactivity for 30 minutes, it will hibernate until woken up again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
20057b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
projects-docs – ./
projects-docs-git-main-codesandbox1.vercel.app
docs-vercel.codesandbox.io
projects-docs.vercel.app
projects-docs-codesandbox1.vercel.app