-
Notifications
You must be signed in to change notification settings - Fork 90
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
Passing packer variables to specify custom overrides does not seem to work #2372
Comments
Thanks for the detailed report! Quick question, do you have |
Don't think I do:
|
Ok I think that explains |
I did confirm we do not currently have a way to pass these kinds of additional options/overrides in yet. We are going to take a look internally at options we have and will get back to you with an idea of a timeline. |
Also, the filepath passed in as Are you able to see this file on your host? If so could you post its contents? |
Ideally, you should see something like {
"files":null,
"rhel_username":"",
"rhel_password":"",
"extra_repos":"/home/image-builder/ubuntu.sources.list"
} |
hi, yes I do see that file under {"rhel_username":"","rhel_password":"","extra_repos":"/home/image-builder/ubuntu.sources.list"} |
so if this file is parsed I see the only options it supports is: type BaremetalConfig struct {
IsoConfig
RhelConfig
ExtraPackagesConfig
}
type ExtraPackagesConfig struct {
ExtraDebs string `json:"extra_debs,omitempty"`
ExtraRepos string `json:"extra_repos,omitempty"`
ExtraRpms string `json:"extra_rpms,omitempty"`
} how do other customers pass in custom provisioner after the build or anything else to customise the image? or is it just extra repos + extra packages the only option available? |
Currently we support only these parameters that are present in these Go struct types. We are working on a potential solution to expand this list and provide more customization through image-builder. |
Hi, so I've been trying to get addition of ansible roles: type BaremetalConfig struct {
AdditionalFiles []File `json:"files"`
IsoConfig
RhelConfig
ExtraPackagesConfig
ExtraRolesConfig
}
type ExtraRolesConfig struct {
firstboot_custom_roles_pre string `json:"firstboot_custom_roles_pre"`
firstboot_custom_roles_post string `json:"firstboot_custom_roles_post"`
node_custom_roles_pre string `json:"node_custom_roles_pre"`
node_custom_roles_post string `json:"node_custom_roles_post"`
roles_from string `json:"roles_from"`
} to match what upstream kubernetes-sigs support and building locally it I'm still not getting necessary content from the config: {
"extra_repos": "/home/image-builder/ubuntu.sources.list",
"roles_from": "/home/image-builder/wd_ansible_roles",
"node_custom_roles_pre": "wd.eksa.pre_node"
} but still variable |
What happened:
Command in use to build Ubuntu 22.04 based EKSA BM image:
I have
/home/image-builder/packer_vars.json
file with overrides to use a custom Ansible role through image provisioning.When I attempt to pass it with
--baremetal-config /home/image-builder/packer_vars.json
this path is nowhere to be seen in end command underPACKER_VAR_FILES
environment variable.Also I've noticed following warning during execution:
which looks like comes from:
where
IMAGE_FORMAT
is empty instead ofraw
.I've also attempted to modify
commandEnvVars
for Ubuntu build with no impact:case Ubuntu: buildCommand = fmt.Sprintf("make -C %s local-build-raw-ubuntu-%s", imageBuilderProjectPath, b.OsVersion) + commandEnvVars = append(commandEnvVars, fmt.Sprintf("PACKER__VAR_FILES='/home/image-builder/packer_vars.json'"), fmt.Sprintf("PACKER_RAW_VAR_FILES='/home/image-builder/packer_vars.json'") case RedHat:
End result packer command executed:
What you expected to happen:
Being able to supply overrides from https://image-builder.sigs.k8s.io/capi/capi, for example:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: