Skip to content

Commit

Permalink
Merge pull request #4141 from platformsh/GuGuss-build-resources
Browse files Browse the repository at this point in the history
Document configuring build resources on Upsun
  • Loading branch information
Kemi-Elizabeth authored Nov 17, 2024
2 parents c12cd1a + 1514b6e commit f987c87
Showing 1 changed file with 40 additions and 19 deletions.
59 changes: 40 additions & 19 deletions sites/upsun/src/manage-resources/build-resources.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,55 @@
---
title: Build resources
description: Find out how build resources work on {{% vendor/name %}}.
title: Project build resources
description: Configure project build resources on {{% vendor/name %}}.
weight: -50
---

When you push changes to your app through Git, your app is built then deployed.
When you push changes through Git, your applications are first 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.
During the build process, {{% vendor/name %}} creates a build image for each of your application, as a dedicated build container, and runs your build hooks inside that build container.
The duration of the build process 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**:
Every {{% vendor/name %}} project includes a fixed amount of build resources per month:

- 2.5 CPU hours
- 5 RAM hours
- 2.5 hours of build CPU
- 5 hours of build memory

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 the amount of build resources that a project can use.

{{< codetabs >}}

+++
title=Using the Console
+++

1. Navigate to your project.
2. Access the **project settings**.
3. Expand the Project Setting accordion and click **Resources**.
4. Enter the amount of CPU and RAM that your build containers can use.
5. Click **Save**.

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:
<--->
+++
title=Using the CLI
+++

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

```bash
{{% vendor/cli %}} resources:build:set
```
2. Enter the amount of CPU.
3. Enter the amount of RAM.


{{< /codetabs >}}

Additional build resources (CPU and RAM) are billed by the hour.
For more information on the costs incurred, see the [{{% vendor/name %}} pricing page](https://upsun.com/pricing/).

{{% note %}}

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

{{% /note %}}
{{% /note %}}

0 comments on commit f987c87

Please sign in to comment.