Skip to content
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

Option to skip the image creation #7209

Closed
bheiskell-datto opened this issue Jan 17, 2019 · 19 comments · Fixed by #10496
Closed

Option to skip the image creation #7209

bheiskell-datto opened this issue Jan 17, 2019 · 19 comments · Fixed by #10496
Labels
builder/openstack community-supported-plugin denotes requests for plugins that are supported by the community, not by HashiCorp engineers enhancement

Comments

@bheiskell-datto
Copy link

Hey folks,

I'm using packer with OpenStack to create base images from puppet manifests. An unexpected use case grew somewhat organically. We started using packer to build merge requests to verify the puppet manifests actually applied. This has worked really well for us. Unfortunately, it takes 4 minutes out of an 11 minute build to just save the image back to OpenStack. It doesn't look like there's an option to skip the creating image step. I took a look at the code base and it doesn't look too complicated to add this option. I don't mind doing this myself, but I first wanted to get some feedback on the issue.

First, since this isn't technically something that packer is designed to do, would you be receptive to adding an option to skipe the image save? Second, if so, should this be a global option, or one specifically for the openstack provider?

Thanks!
Ben

@bheiskell-datto
Copy link
Author

bheiskell-datto commented Jan 17, 2019

After writing this up, I discovered #1740 which seems to be similar to what I'm trying to accomplish. I'm not trying to stir up an old argument, but it was closed because the value add wasn't clear. Hopefully this ticket makes the value add clear?

@rickard-von-essen
Copy link
Collaborator

Relates to #4681 and #4899

@TJM
Copy link
Contributor

TJM commented Jan 29, 2019

Maybe related to #2679 which looks merged?

@bheiskell-datto
Copy link
Author

I'm not familiar with this code base, but is the image saving a post processor? This is where the save step seems to occur:

&stepCreateImage{

@cbrit
Copy link

cbrit commented Feb 4, 2019

+1 to this. like @bheiskell-datto mentioned, it's already been discussed a few years ago, but it would be very helpful to apply CI to the packer template itself. And I'm thinking for builders in general, not just Openstack.

Primarily I think it would be useful for PR-triggered jobs, to test that a template is "buildable" before merging, as well as during development when you want to test provisioners without having to worry about cleaning up images or CTRL-C the build to avoid it.

@SwampDragons
Copy link
Contributor

I'm not wild about this because I thing being used as a CI provider is outside of Packer's scope. That said, I would merge a PR that added an option to skip saving the image. If someone wants to implement this, I won't stand in your way.

@lorengordon
Copy link

I'd be pretty excited if #4681 were reopened, or otherwise revived, and merged! 😃

@SwampDragons
Copy link
Contributor

@lorengordon To restate why we didn't merge that one, and why I don't love this one -- this feature, no matter which builder we use it with, alters the builder artifact which breaks post-processor assumptions, which could break Packer builds.

But if people keep asking for it, then maybe it's worth figuring out how to safely break those assumptions. I'm not going to be rebasing or cleaning up #4681, but at this point, if someone else wants to then I'll revisit it.

@cbrit
Copy link

cbrit commented Feb 14, 2019

@SwampDragons what do you think of skipping post-processors if the -no-artifact (or whatever the flag is) is present?

@SwampDragons
Copy link
Contributor

@cbrit That's one option. Making some kind of "null" artifact that gets produced in these cases may be a more flexible one.

@jquick
Copy link

jquick commented Feb 25, 2019

Would love this option implemented!

@rasmus
Copy link

rasmus commented Sep 18, 2019

Any news on this issue?

@SwampDragons
Copy link
Contributor

The maintainers are not planning to prioritize work on it, but PRs are welcome. I'll merge a new PR that implements this work.

@nywilken nywilken added the community-supported-plugin denotes requests for plugins that are supported by the community, not by HashiCorp engineers label Nov 18, 2020
@pussinboots
Copy link

Just an idea can it be implemented like it is in the googlecloud builder.

if config.SkipCreateImage {

Define a skip image flag and then if this is present just skip the image creation. Looks not so difficult to be implemented.

@TJM
Copy link
Contributor

TJM commented Jan 19, 2021

I don't think this should be closed. I think @pussinboots was saying that this could be implemented similar to the one for googlecompute?

@azr
Copy link
Contributor

azr commented Jan 19, 2021

Hello @TJM, this issue was closed when the PR fixing it was merged: #10496, please tell us if that fix does not work for you 🙂 .

@TJM
Copy link
Contributor

TJM commented Jan 19, 2021

Disregard, sorry for the noise. This was not the issue I thought it was :(

@azr
Copy link
Contributor

azr commented Jan 20, 2021

no worries !

@ghost
Copy link

ghost commented Feb 19, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder/openstack community-supported-plugin denotes requests for plugins that are supported by the community, not by HashiCorp engineers enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.