-
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
Adds pre/post boot and node roles #2474
Conversation
Hi @vasyl-purchel. Thanks for your PR. I'm waiting for a aws member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
PR verified: image-builder@eksa_test:~$ cat /home/image-builder/packer_vars.json
{
"disable_public_repos": "true",
"node_custom_roles_pre": "wd.eksa.pre_node"
}
image-builder@eksa_test:~$ cat ~/.ansible/roles/wd.eksa.pre_node/tasks/main.yml
- name: Do custom stuff
apt:
name:
- jq
- ansible
- make
update_cache: yes
state: latest
image-builder@eksa_test:~$ export EKSA_USE_DEV_RELEASE=true
image-builder@eksa_test:~$ image-builder-pr build --os ubuntu --os-version 22.04 --hypervisor baremetal --release-channel 1-27 -v 3 --force --baremetal-config /home/image-builder/packer_vars.json
... and while it's running we can see that overrides are passed over to packer: $ cat /home/image-builder/eks-anywhere-build-tooling/projects/kubernetes-sigs/image-builder/packer/config/baremetal.json
{"files":null,"rhel_username":"","rhel_password":"","node_custom_roles_pre":"wd.eksa.pre_node","disable_public_repos":"true"}
|
/ok-to-test |
Thanks for this! One question I had was, can the pre/post role take in a full path for the ansible role, and if user doesn't provide the full path, does it expect the role to be present in a certain relative path? Also could you add this overrides to cloudstack, vsphere, nutanix and ami builder types? |
details on what these overrides can take are very well described here: https://image-builder.sigs.k8s.io/capi/capi.html#customization in my case I've used as for adding those to other hypervisors can do for sure but won't be able to verify if it works in any way as I don't have those configured |
As per kubernetes-sigs/image-builder#894 issue upstream project opened to use custom Ansible roles pre/post boot of the node and also pre/post node provisioning. This opens doors to customize image built for custom requirements, for example if deployment needs to happen in offline environment that has no access to the internet and would require to update system with required changes to look for packages on internal proxies instead. Also allows to provide extra updates to the system before Kubernetes is installed along with extra tweaks after.
@vignesh-goutham , I've updated PR with requested addition to other hypervisor types along with rebasing the change on top of latest main branch. |
Thanks for this PR! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vignesh-goutham The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick release-0.17 |
@jaxesn: #2474 failed to apply on top of branch "release-0.17":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
As per kubernetes-sigs/image-builder#894 issue upstream project opened to use custom Ansible roles pre/post boot of the node and also pre/post node provisioning. This opens doors to customize image built for custom requirements, for example if deployment needs to happen in offline environment that has no access to the internet and would require to update system with required changes to look for packages on internal proxies instead. Also allows to provide extra updates to the system before Kubernetes is installed along with extra tweaks after.
As per kubernetes-sigs/image-builder#894 issue upstream project opened to use custom Ansible roles pre/post boot of the node and also pre/post node provisioning. This opens doors to customize image built for custom requirements, for example if deployment needs to happen in offline environment that has no access to the internet and would require to update system with required changes to look for packages on internal proxies instead. Also allows to provide extra updates to the system before Kubernetes is installed along with extra tweaks after. Co-authored-by: Vasyl Purchel <[email protected]>
Issues addressed:
Description of changes:
As per kubernetes-sigs/image-builder#894 issue upstream project opened to use custom Ansible roles pre/post boot of the node and also pre/post node provisioning.
This opens doors to customize image built for custom requirements, for example if deployment needs to happen in offline environment that has no access to the internet and would require to update system with required changes to look for packages on internal proxies instead.
Also allows to provide extra updates to the system before Kubernetes is installed along with extra tweaks after.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.