diff mbox

[ovs-dev,4/6] vagrant: Override box for libvirt provider.

Message ID 1463770199-24391-5-git-send-email-joe@ovn.org
State Changes Requested
Headers show

Commit Message

Joe Stringer May 20, 2016, 6:49 p.m. UTC
The default vagrant box for fedora23 uses the images provided by Chef's
"bento" project, which has support for 3 backend providers: parallels,
virtualbox and vmware. However, they do not build boxes for the libvirt
backend.

Introduce an override for the box to use the official fedora project box
if trying to use the libvirt provider.

Signed-off-by: Joe Stringer <joe@ovn.org>
---
 Vagrantfile | 3 +++
 1 file changed, 3 insertions(+)

Comments

Andy Zhou May 23, 2016, 11:30 p.m. UTC | #1
On Fri, May 20, 2016 at 11:49 AM, Joe Stringer <joe@ovn.org> wrote:

> The default vagrant box for fedora23 uses the images provided by Chef's
> "bento" project, which has support for 3 backend providers: parallels,
> virtualbox and vmware. However, they do not build boxes for the libvirt
> backend.
>
> Introduce an override for the box to use the official fedora project box
> if trying to use the libvirt provider.
>
> Signed-off-by: Joe Stringer <joe@ovn.org>
> ---
>  Vagrantfile | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Vagrantfile b/Vagrantfile
> index 4f2e0fdb7c48..dab03de56fac 100644
> --- a/Vagrantfile
> +++ b/Vagrantfile
> @@ -56,6 +56,9 @@ SCRIPT
>  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
>    config.vm.define "fedora-23" do |fedora|
>         fedora.vm.box = "bento/fedora-23"
> +       fedora.vm.provider :"libvirt" do |lv, override|
> +           override.vm.box = "fedora/23-cloud-base"
> +       end
>
Libvirt support is not currently documented on the Vagrant web site.
It may be nice to add a bit more document, and perhaps add links that have
the relavent information.

On the other hand, do we need to support all those types of providers (and
therefore different Linux images?)
It may be nicer to support one of them well. I'd vote for libvirt provided
that we can fix the documentation issues
mentioned above.  What do you think?

        fedora.vm.provision "bootstrap", type: "shell", inline:
> $bootstrap_fedora
>         fedora.vm.provision "configure_ovs", type: "shell", inline:
> $configure_ovs
>         fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs
> --
> 2.8.2
>
>
Joe Stringer June 4, 2016, 2:07 a.m. UTC | #2
On 23 May 2016 at 16:30, Andy Zhou <azhou@ovn.org> wrote:
>
>
> On Fri, May 20, 2016 at 11:49 AM, Joe Stringer <joe@ovn.org> wrote:
>>
>> The default vagrant box for fedora23 uses the images provided by Chef's
>> "bento" project, which has support for 3 backend providers: parallels,
>> virtualbox and vmware. However, they do not build boxes for the libvirt
>> backend.
>>
>> Introduce an override for the box to use the official fedora project box
>> if trying to use the libvirt provider.
>>
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>> ---
>>  Vagrantfile | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Vagrantfile b/Vagrantfile
>> index 4f2e0fdb7c48..dab03de56fac 100644
>> --- a/Vagrantfile
>> +++ b/Vagrantfile
>> @@ -56,6 +56,9 @@ SCRIPT
>>  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
>>    config.vm.define "fedora-23" do |fedora|
>>         fedora.vm.box = "bento/fedora-23"
>> +       fedora.vm.provider :"libvirt" do |lv, override|
>> +           override.vm.box = "fedora/23-cloud-base"
>> +       end
>
> Libvirt support is not currently documented on the Vagrant web site.
> It may be nice to add a bit more document, and perhaps add links that have
> the relavent information.
>
> On the other hand, do we need to support all those types of providers (and
> therefore different Linux images?)
> It may be nicer to support one of them well. I'd vote for libvirt provided
> that we can fix the documentation issues
> mentioned above.  What do you think?

Today if someone only has the libvirt provider, they can't use the OVS
Vagrantfile at all. The thought with this was it would allow them to
do this, but without any implied support for any particular provider.
However, I've got the VirtualBox provider working now so I don't care
to push for inclusion of this patch. I agree that it's not great to
use diverging images for multiple platforms, so it's probably simpler
to leave everything as-is.
Andy Zhou June 6, 2016, 9:02 p.m. UTC | #3
On Fri, Jun 3, 2016 at 7:07 PM, Joe Stringer <joe@ovn.org> wrote:

> On 23 May 2016 at 16:30, Andy Zhou <azhou@ovn.org> wrote:
> >
> >
> > On Fri, May 20, 2016 at 11:49 AM, Joe Stringer <joe@ovn.org> wrote:
> >>
> >> The default vagrant box for fedora23 uses the images provided by Chef's
> >> "bento" project, which has support for 3 backend providers: parallels,
> >> virtualbox and vmware. However, they do not build boxes for the libvirt
> >> backend.
> >>
> >> Introduce an override for the box to use the official fedora project box
> >> if trying to use the libvirt provider.
> >>
> >> Signed-off-by: Joe Stringer <joe@ovn.org>
> >> ---
> >>  Vagrantfile | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/Vagrantfile b/Vagrantfile
> >> index 4f2e0fdb7c48..dab03de56fac 100644
> >> --- a/Vagrantfile
> >> +++ b/Vagrantfile
> >> @@ -56,6 +56,9 @@ SCRIPT
> >>  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
> >>    config.vm.define "fedora-23" do |fedora|
> >>         fedora.vm.box = "bento/fedora-23"
> >> +       fedora.vm.provider :"libvirt" do |lv, override|
> >> +           override.vm.box = "fedora/23-cloud-base"
> >> +       end
> >
> > Libvirt support is not currently documented on the Vagrant web site.
> > It may be nice to add a bit more document, and perhaps add links that
> have
> > the relavent information.
> >
> > On the other hand, do we need to support all those types of providers
> (and
> > therefore different Linux images?)
> > It may be nicer to support one of them well. I'd vote for libvirt
> provided
> > that we can fix the documentation issues
> > mentioned above.  What do you think?
>
> Today if someone only has the libvirt provider, they can't use the OVS
> Vagrantfile at all. The thought with this was it would allow them to
> do this, but without any implied support for any particular provider.
> However, I've got the VirtualBox provider working now so I don't care
> to push for inclusion of this patch. I agree that it's not great to
> use diverging images for multiple platforms, so it's probably simpler
> to leave everything as-is.
>
O.K. for me. Thanks for the updates.
diff mbox

Patch

diff --git a/Vagrantfile b/Vagrantfile
index 4f2e0fdb7c48..dab03de56fac 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -56,6 +56,9 @@  SCRIPT
 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   config.vm.define "fedora-23" do |fedora|
        fedora.vm.box = "bento/fedora-23"
+       fedora.vm.provider :"libvirt" do |lv, override|
+           override.vm.box = "fedora/23-cloud-base"
+       end
        fedora.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
        fedora.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
        fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs