Skip to content

Commit 36c4b42

Browse files
docs: buildkit on bottlerocket support (#897)
* docs: buildkit support * Revise Bottlerocket support language * Add additional resource links * Update docs/install/configure-wave-build.md * Fix link --------- Co-authored-by: Christopher Hakkaart <[email protected]>
1 parent 181d7a1 commit 36c4b42

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

docs/install/configure-wave-build.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,61 @@ Set up monitoring for build operations:
347347
- **Storage access issues** - Ensure EFS access points are configured correctly
348348
- **Build timeouts** - Adjust build timeout settings based on workload requirements
349349

350-
For additional configuration options and advanced features, see [Configure Wave](../configure-wave.md).
350+
For additional configuration options and advanced features, see [Configuring Wave](../configure-wave.md).
351+
352+
## Bottlerocket support
353+
354+
Buildkit requires user namespaces. However, Bottlerocket sets `user.max_user_namespaces=0` by default for security.
355+
356+
To use Buildkit with Bottlerocket, enable user namespaces for container builds by setting `user.max_user_namespaces=N` on your host nodes, where `N` is a positive integer. Use a sufficiently high value (e.g., `62000`) to avoid build failures. Values that are too low (e.g., `10`) will limit concurrent build capacity and may cause build failures.
357+
358+
You can configure this setting in two ways:
359+
360+
#### Recommended: Node startup configuration
361+
362+
Configure the user namespace setting in your node group's startup script or user data. This approach applies the configuration at boot time and doesn't require privileged containers in your cluster.
363+
364+
#### Alternative: DaemonSet
365+
366+
If you can't control the node configuration directly, use DaemonSet. This approach requires running a privileged container. We recommend you deploy it only on wave-build nodes and use a dedicated namespace for isolation.
367+
368+
**Example manifest:**
369+
370+
```yaml
371+
apiVersion: apps/v1
372+
kind: DaemonSet
373+
metadata:
374+
labels:
375+
app: sysctl-userns
376+
name: sysctl-userns
377+
spec:
378+
selector:
379+
matchLabels:
380+
app: sysctl-userns
381+
template:
382+
metadata:
383+
labels:
384+
app: sysctl-userns
385+
spec:
386+
containers:
387+
- name: sysctl-userns
388+
image: busybox
389+
command: ["sh", "-euxc", "sysctl -w user.max_user_namespaces=63359 && sleep infinity"]
390+
securityContext:
391+
privileged: true
392+
affinity:
393+
nodeAffinity:
394+
requiredDuringSchedulingIgnoredDuringExecution:
395+
nodeSelectorTerms:
396+
- matchExpressions:
397+
- key: service
398+
operator: In
399+
values: ["wave-build", "wave-build-arm64"]
400+
```
401+
402+
#### Additional resources
403+
404+
For more information about Bottlerocket, see:
405+
406+
- [Bottlerocket FAQs](https://bottlerocket.dev/en/faq/)
407+
- [Amazon Bottlerocket FAQs](https://aws.amazon.com/bottlerocket/faqs/)

0 commit comments

Comments
 (0)