Skip to content

Commit 8de40d0

Browse files
authored
doc: Added Build Infra Doc (#4686)
* Added Build Infra Doc * Incorporated CO Feedback
1 parent 8f08776 commit 8de40d0

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* [Scoped Variables](user-guide/global-configurations/scoped-variables.md)
4545
* [Tags Policy](user-guide/global-configurations/tags-policy.md)
4646
* [Filter Condition](user-guide/global-configurations/filter-condition.md)
47+
* [Build Infra](user-guide/global-configurations/build-infra.md)
4748
* [Devtron Upgrade](setup/upgrade/README.md)
4849
* [Update Devtron from Devtron UI](setup/upgrade/upgrade-devtron-ui.md)
4950
* [0.5.x-0.6.x](setup/upgrade/devtron-upgrade-0.5.x-0.6.x.md)
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# Build Infra
2+
3+
## Introduction
4+
5+
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 required depends on the complexity of the application. In other words, large applications require more resources compared to small applications.
6+
7+
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*).
8+
9+
With the 'Build Infra' feature, Devtron makes it possible for you to tweak the resources as per the needs of your applications. The build (ci-runner) pod will be scheduled on an available node (considering applied taints and tolerations) in the cluster on which 'Devtron' is installed.
10+
11+
{% hint style="warning" %}
12+
### Who Can Perform This Action?
13+
Users need to have super-admin permission to configure build Infra.
14+
{% endhint %}
15+
16+
---
17+
18+
## Steps to Configure Build Infra
19+
20+
From the left sidebar, go to **Global Configurations****Build Infra**.
21+
22+
![Figure 1: Global Configurations - Build Infra](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/gc-build-infra.jpg)
23+
24+
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.
25+
26+
### Default Profile
27+
28+
This contains the default infra configuration applicable to all the applications, be it large or small.
29+
30+
![Figure 2: Default Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/default-profile.jpg)
31+
32+
You may click it to modify the following:
33+
* **CPU** - Processor core allocated to the build process. See [CPU units](#cpu-units).
34+
* **Memory** - RAM allocated to the build process. See [memory units](#memory-units).
35+
* **Build Timeout** - Max. time limit allocated to the build process. See [timeout units](#timeout-units).
36+
37+
![Figure 3: Editing Default Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/default-infra-config.jpg)
38+
39+
Furthermore, CPU and Memory have 2 fields each:
40+
41+
* **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.
42+
43+
* **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.
44+
45+
46+
### Creating Profile
47+
48+
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.
49+
50+
1. Click **Create Profile**.
51+
52+
![Figure 4: Creating Custom Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/create-new-profile.jpg)
53+
54+
2. Give a name to the profile along with a brief description, and select the configurations to specify the values.
55+
56+
![Figure 5a: Empty Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/new-profile-fields.jpg)
57+
58+
![Figure 5b: Filled Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/filled-profile-fields.jpg)
59+
60+
3. Click **Save**. Your custom profile will appear under the list of custom profiles as shown below.
61+
62+
![Figure 6: Listed Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/new-profile-listed.jpg)
63+
64+
### Attaching Profile
65+
66+
Once you create a profile, attach it to the intended applications, or else the [default profile](#default-profile) will remain applied.
67+
68+
1. Go to the **Applications** tab.
69+
70+
![Figure 7: Applications Tab](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/applications-tab.jpg)
71+
72+
2. Choose an application and click the dropdown below it.
73+
74+
![Figure 8: Profile Dropdown](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/profile-dropdown.jpg)
75+
76+
3. Choose the profile you wish to apply from the dropdown.
77+
78+
![Figure 9: Selecting a Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/profile-selection.jpg)
79+
80+
4. Click **Change** to apply the profile to your application.
81+
82+
![Figure 10: Confirming Profile Change](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/confirm-profile-change.jpg)
83+
84+
**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.
85+
86+
![Figure 11: Quick Profile Creation](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/quick-profile-creation.jpg)
87+
88+
#### Performing Bulk Action
89+
90+
If you wish to apply a profile to multiple applications at once, you can do that too.
91+
92+
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.
93+
94+
![Figure 12: Floating Widget](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/floating-widget.jpg)
95+
96+
Select the profile you wish to apply from the dropdown and confirm the changes.
97+
98+
![Figure 13: Selecting a Profile](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/profile-selection-bulk.jpg)
99+
100+
Once you apply a profile, it will show the count of applications attached to it.
101+
102+
![Figure 14: Count of Applications](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/profile-applicable-count.jpg)
103+
104+
105+
### Editing or Deleting Profile
106+
107+
You can edit or delete a custom profile using the respective icons as shown below.
108+
109+
![Figure 15: Edit and Delete Icons](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/edit-delete-icons-v2.jpg)
110+
111+
If you delete a profile attached to one or more applications, the [default profile](#default-profile) will apply from the next build.
112+
113+
![Figure 16: Confirm Profile Deletion](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/build-infra/delete-dialog.jpg)
114+
115+
116+
### Need More Options?
117+
118+
If you need extra control on the build infra configuration apart from CPU, memory, and build timeout, feel free to open a [GitHub issue](https://github.com/devtron-labs/devtron/issues) for us to help you.
119+
120+
---
121+
122+
## Extras
123+
124+
### CPU Units
125+
126+
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.
127+
128+
### Memory Units
129+
130+
Memory is measured in bytes. You can enter memory with suffixes (E, P, T, G, M, K, and Ei, Pi, Ti, Gi, Mi, Ki).
131+
132+
| Symbol | Prefix | Value (Bytes) |
133+
| ------ | ------ | ------------------------------- |
134+
| m | - | 0.001 byte |
135+
| byte | - | 1 byte |
136+
| k | Kilo | 1,000 bytes |
137+
| Ki | Kibi | 1,024 bytes |
138+
| M | Mega | 1,000,000 bytes |
139+
| Mi | Mebi | 1,048,576 bytes |
140+
| G | Giga | 1,000,000,000 bytes |
141+
| Gi | Gibi | 1,073,741,824 bytes |
142+
| T | Tera | 1,000,000,000,000 bytes |
143+
| Ti | Tebi | 1,099,511,627,776 bytes |
144+
| P | Peta | 1,000,000,000,000,000 bytes |
145+
| Pi | Petabi | 1,125,899,906,842,624 bytes |
146+
| E | Exa | 1,000,000,000,000,000,000 bytes |
147+
| Ei | Exabi | 1,152,921,504,606,846,976 bytes |
148+
149+
### Timeout Units
150+
151+
You can specify timeouts in the following units, beyond which the build process would be marked as failed:
152+
153+
* seconds
154+
* minutes
155+
* hours
156+
157+

0 commit comments

Comments
 (0)