-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add boot steps configuration option #103
Conversation
Adds a new configuration option called `boot_steps`. This is an array of tuples of boot commands, to type when the virtual machine is booted. The first element of the tuple is the actual boot command. The second element of the tuple is a description of what the boot command does. This is intended to be used for interactive installers that requires many commands to complete the installation. Both the command and the description will be printed when logging is enabled. When debug mode is enabled Packer will pause after typing each boot command. This will make it easier to follow along the installation process and make sure the Packer and the installer are in sync. Closes hashicorp/packer#11824 Closes hashicorp/packer#11286
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jacob-carlborg,
First off thanks for the PR, I like the proposal, and I think it brings value to the boot sequences, also very sorry for missing the issues that you opened earlier in the year, thanks for taking the time to implement them.
I do have a few comments on the code itself, feel free to address them, and we can do another pass later.
On another note, I wonder if this is the right place for this feature: since the boot config is straight out of the SDK, I think this code might find a better home in this project, as every plugin will then benefit from this change.
@nywilken: what's your thoughts on that? Do you think this would benefit from bumping it to the SDK?
Thanks again for the PR @jacob-carlborg!
The definition of the boot command config is in the SDK and there seem to be some validations as well. But besides that, executing the boot command step occurs in this project. Please let me know what you decide and I can move some of the code to the SDK. |
Now when |
@lbajolet-hashicorp I've now moved some of the code to the SDK e00cc19 and hashicorp/packer-plugin-sdk#139. I don't know how you're handling dependent pull requests, but this will fail until the SDK PR is merged. |
e1fd321
to
322ce49
Compare
322ce49
to
4de68fb
Compare
@lbajolet-hashicorp I've updated the PR and removed the dependency on the SDK PR hashicorp/packer-plugin-sdk#139. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jacob-carlborg,
The code looks good to me, I left just a few comments, which once addressed should lead to this being merged.
Thanks again for your patience and for the contribution, much appreciated!
@lbajolet-hashicorp I've addressed all the comments now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jacob-carlborg,
Code looks good to me, we can merge this and it'll be included in the upcoming version 1.0.7 of the plugin.
Thanks again!
Awesome, thanks. |
Adds a new configuration option called
boot_steps
. This is an array of tuples of boot commands, to type when the virtual machine is booted. The first element of the tuple is the actual boot command. The second element of the tuple is a description of what the boot command does. This is intended to be used for interactive installers that requires many commands to complete the installation.Both the command and the description will be printed when logging is enabled. When debug mode is enabled Packer will pause after typing each boot command. This will make it easier to follow along the installation process and make sure the Packer and the installer are in sync.
Closes hashicorp/packer-plugin-sdk#216
Closes hashicorp/packer#11286