build_node_type
Description
The build_node_type parameter specifies the instance type for the build node. By default, it uses the same value as the node_type parameter unless explicitly set otherwise.
Default Value
The default value for build_node_type is the same as the node_type parameter.
Use Cases
- Custom Build Configuration: Allows you to specify a different instance type for build nodes, optimizing them for build tasks which might have different requirements compared to runtime nodes.
- Performance Optimization: You can choose an instance type with higher compute or memory resources to speed up build processes.
Setting Parameters
To set the build_node_type parameter, use the following command:
$ convox rack params set build_node_type=c5.large -r rackName
Updating parameters... OK
This command sets the build node type to c5.large.
Architecture Compatibility
On a single-architecture Rack, the build_node_type must use the same CPU architecture as the node_type parameter. If your Rack uses x86 instances (e.g. t3, c5, m5), the build node must also be x86. If your Rack uses ARM/Graviton instances (e.g. t4g, c6g, m6g), the build node must also be ARM.
Mixing architectures (for example, node_type=t3.small with build_node_type=t4g.large) does not fail the Build. The Build succeeds and produces an image for the wrong CPU architecture, and the resulting Processes crash with an exec format error.
When build_node_type is not set, it defaults to the value of node_type, which avoids this issue.
On Racks with Karpenter enabled, workload nodes follow karpenter_arch rather than node_type. When karpenter_arch is a single value, match build_node_type to it: karpenter_arch=arm64 with an amd64 build node produces images the workload pool cannot run. When karpenter_arch=amd64,arm64, Builds produce a multi-architecture image index, so build_node_type can be either architecture and no pairing is required. With the default build_node_enabled=false there is no build pool, Builds run on workload nodes, and build_node_type has no effect. See Architecture Selection and Mixed-Architecture Racks.
Additional Information
Selecting the appropriate build_node_type can significantly impact the performance and cost of your build processes. Consider the resource requirements of your builds when choosing an instance type.