Skip to content

Document configurable build resources #3782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sites/friday/src/manage-resources/adjust-resources.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Resource configuration
description: Configure CPU, RAM, and disk storage on a per-environment basis so your apps and services can run smoothly.
weight: -100
weight: -200
keywords:
- "resources"
- "flexible resources"
Expand Down
34 changes: 34 additions & 0 deletions sites/friday/src/manage-resources/build-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Build resources
description: Find out how build resources work on {{% vendor/name %}}.
weight: -50
---

When you push changes to your app through Git, your app is built then deployed.

During the build phase, {{% vendor/name %}} collects your entire app configuration and creates a build image into a dedicated build container.
The duration of the build phase is directly linked to the amount of resources (CPU and RAM) allocated to that build container.

As a user, you get the following fixed amount of resources **per project for free**:

- 2.5 CPU hours
- 5 RAM hours

If you consume more CPU or RAM, you get charged for them by the hour.
For more information on the costs incurred, see the [{{% vendor/name %}} pricing page](https://upsun.com/pricing/).

You can adjust build resources through the {{% vendor/name %}} API to mitigate potential overuse,
or influence the duration of your builds.
To do so, run a command similar to the following:

```bash {location="Terminal"}
{{% vendor/cli %}} project:curl settings -X PATCH -d '{"build_resources": {"cpu": 4.0, "memory": 2048}}'
```

{{% note %}}

Before adding more CPU and RAM to shorten the duration of your builds,
check that your build process supports using such extra resources.
Otherwise, the duration of your builds will remain the same despite adding more resources.

{{% /note %}}
36 changes: 36 additions & 0 deletions sites/friday/src/manage-resources/resource-billing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Resource billing
description: Keep an eye on costs related to resource usage.
weight: -100
keywords:
- "resources"
- "flexible resources"
- "CPU"
- "RAM"
- "disk storage"
- "costs"
---

If you have the [**Manage Billing** permission](/administration/users.md#organization-permissions) on your organization,
you can keep an eye on your costs related to resource usage.</br>
To do so, after you've set or updated resources on your project,
follow these steps in the [{{% vendor/name %}} Console](/administration/web/_index.md):

1. Navigate to your organization.
2. Open the user menu (your name or profile picture).
3. Click **Billing**.</br>
A monthly estimate of how much each project is expected to cost is displayed.
4. You can also view the costs related to every project you've been added to.</br>
To do so, click **{{< icon more >}} More** next to the project,
and select **Project Billing**.</br>
A monthly estimate of all the expected costs related to resource allocation on the project is displayed.

{{< note >}}

These estimates reflect the expected costs **for a full month** based on the way resources are allocated **at the time of viewing**.
They don't take into account the history of changes you may have made throughout the current month.</br>
Therefore, if you make changes to resource allocation during the month, your monthly invoice will differ from these estimates.

{{< /note >}}

For information on resource-related costs, see the [{{% vendor/name %}} pricing page](https://upsun.com/pricing/).
2 changes: 1 addition & 1 deletion sites/friday/src/manage-resources/resource-init.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Resource initialization
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.
weight: -200
weight: -300
keywords:
- "resources"
- "flexible resources"
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/hooks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Use build and deploy hooks
description: Add custom scripts at different stages in the build and deploy process.
layout: single
weight: 13
---

As your app goes through the [build and deploy process](/learn/overview/build-deploy.md),
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/multi-app/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ banner:
title: Feature availability
type: tiered-feature
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/).
weight: 8
---

{{% multi-app-intro %}}
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/timezone.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Timezones"
description: Learn more about the different timezones on {{% vendor/name %}} and when you can customize them.
weight: 9
---

On {{% vendor/name %}}, there are several timezones you might want to keep in mind.
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/troubleshoot-disks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Troubleshoot disks"
weight: 10
---

{{% troubleshoot %}}
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/troubleshoot-mounts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Troubleshoot mounts"
weight: 11
---

{{% troubleshoot %}}
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/upgrading.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Upgrading"
weight: 12
---

## Changes in version 2022.02
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/web/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Configure what's served
weight: 7
---

How you should configure your web server depends a lot on what you want to serve.
Expand Down
1 change: 1 addition & 0 deletions sites/platform/src/create-apps/workers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Work with workers"
description: Interact with your worker instances to handle background tasks for your apps.
weight: 15
---

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