image-builder should support adding custom files from admin machine to the host
Closed this issue · 3 comments
Currently image-builder only supports building OS images in the exact way defined by upstream image-builder, and any new changes or deviations are done via patches to that repo. One such change we introduced was the ability to add new files onto the built image from the host that's running the image build. This is an incomplete feature now, since we do this only for Snow images now since they require the custom bootstrap script and logging script. Even for Snow, we hardcode these files and don't provide a way to specify additional files the user wants to add.
We should make this functionality generic and provide a way to add custom files for all provider image builds. This way, customers can setup the image according to their specific usecases during build time itself and avoid doing any offline modifications to the built image.
A use case would be building node image with custom DNS resolver config file: https://anywhere.eks.amazonaws.com/docs/reference/clusterspec/nutanix/#clusternetworkdnsresolvconfpath-optional
The resolv.conf path needs to exist in the node image, which can be achieved through this feature. Otherwise the build process can be non trivial which requires implementation on each provider's hypervisor.
@abhay-krishna, does this means that we can add an extra ansible playbook that will be run during image-build or we are talking about copying config files into the image?
Our use case is to install a few extra OS packages and configure services (iSCSI, NFS, multipathd etc.) which are required for persistent storage (CSI implementation for NetApps) on Bare Metal.
@abhay-krishna, does this means that we can add an extra ansible playbook that will be run during image-build or we are talking about copying config files into the image?
Our use case is to install a few extra OS packages and configure services (iSCSI, NFS, multipathd etc.) which are required for persistent storage (CSI implementation for NetApps) on Bare Metal.
@Cajga This feature is for adding static files from the host to the image. We are basically using an existing playbook for adding files from host that we used so far only for Snow provider images. Now we're extending that to other providers.