> I have custom Ruby script which automates VM cloning in our vSphere
> infrastructure.
> How can I integrate this script into Foreman? I want Foreman to call my
> custom script instead of creating VM on its own, configuring pxe boot and
> kickstart.
You can probably use foreman-hooks [1] plugin, and threat that host as bare
metal instead.
Just out of interest, if we would to support image based deployment on
vsphere, would you rather use that instead?
Ohad
[1] - https://github.com/domcleal/foreman_hooks
···
On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva wrote:
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
> You can probably use foreman-hooks [1] plugin
Great! It will take some time for me to go through this.
> Just out of interest, if we would to support image based deployment on
vsphere, would you rather use that instead?
For sure. Also is it possible to query external IPAM for ip address for the
host?
Thanks a lot for response!
Regards,
Alexey
···
On Tuesday, June 4, 2013 12:02:44 AM UTC-7, ohad wrote:
>
>
>
> On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva <alex....@gmail.com > > wrote:
>
>> I have custom Ruby script which automates VM cloning in our vSphere
>> infrastructure.
>> How can I integrate this script into Foreman? I want Foreman to call my
>> custom script instead of creating VM on its own, configuring pxe boot and
>> kickstart.
>
>
> You can probably use foreman-hooks [1] plugin, and threat that host as
> bare metal instead.
>
> Just out of interest, if we would to support image based deployment on
> vsphere, would you rather use that instead?
>
> Ohad
>
> [1] - https://github.com/domcleal/foreman_hooks
>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Foreman users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to foreman-user...@googlegroups.com .
>> To post to this group, send email to forema...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/foreman-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
I'd support image based deployment on LibVirt, Provided I didnt have to
give up the current functionality of being able to build a new machine from
scratch
Ryan
···
On Tue, Jun 4, 2013 at 7:02 PM, Ohad Levy wrote:
On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva alex.savva@gmail.comwrote:
I have custom Ruby script which automates VM cloning in our vSphere
infrastructure.
How can I integrate this script into Foreman? I want Foreman to call my
custom script instead of creating VM on its own, configuring pxe boot and
kickstart.
You can probably use foreman-hooks [1] plugin, and threat that host as
bare metal instead.
Just out of interest, if we would to support image based deployment on
vsphere, would you rather use that instead?
Ohad
[1] - https://github.com/domcleal/foreman_hooks
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
@Ohad I would definitely be interested in foreman providing functionality
to deploy a VM from template.
···
On Tuesday, June 4, 2013 3:02:44 AM UTC-4, ohad wrote:
>
>
>
> On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva <alex....@gmail.com > > wrote:
>
>> I have custom Ruby script which automates VM cloning in our vSphere
>> infrastructure.
>> How can I integrate this script into Foreman? I want Foreman to call my
>> custom script instead of creating VM on its own, configuring pxe boot and
>> kickstart.
>
>
> You can probably use foreman-hooks [1] plugin, and threat that host as
> bare metal instead.
>
> Just out of interest, if we would to support image based deployment on
> vsphere, would you rather use that instead?
>
> Ohad
>
> [1] - https://github.com/domcleal/foreman_hooks
>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Foreman users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to foreman-user...@googlegroups.com .
>> To post to this group, send email to forema...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/foreman-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> I'd support image based deployment on LibVirt, Provided I didnt have to
> give up the current functionality of being able to build a new machine from
> scratch
>
afair (not tried recently libvirt is a bit different then others, as it
does not provide a full backend to create an image based deployment.
e.g.
file based:
Using COW (copy on write) meaning a new file(image) needs to be created on
the file system with reference to other image.
LVM based
a new snapshot needs to be created, etc
which means you need an extra daemon running on the hypervisor, we could in
theory extend the proxy to perform things like that, but it always felt
that if you need more robustness, maybe its better to use something else
like ovirt or openstack?
If I'm wrong about my assumptions, I'll be happy to know 
Ohad
···
On Tue, Jun 4, 2013 at 12:43 PM, Ryan Davies wrote:
Ryan
On Tue, Jun 4, 2013 at 7:02 PM, Ohad Levy ohadlevy@gmail.com wrote:
On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva alex.savva@gmail.comwrote:
I have custom Ruby script which automates VM cloning in our vSphere
infrastructure.
How can I integrate this script into Foreman? I want Foreman to call my
custom script instead of creating VM on its own, configuring pxe boot and
kickstart.
You can probably use foreman-hooks [1] plugin, and threat that host as
bare metal instead.
Just out of interest, if we would to support image based deployment on
vsphere, would you rather use that instead?
Ohad
[1] - https://github.com/domcleal/foreman_hooks
–
You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
>
> I'd support image based deployment on LibVirt, Provided I didnt have to
> give up the current functionality of being able to build a new machine from
> scratch
>
> Ryan
>
>
>
>>
>>
>>
>>> I have custom Ruby script which automates VM cloning in our vSphere
>>> infrastructure.
>>> How can I integrate this script into Foreman? I want Foreman to call my
>>> custom script instead of creating VM on its own, configuring pxe boot and
>>> kickstart.
>>
>>
>> You can probably use foreman-hooks [1] plugin, and threat that host as
>> bare metal instead.
>>
>> Just out of interest, if we would to support image based deployment on
>> vsphere, would you rather use that instead?
>>
>> Ohad
>>
>> [1] - https://github.com/domcleal/foreman_hooks
>>
>>>
>>> –
>>> You received this message because you are subscribed to the Google
>>> Groups "Foreman users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to foreman-user...@googlegroups.com <javascript:>.
>>> To post to this group, send email to forema...@googlegroups.com<javascript:>
>>> .
>>> Visit this group at http://groups.google.com/group/foreman-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>> @Ohad, Cloning of vmware temples to vm's would be very nice. This also
>> solves a lot of vm configuration issues. The current created vm's need a
>> lot of reconfiguation (network drivers, guest os, scsi controllers, extra
>> settings like hot cpu/mem add, in-depended disks and so on.) Creating a vm
>> from a vmware template would solve all these issues. One thing to note is
>> that it would be nice to link a template to an OS version, So that for
>> example a RHEL5 OS would create a RHEL5 VM with virtual hardware that best
>> fits this OS en vmware tools needed for that OS. RHEL6 (or 7 which will
>> come soon) should then be able to use a different template with specific
>> setting for those os'es. Foreman should then overrule, number of nic's (and
>> type), cpu's, memory, number of disks and size base on current
>> configuration options in foreman for vmware.
>>
>
···
Op dinsdag 4 juni 2013 11:43:21 UTC+2 schreef Ryan Davies het volgende:
> On Tue, Jun 4, 2013 at 7:02 PM, Ohad Levy <ohad...@gmail.com > > wrote:
>> On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva <alex....@gmail.com >> > wrote:
Puppet enterprise also uses cloning from template. But the versions that I
used (at least two years ago) didn't allow to customize cpu, mem, disk and
so on when creating a vm from template. If templates could be used that
have dynamically sized disks then we would be able to create lots of
different small templates (small in disk size) that would be able to grow
when deployed based on foreman disk, cpu and so on sizes.
···
Op dinsdag 4 juni 2013 23:44:02 UTC+2 schreef Ronaldo M het volgende:
>
>
>
> Op dinsdag 4 juni 2013 11:43:21 UTC+2 schreef Ryan Davies het volgende:
>>
>> I'd support image based deployment on LibVirt, Provided I didnt have to
>> give up the current functionality of being able to build a new machine from
>> scratch
>>
>> Ryan
>>
>>
>> On Tue, Jun 4, 2013 at 7:02 PM, Ohad Levy wrote:
>>
>>>
>>>
>>> On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva wrote:
>>>
>>>> I have custom Ruby script which automates VM cloning in our vSphere
>>>> infrastructure.
>>>> How can I integrate this script into Foreman? I want Foreman to call my
>>>> custom script instead of creating VM on its own, configuring pxe boot and
>>>> kickstart.
>>>
>>>
>>> You can probably use foreman-hooks [1] plugin, and threat that host as
>>> bare metal instead.
>>>
>>> Just out of interest, if we would to support image based deployment on
>>> vsphere, would you rather use that instead?
>>>
>>> Ohad
>>>
>>> [1] - https://github.com/domcleal/foreman_hooks
>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Foreman users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to foreman-user...@googlegroups.com.
>>>> To post to this group, send email to forema...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/foreman-users?hl=en.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>
>>> @Ohad, Cloning of vmware temples to vm's would be very nice. This also
>>> solves a lot of vm configuration issues. The current created vm's need a
>>> lot of reconfiguation (network drivers, guest os, scsi controllers, extra
>>> settings like hot cpu/mem add, in-depended disks and so on.) Creating a vm
>>> from a vmware template would solve all these issues. One thing to note is
>>> that it would be nice to link a template to an OS version, So that for
>>> example a RHEL5 OS would create a RHEL5 VM with virtual hardware that best
>>> fits this OS en vmware tools needed for that OS. RHEL6 (or 7 which will
>>> come soon) should then be able to use a different template with specific
>>> setting for those os'es. Foreman should then overrule, number of nic's (and
>>> type), cpu's, memory, number of disks and size base on current
>>> configuration options in foreman for vmware.
>>>
>>
Hmm. Looks I need some help 
I've installed foreman_hooks, created few shell scripts, and I can see that
they are registered:
Found hook to Host#destroy, filename 20_test.sh
Found hook to Host#create, filename 10_test.sh
Found hook to Host#before_create, filename 30_test.sh
Finished registering 1 hooks for Host#create
Finished registering 1 hooks for Host#before_create
Finished registering 1 hooks for Host#destroy
Unfortunately I don't see exec calls when I create or delete host using
Foreman GUI.
Am I missing something?
···
On Tuesday, June 4, 2013 12:27:38 PM UTC-7, Alexey Savva wrote:
>
> > You can probably use foreman-hooks [1] plugin
> Great! It will take some time for me to go through this.
> > Just out of interest, if we would to support image based deployment on
> vsphere, would you rather use that instead?
> For sure. Also is it possible to query external IPAM for ip address for
> the host?
>
> Thanks a lot for response!
>
> Regards,
> Alexey
>
> On Tuesday, June 4, 2013 12:02:44 AM UTC-7, ohad wrote:
>>
>>
>>
>> On Mon, Jun 3, 2013 at 10:57 PM, Alexey Savva wrote:
>>
>>> I have custom Ruby script which automates VM cloning in our vSphere
>>> infrastructure.
>>> How can I integrate this script into Foreman? I want Foreman to call my
>>> custom script instead of creating VM on its own, configuring pxe boot and
>>> kickstart.
>>
>>
>> You can probably use foreman-hooks [1] plugin, and threat that host as
>> bare metal instead.
>>
>> Just out of interest, if we would to support image based deployment on
>> vsphere, would you rather use that instead?
>>
>> Ohad
>>
>> [1] - https://github.com/domcleal/foreman_hooks
>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Foreman users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to foreman-user...@googlegroups.com.
>>> To post to this group, send email to forema...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/foreman-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
There was an issue raised recently that hooks aren't firing if you're
using compute resources, and also there seem to be other issues on 1.1
with it.
Apologies, it's a bit broken at the moment. I'll hopefully get back to
it soon.
···
On 05/06/13 03:29, Alexey Savva wrote:
> Hmm. Looks I need some help :(
> I've installed foreman_hooks, created few shell scripts, and I can see
> that they are registered:
> Found hook to Host#destroy, filename 20_test.sh
> Found hook to Host#create, filename 10_test.sh
> Found hook to Host#before_create, filename 30_test.sh
> Finished registering 1 hooks for Host#create
> Finished registering 1 hooks for Host#before_create
> Finished registering 1 hooks for Host#destroy
> Unfortunately I don't see exec calls when I create or delete host using
> Foreman GUI.
> Am I missing something?
–
Dominic Cleal
Red Hat Engineering
Sorry for asking, but does it work for 1.2?
···
On Wednesday, June 5, 2013 12:06:51 AM UTC-7, Dominic Cleal wrote:
>
>
> There was an issue raised recently that hooks aren't firing if you're
> using compute resources, and also there seem to be other issues on 1.1
> with it.
>
> Apologies, it's a bit broken at the moment. I'll hopefully get back to
> it soon.
>
> --
> Dominic Cleal
> Red Hat Engineering
>
Yes, I released a new version (0.3.3) yesterday that I've been testing
with 1.2 successfully.
If you're on an RPM distro, the packages are in our plugins repo
(yum.theforeman.org/plugins), otherwise you can use the gem.
https://github.com/domcleal/foreman_hooks
···
--
Dominic Cleal
Red Hat Engineering
On 29/08/13 22:42, Alexey Savva wrote:
Sorry for asking, but does it work for 1.2?
On Wednesday, June 5, 2013 12:06:51 AM UTC-7, Dominic Cleal wrote:
There was an issue raised recently that hooks aren't firing if you're
using compute resources, and also there seem to be other issues on 1.1
with it.
Apologies, it's a bit broken at the moment. I'll hopefully get back to
it soon.
--
Dominic Cleal
Red Hat Engineering
–
You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.