First see https://github.com/hashicorp/packer/pull/4681

I have tried running serverspec for educational purposes with Packer.
First I thougth it should be a second step of a pipeline after
creating the AMI but after some considerations mostly about the time
it takes to launch a new instance and the overhead it adds I think
it's better to do the validation as the last step of your Packer
provisioning. You can eaither run serverspec localy on the instance
you are building or run it from the host running Packer.

If you want a second step in your pipeline Terraform might be a better option.

// Rickard

On 11 July 2017 at 20:07, Loren Gordon <[email protected]> wrote:
> Hello,
> I'd like to run tests using serverspec or testinfra against AMIs created
> using Packer. Is anyone doing something similar?
>
> I looked at testkitchen with kitchen-ec2, but it feels pretty weak when it
> comes to setting up the AWS environment...for example, it doesn't create the
> ssh keypair or the security group, and so of course doesn't clean them up
> either. Meaning more setup/teardown that I'd have to manage myself. Packer's
> support for such things is pretty great, so it occurred to me that perhaps I
> could just use Packer to launch the instance and run the tests. However, it
> appears that the ebs builder will _always_ create an AMI and for the test
> run I wouldn't want another AMI. So I looked at the null builder, but that
> seems like it would require me to manage all the same things as
> testkitchen/kitchen-ec2.
>
> I think, ideally, it would be handy if the ebs builder accepted something
> like "null" as an option for the ami_name, or just make it optional rather
> than required, indicating that the builder would not create an AMI or any
> other artifacts. Would anyone else be interested in such a feature?
>
> Thanks,
> -Loren
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/a1ac442e-e6cb-4d8b-b2eb-9dc9f9716821%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt_uBvWzPRV01hniCaOhHEMbcp2Dn7KqJ9wYQWjt3XaWpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to