You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jimi Hullegård <ji...@mogul.com> on 2010/04/15 10:57:08 UTC

Build a virtual machine using maven? A realistic idea?

Hi,

Recently I have been doing some work with a virtual machine (Ubuntu) with some specific programs installed. But what I am starting to realise is that we don't have a good documentation on exactly what is on this machine, and what changes has been made since it first was created, especially since it wasn't even created by me.

At the same time I am working alot with web applications, and use Maven, Subversion, CI etc on a daily basis. But all these wonderful tools can't be used when I work with virtual machines, even though it would be so great if that could work.

In the best of worlds I would be able to build a VM (in standard OVF format) just as easily as I now build a war- or ear-file. All our specific files and configuration would be under version control in SVN, and I would just add a dependency to a "vanilla" virtual machine (like "Ubunto-64" version "9.10") and it would insert our file structure into the VM, almost like war-overlay works for web applications. And maybe some specific programs could be "installed" by the means of defining other dependencies.

The advantages are obvious. One would now have complete controll of the content of the virtual machine, and not have to worry about some forgotten data in some database or file for example. And if one decided to switch from Ubuntu to say OpenSUSE it would idealy be a simple change of dependencies. Maybe even a change from Linux to Windows would be possible in the same simple manner, given that the proper license exists.

What do you guys think about this idea? Is it realistic? Or maybe such a solution, or similar, already exists or is planned?

/Jimi Hullegård
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


SV: Build a virtual machine using maven? A realistic idea?

Posted by Jimi Hullegård <ji...@mogul.com>.
Thanks for the tip on Vagrant, Mark! It looks really promising indeed. I have managed to create and start a simple VM but not managed to get much more out of it so far. And Chef also sounds really good (never heard of it before either though).

Although I'm not sure I could manage to write such a plugin for maven, given my practically non-existant knowledge of Ruby and my very limited knowledge of hard core virtual machine stuff.

/Jimi

________________________________________
Från: Mark Derricutt [mark@talios.com]
Skickat: den 15 april 2010 15:00
Till: Maven Users List
Ämne: Re: Build a virtual machine using maven? A realistic idea?

What you could do is wrap vagrantup as a maven plugin:

  http://vagrantup.com/

Or implement a native java version, basically vagrant is a tool for
creating virtual machine images from a base image, and can then
provision artifacts inside the image using opscode chef.

I've only been looking at the tool for a week or so but I'm already
head over heals in love with it - now I just need to work out how to
best utilize it :)

Mark

--
Pull me down under...

2010/4/15 Jimi Hullegård <ji...@mogul.com>:
> In the best of worlds I would be able to build a VM (in standard OVF format) just as easily as I now build a war- or ear-file. All our specific files and configuration would be under version control in SVN, and I would just add a dependency to a "vanilla" virtual machine (like "Ubunto-64" version "9.10") and it would insert our file structure into the VM, almost like war-overlay works for web applications. And maybe some specific programs could be "installed" by the means of defining other dependencies.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Build a virtual machine using maven? A realistic idea?

Posted by Mark Derricutt <ma...@talios.com>.
What you could do is wrap vagrantup as a maven plugin:

  http://vagrantup.com/

Or implement a native java version, basically vagrant is a tool for
creating virtual machine images from a base image, and can then
provision artifacts inside the image using opscode chef.

I've only been looking at the tool for a week or so but I'm already
head over heals in love with it - now I just need to work out how to
best utilize it :)

Mark

-- 
Pull me down under...

2010/4/15 Jimi Hullegård <ji...@mogul.com>:
> In the best of worlds I would be able to build a VM (in standard OVF format) just as easily as I now build a war- or ear-file. All our specific files and configuration would be under version control in SVN, and I would just add a dependency to a "vanilla" virtual machine (like "Ubunto-64" version "9.10") and it would insert our file structure into the VM, almost like war-overlay works for web applications. And maybe some specific programs could be "installed" by the means of defining other dependencies.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Build a virtual machine using maven? A realistic idea?

Posted by Stephen Connolly <st...@gmail.com>.
2010/4/16 Jimi Hullegård <ji...@mogul.com>

