Creating new host confusion

Hi Foremen,

I am confused about host creation. I think it's because I want to use it in a non-standard way.

If I don't have any hypervisors/PXE/proxy set up can I create a host through the web UI? – Obviously it wouldn't be provisioned automatically via virtualisation or anything, but can I create it so it is there in foreman. What happens now is I put a name in and configure host groups puppet classes and IP etc. and when I press create nothing happens it just refreshes the host creation page. Am I doing something wrong or is this a bug? I am on latest version as of a few hours ago (thanks to the foreman installer and helpful people on the dev mailling list :slight_smile: ).

Another thing I don't understand is that it requires me to set a mac address. When testing I just put in a random one to see what happens. What if I don't know the mac address at the time of creation? In the host provisioning screencast it seems like the smart proxy magics away this restriction.

The main reason I am asking about this is because I want to leverage foreman to provision FreeBSD jails. Jails are like VMs that all share the same live kernel but have a separate process/user environments via chrooting. it would be really easy to do this if I was able to create hosts without mac addresses and then use something like Feature #1194: Support hooking into host creation/deletion - Foreman to actually do the provisioning via auto SSHing into the jail host and creating the jail with parameters from foreman. Jails don't have mac addresses. In our environment we simply distribute virtual interfaces with different IPs via OSPF.

Thanks in advance. I am very excited to hear your response. My boss has given me time/support to contribute to this project if I can get the above mentioned functionality.

Lard

Lard,

Sounds liek you're trying to avoid using what we call Unattended mode -
i.e just controlling Puppet as an ENC/reporting tool. That's totally
supported, and what I did when I first starting using Foreman.

However, it's one of the few settings that cannot be changed in the UI,
so go into your config/settings.yaml file and set :unattended: to
false, and restart Foreman. Now, when creating a host, you'll have far
fewer tabs to fill in.

If you want to use some of the management tools, like using a proxy
to create dhcp/dns reservations, then unattended mode will need to be
on. In that case, it needs the Mac address in order to create the DHCP
reservations. As for using jails, I think Foreman requires that the
MAC is unique per host, so with Unattended switched on, you'll hit
problems. That sounds like a feature request to me.

You can indeed "make up" MAC addresses, but I seem to recall Foreman
will update them from facts when machines check in, so you may find
conflicts down the line with that approach.

Another option is to leave Unattended on, but to switch hosts to
Unmanaged mode. Unfortunately this button only exists after the host
is created, so at creation you'll have to make up a MAC. This gives you
the most flexibility, since you can manage the physical hosts
completely and keep the VMs/Jails in Unmanaged mode. Ohad, should the
"Unmanage Host" button be present when creating a new host?

In short, switch off Unattended should get you started, although
management of DHCP/DNS will remain out of Foreman's control. After
that, you can play around a bit :slight_smile:

Hope that helps,
Greg

··· On Fri 11 May 2012 15:04:51 BST, Lard Farnwell wrote: > Hi Foremen, > > I am confused about host creation. I think it's because I want to use it in a non-standard way. > > If I don't have any hypervisors/PXE/proxy set up can I create a host through the web UI? -- Obviously it wouldn't be provisioned automatically via virtualisation or anything, but can I create it so it is there in foreman. What happens now is I put a name in and configure host groups puppet classes and IP etc. and when I press create nothing happens it just refreshes the host creation page. Am I doing something wrong or is this a bug? I am on latest version as of a few hours ago (thanks to the foreman installer and helpful people on the dev mailling list :) ). > > Another thing I don't understand is that it requires me to set a mac address. When testing I just put in a random one to see what happens. What if I don't know the mac address at the time of creation? In the host provisioning screencast it seems like the smart proxy magics away this restriction. > > The main reason I am asking about this is because I want to leverage foreman to provision FreeBSD jails. Jails are like VMs that all share the same live kernel but have a separate process/user environments via chrooting. it would be really easy to do this if I was able to create hosts without mac addresses and then use something like http://theforeman.org/issues/1194#change-4851 to actually do the provisioning via auto SSHing into the jail host and creating the jail with parameters from foreman. Jails don't have mac addresses. In our environment we simply distribute virtual interfaces with different IPs via OSPF. > > Thanks in advance. I am very excited to hear your response. My boss has given me time/support to contribute to this project if I can get the above mentioned functionality. > > Lard

> Hi Foremen,
>
> I am confused about host creation. I think it's because I want to use it
> in a non-standard way.
>
> If I don't have any hypervisors/PXE/proxy set up can I create a host
> through the web UI? – Obviously it wouldn't be provisioned automatically
> via virtualisation or anything, but can I create it so it is there in
> foreman. What happens now is I put a name in and configure host groups
> puppet classes and IP etc. and when I press create nothing happens it just
> refreshes the host creation page. Am I doing something wrong or is this a
> bug? I am on latest version as of a few hours ago (thanks to the foreman
> installer and helpful people on the dev mailling list :slight_smile: ).
>

sounds like a bug, you would probably see the real error in your logs.

>
> Another thing I don't understand is that it requires me to set a mac
> address. When testing I just put in a random one to see what happens. What
> if I don't know the mac address at the time of creation? In the host
> provisioning screencast it seems like the smart proxy magics away this
> restriction.
>

if its a vm, then we get it from the provider automatically, but if its
bare metal, thats how we identify the system today.

>
> The main reason I am asking about this is because I want to leverage
> foreman to provision FreeBSD jails. Jails are like VMs that all share the
> same live kernel but have a separate process/user environments via
> chrooting. it would be really easy to do this if I was able to create hosts
> without mac addresses and then use something like
> Feature #1194: Support hooking into host creation/deletion - Foreman to actually do the
> provisioning via auto SSHing into the jail host and creating the jail with
> parameters from foreman. Jails don't have mac addresses. In our environment
> we simply distribute virtual interfaces with different IPs via OSPF.
>

That sounds like something we could support, you would be happy to know
that ssh support is nearly ready (as part of EC2 provisioning support). I
suggest you can play a bit with the code first, you could easily disable
mac address validations in app/model/host.rb file.

>
> Thanks in advance. I am very excited to hear your response. My boss has
> given me time/support to contribute to this project if I can get the above
> mentioned functionality.
>

great, welcome aboard :slight_smile:

··· On Fri, May 11, 2012 at 5:04 PM, Lard Farnwell wrote:

Lard


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Thanks Ohad and Greg,
Sorry for the late response.
Unattended mode did the trick for the time being at least. I'm happy to hear that some SSHing support for EC2 might make my life easier.
I tried messing around getting foreman to automatically recognise FreeBSD as an OS from facts. Do I have to subclass OperatingSystem with a FreeBSD class? The facts seem to be coming through OK in populateFieldsFromFacts in hosts.rb for FreeBSD. I'm very busy at the moment but some day in the next few weeks I will set up the 0.5 branch and I'll properly begin working on this feature.

Thanks again,

Lard

··· On 12/05/2012, at 12:59 AM, Greg Sutcliffe wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri 11 May 2012 15:04:51 BST, Lard Farnwell wrote:

Hi Foremen,

I am confused about host creation. I think it’s because I want to use it in a non-standard way.

If I don’t have any hypervisors/PXE/proxy set up can I create a host through the web UI? – Obviously it wouldn’t be provisioned automatically via virtualisation or anything, but can I create it so it is there in foreman. What happens now is I put a name in and configure host groups puppet classes and IP etc. and when I press create nothing happens it just refreshes the host creation page. Am I doing something wrong or is this a bug? I am on latest version as of a few hours ago (thanks to the foreman installer and helpful people on the dev mailling list :slight_smile: ).

Another thing I don’t understand is that it requires me to set a mac address. When testing I just put in a random one to see what happens. What if I don’t know the mac address at the time of creation? In the host provisioning screencast it seems like the smart proxy magics away this restriction.

The main reason I am asking about this is because I want to leverage foreman to provision FreeBSD jails. Jails are like VMs that all share the same live kernel but have a separate process/user environments via chrooting. it would be really easy to do this if I was able to create hosts without mac addresses and then use something like Feature #1194: Support hooking into host creation/deletion - Foreman to actually do the provisioning via auto SSHing into the jail host and creating the jail with parameters from foreman. Jails don’t have mac addresses. In our environment we simply distribute virtual interfaces with different IPs via OSPF.

Thanks in advance. I am very excited to hear your response. My boss has given me time/support to contribute to this project if I can get the above mentioned functionality.

Lard

Lard,

Sounds liek you’re trying to avoid using what we call Unattended mode -
i.e just controlling Puppet as an ENC/reporting tool. That’s totally
supported, and what I did when I first starting using Foreman.

However, it’s one of the few settings that cannot be changed in the UI,
so go into your config/settings.yaml file and set :unattended: to
false, and restart Foreman. Now, when creating a host, you’ll have far
fewer tabs to fill in.

If you want to use some of the management tools, like using a proxy
to create dhcp/dns reservations, then unattended mode will need to be
on. In that case, it needs the Mac address in order to create the DHCP
reservations. As for using jails, I think Foreman requires that the
MAC is unique per host, so with Unattended switched on, you’ll hit
problems. That sounds like a feature request to me.

You can indeed “make up” MAC addresses, but I seem to recall Foreman
will update them from facts when machines check in, so you may find
conflicts down the line with that approach.

Another option is to leave Unattended on, but to switch hosts to
Unmanaged mode. Unfortunately this button only exists after the host
is created, so at creation you’ll have to make up a MAC. This gives you
the most flexibility, since you can manage the physical hosts
completely and keep the VMs/Jails in Unmanaged mode. Ohad, should the
"Unmanage Host" button be present when creating a new host?

In short, switch off Unattended should get you started, although
management of DHCP/DNS will remain out of Foreman’s control. After
that, you can play around a bit :slight_smile:

Hope that helps,
Greg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+tKVcACgkQ8O7RN8oK65NEQQCfeJG1UNf697XtCUKDq9/Zyr4r
EwIAnAoIk6KVqeAQx8jGk/xbm7PpoVVw
=lFUh
-----END PGP SIGNATURE-----


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.

Lard,

As I've just merged in a new OS myself, I'll point you to the two
commits I made. As you see, it's a new sublclass of OS, an image file
for the logo, and some optional PXE data for the installs. You can
avoid that be specifying an existing pxe type.

https://github.com/theforeman/foreman/commit/ba71c565baefbb183367e79dc1138c8258b457cb
https://github.com/theforeman/foreman/commit/3303158196ca95328c132b7b5f1e0fc8b88bdd42

Enjoy!

Greg


OpenPGP -> KeyID: CA0AEB93

··· On Sun 20 May 2012 02:10:42 BST, Lard Farnwell wrote: > Thanks Ohad and Greg, > Sorry for the late response. > Unattended mode did the trick for the time being at least. I'm happy > to hear that some SSHing support for EC2 might make my life easier. > I tried messing around getting foreman to automatically recognise > FreeBSD as an OS from facts. Do I have to subclass OperatingSystem > with a FreeBSD class? The facts seem to be coming through OK in > populateFieldsFromFacts in hosts.rb for FreeBSD. I'm very busy at the > moment but some day in the next few weeks I will set up the 0.5 branch > and I'll properly begin working on this feature.

Thanks Greg,

This is just what I need!

Lard

··· On 21/05/2012, at 7:47 PM, Greg Sutcliffe wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun 20 May 2012 02:10:42 BST, Lard Farnwell wrote:

Thanks Ohad and Greg,
Sorry for the late response.
Unattended mode did the trick for the time being at least. I’m happy
to hear that some SSHing support for EC2 might make my life easier.
I tried messing around getting foreman to automatically recognise
FreeBSD as an OS from facts. Do I have to subclass OperatingSystem
with a FreeBSD class? The facts seem to be coming through OK in
populateFieldsFromFacts in hosts.rb for FreeBSD. I’m very busy at the
moment but some day in the next few weeks I will set up the 0.5 branch
and I’ll properly begin working on this feature.

Lard,

As I’ve just merged in a new OS myself, I’ll point you to the two
commits I made. As you see, it’s a new sublclass of OS, an image file
for the logo, and some optional PXE data for the installs. You can
avoid that be specifying an existing pxe type.

https://github.com/theforeman/foreman/commit/ba71c565baefbb183367e79dc1138c8258b457cb
https://github.com/theforeman/foreman/commit/3303158196ca95328c132b7b5f1e0fc8b88bdd42

Enjoy!

Greg


Looking forward to your patch :wink:

Ohad

··· On 05/24/2012 11:47 AM, Lard Farnwell wrote: > Thanks Greg, > > This is just what I need! > > Lard