[xen-tools-discuss] Re: Installing additional packages with xen-create-image
Jeff Forcier
jeff at bitprophet.org
Tue Nov 25 20:46:18 CET 2008
:)
Keep in mind, too, that you can specify >1 role by using commas, and
it will hit them all (and in the order you specify).
For example, I have 'base' which installs basic stuff like lsof, tree,
vim-enhanced, etc; and 'web-base' which installs platform neutral junk
like mysql-server and apache2; and then specific roles like 'php5' or
'rails' which install a bunch of PHP5 or Ruby/Rails related packages;
and so forth. Obviously these can all do other things besides just
package installation, too, such as symlinking and etc -- anything a
shell script can do.
Then I can invoke xen-create-image with e.g. '--role
base,web-base,php5 ...' and it installs the full suite; or '--role
base,web-base,rails'; or even just '--role base' if it's not a Web
server (unlikely at my workplace, but still happens sometimes :)).
Very useful, very flexible, only problem is when I'm a retard and type
'--roles' instead of '--role', which unfortunately results in silently
creating the new VM without executing any roles, and doesn't complain
about the incorrect argument either :(
-Jeff
On Tue, Nov 25, 2008 at 2:26 PM, Alain Kelder <ak at bbsmb.net> wrote:
> On Mon, 2008-11-24 at 22:50 -0500, Jeff Forcier wrote:
>> I use the roles functionality to write my own scripts which install
>> extra packages, it's pretty flexible. I believe I worked off of the
>> included role scripts, which served as examples of how to use
>> convenience functions for installing e.g. Debian packages directly
>> onto the newly created filesystem, stuff like that.
>>
>
> This is perfect, I can't believe I missed that as it is clearly
> discussed in "man xen-create-image" and the example scripts
> in /etc/xen-tools/role.d should be enough to get me started. RTFM! ;)
> Thanks a lot, Jeff, for pointing me in the right direction. It appears
> Mr Kemp has thought of everything!
>
>
>
>
>
>
More information about the xen-tools-discuss
mailing list