> >
> > So the maven plugin would understand the on-disk format of all operating
> > systems and be able to make changes to the on-disk format... not
> > realistic...
> >
> > esp given that the VM disk format is still not standardised.  OVF only
> > standardises the metadata about VMs, not the VM virtual disk format, let
> > alone the virtual OS's disk format.
>
> Well, I have no problem with the idea of having a specific handler for each
> type of format. Starting with the ones needed first, and then other formats
> hopefully would be supported as time goes by.
>
> > I could see interaction with (when I get back to it)
> > vcc-maven-plugin@mojowhereby you could deploy an OVF based VM to a
> > virtual machine host,
>
> What is this "vcc-maven-plugin"? Something that you have been working on? I
> couldn't find any information about it when I googled it.
>
>
yes.

http://mojo.codehaus.org/virtualization-maven-plugin/index.html

(it uses an API that I have been working on with kohsuke:
https://vcc.dev.java.net/ which is why I thought it was vcc-m-p)

Still a bit of work to make it really useful


> /Jimi
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Build a virtual machine using maven? A realistic idea?

Posted by Jimi Hullegård <ji...@mogul.com>.
> 
> So the maven plugin would understand the on-disk format of all operating
> systems and be able to make changes to the on-disk format... not
> realistic...
> 
> esp given that the VM disk format is still not standardised.  OVF only
> standardises the metadata about VMs, not the VM virtual disk format, let
> alone the virtual OS's disk format.

Well, I have no problem with the idea of having a specific handler for each type of format. Starting with the ones needed first, and then other formats hopefully would be supported as time goes by.

> I could see interaction with (when I get back to it)
> vcc-maven-plugin@mojowhereby you could deploy an OVF based VM to a
> virtual machine host, 

What is this "vcc-maven-plugin"? Something that you have been working on? I couldn't find any information about it when I googled it.

/Jimi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Build a virtual machine using maven? A realistic idea?

Posted by Stephen Connolly <st...@gmail.com>.
If you write a maven-plugin to do what you describe you will be a hero!

See inline for notes

2010/4/15 Jimi Hullegård <ji...@mogul.com>

> Hi,
>
> Recently I have been doing some work with a virtual machine (Ubuntu) with
> some specific programs installed. But what I am starting to realise is that
> we don't have a good documentation on exactly what is on this machine, and
> what changes has been made since it first was created, especially since it
> wasn't even created by me.
>
> At the same time I am working alot with web applications, and use Maven,
> Subversion, CI etc on a daily basis. But all these wonderful tools can't be
> used when I work with virtual machines, even though it would be so great if
> that could work.
>
> In the best of worlds I would be able to build a VM (in standard OVF
> format) just as easily as I now build a war- or ear-file. All our specific
> files and configuration would be


I see no issues in creating the OVF file from a maven plugin, ovf is just
XML


> under version control in SVN, and I would just add a dependency to a
> "vanilla" virtual machine (like "Ubunto-64" version "9.10") and it would
> insert our file structure into


So the maven plugin would understand the on-disk format of all operating
systems and be able to make changes to the on-disk format... not
realistic...

esp given that the VM disk format is still not standardised.  OVF only
standardises the metadata about VMs, not the VM virtual disk format, let
alone the virtual OS's disk format.

I could see interaction with (when I get back to it)
vcc-maven-plugin@mojowhereby you could deploy an OVF based VM to a
virtual machine host, then you
could use other maven plugins to connect to the VM and install what ever you
require, and finally use vcc-m-p to take a snapshot/image to package back up
again... but even that is a bit of stretch.

You might also want to look into the stuff RedHat is doing on virtual disk
format conversion

-Stephen


> the VM, almost like war-overlay works for web applications. And maybe some
> specific programs could be "installed" by the means of defining other
> dependencies.
>
> The advantages are obvious. One would now have complete controll of the
> content of the virtual machine, and not have to worry about some forgotten
> data in some database or file for example. And if one decided to switch from
> Ubuntu to say OpenSUSE it would idealy be a simple change of dependencies.
> Maybe even a change from Linux to Windows would be possible in the same
> simple manner, given that the proper license exists.
>
> What do you guys think about this idea? Is it realistic? Or maybe such a
> solution, or similar, already exists or is planned?
>
> /Jimi Hullegård
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>