-
Notifications
You must be signed in to change notification settings - Fork 176
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
Building custom RHEL Based images will fail if make is not used #197
Comments
Hi, I think this solution is much cleaner than the existing one. We would certainly consider this move if you are willing to provide PRs. If you do, please create a PR for each distro, let's avoid one massive PR as this is hard to review. |
@alexsander-souza and @jurekh , the PR for CentOS 7 is ready. Please review and consider. I will continue with the reset of the distributions when this one is reviewed/commented on and merged. |
Refactor CentOS 7 Packer templates. Relates to #197.
Relates to #197 Remove reliance on make when building the Rocky 8 image.
Issue Description
As stated in the
centos7/README.md
file, the image can be build just with packer and without using make:packer init PACKER_LOG=1 packer build .
This will result in a failed build as anaconda cannot fetch the kickstart file:
When starting a build process with
make
, thehttp/centos7.ks
is generated by make, hence the build finishes successfully.Below is the code snippet from the Makefile:
This happens with the rest of the RHEL based distros as far as I checked.
Proposal
Instead of using make to substitute strings in a
http/centos7.ks.in
and generate a newhttp/centos7.ks
, use templatefile hcl function together with http_contentSee more details in this blog post: Using Template Files with HashiCorp Packer
Pros
Please see example changes for centos7 in the fork: https://github.com/canonical/packer-maas/compare/main...GR360RY:packer-maas:packer_refactor_ks_generation?expand=1
I will be happy to provide a PR for all distributions if this is something you are willing to consider.
The text was updated successfully, but these errors were encountered: