-
Notifications
You must be signed in to change notification settings - Fork 80
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
Added net installs for all x86_64 centos boxes. #11
base: master
Are you sure you want to change the base?
Conversation
own kickstart file so it pulls from the propper direcotry. The mirrors have all been changed to the stanford mirror for consistency.
Hmmm....yeah, interesting problem that a kickstart would be necessary for each version to be netbootable - let me think on this... |
I couldn't come up with a clean solution to change the version number depending on what version you were installing. As a lowly developer I don't have much experience with kickstart files. When I get to $work tomorrow I can ask our ops people if there is a better solution. |
Within a kickstart, I've been able to use environment variables successfully to parametize them - I've had less success with preseed files on Ubuntu/Debian. I want to try to see if I can rig up something to pass something through from the json template. That being said, thank you for the submission - I appreciate the contribution. If there's no easy solution to the parametization conundrum, the solution I know will work is to place tokens in the kickstart file and dynamically replace them via the Makefile before running the "packer build" (another advantage to being script-driven to generate files). One way or the other we'll get this sorted. |
I appreciate your work on this. You should really consider submitting your boxes to http://www.vagrantbox.es/. I had lost all hope of finding a centos5 box until I found packer, which led me to your repo. It seems like you've really put a lot of work into this and it is definitely appreciated on my end. Let me know if there is anything else I can contribute. |
The token-replacement approach might be best because we could also do away with having one kickstart for the netboot and another for the DVD version. But I want to think on it a bit more, as I don't want to have to force people to use the Makefile, and I'd prefer the box templates to work standalone. Looks like with a little more investigation two birds could be stoned ;-) |
it looks like this http://www.packer.io/docs/templates/user-variables.html could be very useful if packer processes the kickstart file. I'll give it a go and post back with results. |
Well packer doesn't directly pass variables to those separate kickstart templates. After some research, it appears you can use perl/php/ruby to template those kickstart files. You can also put the kickstart file directly in the builder and then use the template variables provided by packer. |
FYI Makefile now works again - "make list" to print out a list of boxes, and "make /.box" to build a single box (example: "make vmware/centos510-net.box") |
Yes, looks like scripting is going to be the way to go, alas: http://www.dizwell.com/2013/04/08/conditional-kickstart/ A Makefile can handle this easily. |
And an ideal candidate ultimately for extension of Packer variable support to be able to replace tokens in script files as well as the template.json |
Agreed, if packer could handle this, there would be a lot of very happy sysadmins in the world. I talked to some of the opts guys I know and they all template using perl. If you'd like to set up a hacking branch for that I wouldn't be opposed to working on it. I am a perl developer by trade so a CGI script or something like it to format be config file would definitely be in my wheelhouse. |
OK, took awhile, but I think I am going with the replaceable tokens in the script approach. I'm in the process of updating the templates so the iso_url & checksum can be variables (among other things), and I'll add some more Makefile logic as a preprocessing step to create new ks-net.cfg.template & pressed-net.cfg.template files so that the important lines in these files can be replaced. I was hoping perhaps Mitchell might add this to packer proper, but it can be done just as easily outside the tool in the Makefile. I just don't like having a ks-net.cfg/preseed-net.cfg for each flavor of the OS - too many files to manage. |
Each box has its own kickstart file so it pulls from the proper directory. The
mirrors have all been changed to the stanford mirror for consistency.