-
Notifications
You must be signed in to change notification settings - Fork 554
doc: Added Build Infra Doc #4686
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
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,157 @@ | ||
| # Build Infra | ||
|
|
||
| ## Introduction | ||
|
|
||
| The [CI process](../creating-application/workflow/ci-pipeline.md) involves activities that require infra resources such as CPU, memory (RAM), and many more. The amount of resources depends on the complexity of the application. In other words, large applications require more resources compared to small applications. | ||
|
|
||
| Therefore, applying a common infra configuration to all applications is not optimal. Since resources incur heavy costs, it's wise to efficiently allocate resources (*not more, not less*). | ||
ashoknayak777 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| With the 'Build Infra' feature, Devtron makes it possible for you to tweak the resources as per the needs of your applications. | ||
|
|
||
| {% hint style="warning" %} | ||
| ### Who Can Perform This Action? | ||
| Users need to have super-admin permission to configure build Infra. | ||
| {% endhint %} | ||
|
|
||
| --- | ||
|
|
||
| ## Steps to Configure Build Infra | ||
|
|
||
| From the left sidebar, go to **Global Configurations** → **Build Infra**. | ||
|
|
||
|  | ||
|
|
||
| You will see the [Default Profile](#default-profile) and a list of [Custom Profiles](#custom-profile) (if they exist). Setting up profiles makes it easier for you to manage the build infra configurations, ensuring its reusability in the long term. | ||
|
|
||
| ### Default Profile | ||
|
|
||
| This contains the default infra configuration applicable to all the applications, be it large or small. | ||
|
|
||
|  | ||
|
|
||
| You may click it to modify the following: | ||
| * **CPU** - Processor core allocated to the build process. See [CPU units](#cpu-units). | ||
| * **Memory** - RAM allocated to the build process. See [memory units](#memory-units). | ||
| * **Build Timeout** - Max. time limit allocated to the build process. See [timeout units](#timeout-units). | ||
|
|
||
|  | ||
|
|
||
| Furthermore, CPU and Memory have 2 fields each: | ||
|
|
||
| * **Request** - Use this field to specify the minimum guaranteed amount of CPU/Memory resources your application needs for its CI build. In our example, we required 1500m or 1.5 cores CPU along with 6 GB of RAM. | ||
|
|
||
| * **Limit** - Use this field to set the maximum amount of CPU/Memory resources the build process can use, even if there is a lot available in the cluster. | ||
|
|
||
|
|
||
| ### Creating Profile | ||
|
|
||
| Instead of default profile, you can create custom profiles having different infra configurations. Example: One profile for Python apps, a second profile for large apps, and a third profile for small apps, and many more. | ||
|
|
||
| 1. Click **Create Profile**. | ||
|
|
||
|  | ||
|
|
||
| 2. Give a name to the profile along with a brief description, and select the configurations to specify the values. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| 3. Click **Save**. Your custom profile will appear under the list of custom profiles as shown below. | ||
|
|
||
|  | ||
|
|
||
| ### Attaching Profile | ||
|
|
||
| Once you create a profile, attach it to the intended applications, or else the [default profile](#default-profile) will remain applied. | ||
|
|
||
| 1. Go to the **Applications** tab. | ||
|
|
||
|  | ||
|
|
||
| 2. Choose an application and click the dropdown below it. | ||
|
|
||
|  | ||
|
|
||
| 3. Choose the profile you wish to apply from the dropdown. | ||
|
|
||
|  | ||
|
|
||
| 4. Click **Change** to apply the profile to your application. | ||
|
|
||
|  | ||
|
|
||
| **Tip**: If you missed creating a profile but selected your application(s), you can use the 'Create Profile' button. This will quickly open a new tab for creating a profile. Once done, you can return and click the refresh icon as shown below. | ||
|
|
||
|  | ||
|
|
||
| #### Performing Bulk Action | ||
|
|
||
| If you wish to apply a profile to multiple applications at once, you can do that too. | ||
|
|
||
| Simply use the checkboxes to select the applications. You can do this even if there are many applications spanning multiple pages. You will see a draggable floating widget as shown below. | ||
|
|
||
|  | ||
|
|
||
| Select the profile you wish to apply from the dropdown and confirm the changes. | ||
|
|
||
|  | ||
|
|
||
| Once you apply a profile, it will show the count of applications attached to it. | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ### Editing or Deleting Profile | ||
|
|
||
| You can edit or delete a custom profile using the respective icons as shown below. | ||
|
|
||
|  | ||
|
|
||
| If you delete a profile attached to one or more applications, the [default profile](#default-profile) will apply from the next build. | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ### Need More Options? | ||
|
|
||
| If you need extra control on the build infra configuration apart from CPU and memory, feel free to open a [GitHub issue](https://github.com/devtron-labs/devtron/issues) for us to help you. | ||
ashoknayak777 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --- | ||
|
|
||
| ## Extras | ||
|
|
||
| ### CPU Units | ||
|
|
||
| CPU resources are measured in millicore. 1000m or 1000 millicore is equal to 1 core. If a node has 4 cores, the node's CPU capacity would be represented as 4000m. | ||
|
|
||
| ### Memory Units | ||
|
|
||
| Memory is measured in bytes. You can enter memory with suffixes (E, P, T, G, M, K, and Ei, Pi, Ti, Gi, Mi, Ki). | ||
|
|
||
| | Symbol | Prefix | Value (Bytes) | | ||
| | ------ | ------ | ------------------------------- | | ||
| | m | - | 0.001 byte | | ||
| | byte | - | 1 byte | | ||
| | k | Kilo | 1,000 bytes | | ||
| | Ki | Kibi | 1,024 bytes | | ||
| | M | Mega | 1,000,000 bytes | | ||
| | Mi | Mebi | 1,048,576 bytes | | ||
| | G | Giga | 1,000,000,000 bytes | | ||
| | Gi | Gibi | 1,073,741,824 bytes | | ||
| | T | Tera | 1,000,000,000,000 bytes | | ||
| | Ti | Tebi | 1,099,511,627,776 bytes | | ||
| | P | Peta | 1,000,000,000,000,000 bytes | | ||
| | Pi | Petabi | 1,125,899,906,842,624 bytes | | ||
| | E | Exa | 1,000,000,000,000,000,000 bytes | | ||
| | Ei | Exabi | 1,152,921,504,606,846,976 bytes | | ||
|
|
||
| ### Timeout Units | ||
|
|
||
| You can specify timeouts in the following units, beyond which the build process would be marked as failed: | ||
|
|
||
| * seconds | ||
| * minutes | ||
| * hours | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.