Foreman BMC support

Hey,

If I want to start adding support to foreman for bmc controls, where should I begin?

Do I need to make a wrapper class for the smart proxy bmc calls in the orchestration code? Do I need to add some functions to the host model?

Let me know what work I can do.

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

> Hey,
>
> If I want to start adding support to foreman for bmc controls, where
> should I begin?
>
> Do I need to make a wrapper class for the smart proxy bmc calls in the
> orchestration code? Do I need to add some functions to the host model?
>
> Let me know what work I can do.
>
> The first step, would be to create a proxy api class that implements the
bmc api functionality, for example, see lib/proxyapi.

secondly, we need to decide to which operations we want to hook bmc, (e.g.
destory should also turn off, built should reset etc).

third, we need to figure out where to store the creds (per model?, in a
smart var ?)

and last, we need to put it as part of the attestation, so we schedule
those actions.

I'm wondering, if a possible way forward would be to create a bare metal
compute resource.

Ohad

··· On Mon, Oct 15, 2012 at 2:55 AM, Corey Osman wrote:

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

That's not a bad idea - we have small security flaw in that a user
with compute resource filters can still create bare metal hosts. That
would be fixed with a bare metal resource that can be ticked (or not)
in the filters.

··· On 15 October 2012 09:00, Ohad Levy wrote: > I'm wondering, if a possible way forward would be to create a bare metal > compute resource.

Where are the tests for the proxy_api?

I added the following code to the proxy. Completely untested though.

https://github.com/logicminds/foreman/commit/1fb18685c6d163bdc7b0a6d4ff57fd20531a825b

One question I had is that I need to pass a parameter with an http get. This parameter will be ipmi_provider. The current proxy code does not allow a payload to be passed though. Should I add a payload to the get proxy api call?

Also will this proxy bmc object persist through multiple hosts? I do not want to keep ipmi_provider persistent across hosts since each host may have different bmc provider requirements.

So a get request with a payload will be required to retrieve the status of the bmc.

Any comments on this code thus far?

How should I create the new model for the compute_resource bare metal host?

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

··· On Oct 15, 2012, at 1:00 AM, Ohad Levy wrote:

On Mon, Oct 15, 2012 at 2:55 AM, Corey Osman corey@logicminds.biz wrote:
Hey,

If I want to start adding support to foreman for bmc controls, where should I begin?

Do I need to make a wrapper class for the smart proxy bmc calls in the orchestration code? Do I need to add some functions to the host model?

Let me know what work I can do.

The first step, would be to create a proxy api class that implements the bmc api functionality, for example, see lib/proxyapi.

secondly, we need to decide to which operations we want to hook bmc, (e.g. destory should also turn off, built should reset etc).

third, we need to figure out where to store the creds (per model?, in a smart var ?)

and last, we need to put it as part of the attestation, so we schedule those actions.

I’m wondering, if a possible way forward would be to create a bare metal compute resource.

Ohad

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

> Where are the tests for the proxy_api?
>
> I added the following code to the proxy. Completely untested though.
>
>
> https://github.com/logicminds/foreman/commit/1fb18685c6d163bdc7b0a6d4ff57fd20531a825b
>
>
> One question I had is that I need to pass a parameter with an http get.
> This parameter will be ipmi_provider. The current proxy code does not
> allow a payload to be passed though. Should I add a payload to the get
> proxy api call?
>
sure

>
> Also will this proxy bmc object persist through multiple hosts? I do not
> want to keep ipmi_provider persistent across hosts since each host may have
> different bmc provider requirements.
>
no, it should not, in general, most web based requests are persistence only
for the duration of the request.

>
> So a get request with a payload will be required to retrieve the status of
> the bmc.
>
> Any comments on this code thus far?
>
I'll answer via github

>
> How should I create the new model for the compute_resource bare metal host?
>
I think that we need a simple class that expose the power management
operations, and later these should be added via orchestration (just as
other orchestration calls are done).

I think we could probably align the bare metal ipmi based commands to a
similar object as fog server class.

One thing which I need to do, is to break down the host model into small
objects (monitored - facts/reports, managed - enc, provisioning + bare
metal, provisioning + virt and provisioning + cloud) classes.

then it might be easier to fit the bare metal power management.

Ohad

··· On Fri, Oct 19, 2012 at 6:05 AM, Corey Osman wrote:

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

On Oct 15, 2012, at 1:00 AM, Ohad Levy ohadlevy@gmail.com wrote:

On Mon, Oct 15, 2012 at 2:55 AM, Corey Osman corey@logicminds.biz wrote:

Hey,

If I want to start adding support to foreman for bmc controls, where
should I begin?

Do I need to make a wrapper class for the smart proxy bmc calls in the
orchestration code? Do I need to add some functions to the host model?

Let me know what work I can do.

The first step, would be to create a proxy api class that implements the
bmc api functionality, for example, see lib/proxyapi.

secondly, we need to decide to which operations we want to hook bmc, (e.g.
destory should also turn off, built should reset etc).

third, we need to figure out where to store the creds (per model?, in a
smart var ?)

and last, we need to put it as part of the attestation, so we schedule
those actions.

I’m wondering, if a possible way forward would be to create a bare metal
compute resource.

Ohad

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist