Skip to content

Commit c3eb9b7

Browse files
committed
Document build resources
1 parent 128b316 commit c3eb9b7

File tree

13 files changed

+65
-3
lines changed

13 files changed

+65
-3
lines changed

sites/friday/src/manage-resources/adjust-resources.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Resource configuration
33
description: Configure CPU, RAM, and disk storage on a per-environment basis so your apps and services can run smoothly.
4-
weight: -100
4+
weight: -200
55
keywords:
66
- "resources"
77
- "flexible resources"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Build resources
3+
description: Find out how build resources work on {{% vendor/name %}}.
4+
weight: -50
5+
---
6+
7+
When you push changes to your app through Git, your app is built then deployed.
8+
9+
During the build phase, {{% vendor/name %}} collects your entire app configuration and creates a build image into a dedicated build container.
10+
The duration of the build phase is directly linked to the amount of resources (CPU and RAM) allocated to that build container.
11+
12+
As a user, you get the following fixed amount of resources **per project for free**:
13+
14+
- 2.5 CPU hours
15+
- 5 RAM hours
16+
17+
If you consume more CPU or RAM, you get charged for them by the hour.
18+
For more information on the costs incurred, see the [{{% vendor/name %}} pricing page](https://upsun.com/pricing/).
19+
20+
You can set a maximum threshold for build resources through the {{% vendor/name %}} API to mitigate potential overuse.
21+
To do so, run commands similar to the following:
22+
23+
```bash {location="Terminal"}
24+
{{% vendor/cli %}} project:curl capabilities -X PATCH -d '{"build_resources": {"enabled": true}}'
25+
{{% vendor/cli %}} project:curl settings -X PATCH -d '{"build_resources": {"cpu": 4.0, "memory": 2048}}'
26+
```

sites/friday/src/manage-resources/resource-billing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Resource billing
33
description: Keep an eye on costs related to resource usage.
4-
weight: -50
4+
weight: -100
55
keywords:
66
- "resources"
77
- "flexible resources"

sites/friday/src/manage-resources/resource-init.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Resource initialization
33
description: Learn how resources are allocated by default upon first deployment, and how you can define a resource initialization strategy that better fits your needs.
4-
weight: -200
4+
weight: -300
55
keywords:
66
- "resources"
77
- "flexible resources"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Build resources
3+
description: Find out how build resources work on {{% vendor/name %}}.
4+
weight: 14
5+
---
6+
7+
When you push changes to your app through Git, your app is built then deployed.
8+
9+
During the build phase, {{% vendor/name %}} collects your entire app configuration and creates a build image into a dedicated build container.
10+
The duration of the build phase is directly linked to the amount of resources (CPU and RAM) allocated to that build container.
11+
12+
To manage those build resources, add the following configuration:
13+
14+
```yaml {configFile="apps"}
15+
"build_resources": {
16+
"enabled": false, #Build resources can only be effectively adjusted once this key is set to true.
17+
"max_cpu": 4.0, #The maximum amount of allowed CPU (minimum is a hardcoded 0.1)
18+
"max_memory": 10240 #The maximum amount of allowed RAM (minimum is a hardcoded 64)
19+
}
20+
```
21+
22+
You can then adjust build resources at any time through the {{% vendor/name %}} API.
23+
To do so, run commands similar to the following:
24+
25+
```bash {location="Terminal"}
26+
{{% vendor/cli %}} project:curl capabilities -X PATCH -d '{"build_resources": {"enabled": true}}'
27+
{{% vendor/cli %}} project:curl settings -X PATCH -d '{"build_resources": {"cpu": 4.0, "memory": 2048}}'
28+
```

sites/platform/src/create-apps/hooks/_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Use build and deploy hooks
33
description: Add custom scripts at different stages in the build and deploy process.
44
layout: single
5+
weight: 13
56
---
67

78
As your app goes through the [build and deploy process](/learn/overview/build-deploy.md),

sites/platform/src/create-apps/multi-app/_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ banner:
66
title: Feature availability
77
type: tiered-feature
88
body: This page applies to Grid and {{% names/dedicated-gen-3 %}} projects. To ensure you have enough resources to support multiple apps, you need at least a [{{< partial "plans/multiapp-plan-name" >}} plan](/administration/pricing/_index.md#multiple-apps-in-a-single-project). To set up multiple apps on {{% names/dedicated-gen-2 %}} environments, [contact Sales](https://platform.sh/contact/).
9+
weight: 8
910
---
1011

1112
{{% multi-app-intro %}}

sites/platform/src/create-apps/timezone.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Timezones"
33
description: Learn more about the different timezones on {{% vendor/name %}} and when you can customize them.
4+
weight: 9
45
---
56

67
On {{% vendor/name %}}, there are several timezones you might want to keep in mind.

sites/platform/src/create-apps/troubleshoot-disks.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Troubleshoot disks"
3+
weight: 10
34
---
45

56
{{% troubleshoot %}}

sites/platform/src/create-apps/troubleshoot-mounts.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Troubleshoot mounts"
3+
weight: 11
34
---
45

56
{{% troubleshoot %}}

sites/platform/src/create-apps/upgrading.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Upgrading"
3+
weight: 12
34
---
45

56
## Changes in version 2022.02

sites/platform/src/create-apps/web/_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Configure what's served
3+
weight: 7
34
---
45

56
How you should configure your web server depends a lot on what you want to serve.

sites/platform/src/create-apps/workers.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Work with workers"
33
description: Interact with your worker instances to handle background tasks for your apps.
4+
weight: 15
45
---
56

67
Workers are instances of your code that aren't open to connections from other apps or services or the outside world.

0 commit comments

Comments
 (0)