Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Conversation

@justizin
Copy link

The virtualbox profile was not running cleanup.sh, which was causing a test failure in tests/spec/vboxguestadditions_spec.rb which expects /tmp/VBoxGuestAdditions.iso to have been removed.

Disabling this test allowed me to make progress, but was clearly not the correct solution.

Running cleanup.sh in the virtualbox profile, however, caused the SSH connection to fail when building other profiles, because the /root/.ssh/authorized_keys file had been removed.

I've separated these two actions, and have cleanup.sh running on all profiles, and clearing root authkeys on all profiles but virtualbox.

I've tested this a couple of times and it seems to work fine!

@justizin
Copy link
Author

I have a concern about the rootkey being left in the virtualbox image, if some people might want a production virtualbox (for some ridiculous reason).

This might tie in with another goal I have, which is to split the kickstart into building a base image as a separate step which isn't re-run when subsequent builds fail. This would make iterative dev a lot easier.

I also think it would be desirable to just not use the root login for builds other than the base.

Open to discussion, obviously just trying to leverage and contribute back to your great work!

@tmclaugh
Copy link
Owner

The kickstart shouldn't be run twice. Did you use 'timestamp=<timestamp_of_last_run>' on a successive run?

ex. rake packer:register[awshvm] os=Debian-7.8-x86_64.json timestamp=20150313092805
(I have Debian support in a private fork at work and was in the middle of building images just now.)

As for using the root user, I did that so I didn't have to remember to set the execution command for every shell provisioner. I also made that decision before I added serverspec support and was worried about leaving the build user in the image.

@justizin
Copy link
Author

I'll take a look at using timestamp=, it has seemingly been timestamping the builds on its' own, but the kickstart seems to run during the vagrant image build as well as the aws and other image builds. At least that's the impression I got, I can dig a bit more and try to see why this change seems to have fixed multiple problems on multiple machines, incl starting from scratch.

Would love to see that debian support, and would love to help you structure the project in a way that private branches aren't needed - a little worried about work I'm doing ending up in a private fork as well.

@tmclaugh
Copy link
Owner

Passing timestamp on the command line will use the kickstarted virtual box artifact as a base. Should be in the docs. If not it's mentioned in this slide deck.

http://www.slideshare.net/mobile/hubspotdev/suitcase-41369069

I'll see what I can do about enhancements to suitcase. New job at a startup with things to be done and systems to be built. That's taking a lot of my time.

Sent from my iPhone

On Mar 18, 2015, at 11:25 PM, Justin Alan Ryan notifications@github.com wrote:

I'll take a look at using timestamp=, it has seemingly been timestamping the builds on its' own, but the kickstart seems to run during the vagrant image build as well as the aws and other image builds. At least that's the impression I got, I can dig a bit more and try to see why this change seems to have fixed multiple problems on multiple machines, incl starting from scratch.

Would love to see that debian support, and would love to help you structure the project in a way that private branches aren't needed - a little worried about work I'm doing ending up in a private fork as well.


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants