-
Notifications
You must be signed in to change notification settings - Fork 343
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 #4141 from platformsh/GuGuss-build-resources
Document configuring build resources on Upsun
- Loading branch information
Showing
1 changed file
with
40 additions
and
19 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
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 %}} |