Vagrant for testing "infrastructure as code"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Vagrant for testing "infrastructure as code"

Николай Рыжиков
Hello vagrant experts!

There are conceptual problem with our current solution and new vagrant distribution, can you advise for us?

We are using vagrant for automated testing our chef recipes.
We require vagrant gem in our rspec tests and manipulate vms by vagrant ruby API during spec execution:

* on spec start: we rollback vms to snapshot
* setup provision config for vms from spec and start provisioning
* using vagrant ssh channel (wrapped in rspec matchers) for making assertions about resulting state of vms
* run provisioning one more time, to ensure idempotent behavior of our cookbooks

But vagrant gem-installation is deprecated :(
Now we setup vagrant as package and as gem from github and use same testing approach.
But this looks not elegant and we are looking for better solution.

There are some ideas(please criticize them and give us better):
* bundle rspecs into vagrant plugin and use it like "vagrant rspec specs_path"
* Write drb plugin for vagrant and integrate rspec with vagrant from this plugin
* ?

73's

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant for testing "infrastructure as code"

Jimmy Cuadra
You can still load the project as a gem by using Bundler. Create a Gemfile like this:

    source "https://rubygems.org"

    gem "vagrant", github: "mitchellh/vagrant", tag: "v1.2.1"

Then `bundle install` and run your test suite prefixed with `bundle exec` so it uses the Git gem version of Vagrant.

On Tuesday, April 16, 2013 2:10:33 PM UTC-7, Николай Рыжиков wrote:
Hello vagrant experts!

There are conceptual problem with our current solution and new vagrant distribution, can you advise for us?

We are using vagrant for automated testing our chef recipes.
We require vagrant gem in our rspec tests and manipulate vms by vagrant ruby API during spec execution:

* on spec start: we rollback vms to snapshot
* setup provision config for vms from spec and start provisioning
* using vagrant ssh channel (wrapped in rspec matchers) for making assertions about resulting state of vms
* run provisioning one more time, to ensure idempotent behavior of our cookbooks

But vagrant gem-installation is deprecated :(
Now we setup vagrant as package and as gem from github and use same testing approach.
But this looks not elegant and we are looking for better solution.

There are some ideas(please criticize them and give us better):
* bundle rspecs into vagrant plugin and use it like "vagrant rspec specs_path"
* Write drb plugin for vagrant and integrate rspec with vagrant from this plugin
* ?

73's

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vagrant for testing "infrastructure as code"

Николай Рыжиков

Thank you, we are doing this way. But we are going to open source our customized spec runner. Is it ok to recommend users this method of vagrant installation? May be there are some official docs about installing vagrant as a gem? So we can reference to it.

On Apr 18, 2013 8:33 AM, "Jimmy Cuadra" <[hidden email]> wrote:
You can still load the project as a gem by using Bundler. Create a Gemfile like this:

    source "https://rubygems.org"

    gem "vagrant", github: "mitchellh/vagrant", tag: "v1.2.1"

Then `bundle install` and run your test suite prefixed with `bundle exec` so it uses the Git gem version of Vagrant.

On Tuesday, April 16, 2013 2:10:33 PM UTC-7, Николай Рыжиков wrote:
Hello vagrant experts!

There are conceptual problem with our current solution and new vagrant distribution, can you advise for us?

We are using vagrant for automated testing our chef recipes.
We require vagrant gem in our rspec tests and manipulate vms by vagrant ruby API during spec execution:

* on spec start: we rollback vms to snapshot
* setup provision config for vms from spec and start provisioning
* using vagrant ssh channel (wrapped in rspec matchers) for making assertions about resulting state of vms
* run provisioning one more time, to ensure idempotent behavior of our cookbooks

But vagrant gem-installation is deprecated :(
Now we setup vagrant as package and as gem from github and use same testing approach.
But this looks not elegant and we are looking for better solution.

There are some ideas(please criticize them and give us better):
* bundle rspecs into vagrant plugin and use it like "vagrant rspec specs_path"
* Write drb plugin for vagrant and integrate rspec with vagrant from this plugin
* ?

73's

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.