Provisioning and remote excution

Latest response

Hi
is it possible to call a job from Satellite 6.2 at the end of the provisioning process?
Or on first boot?

Responses

Hello

The Creating Provisioning Templates section of the Red Hat Satellite 6.2 Provisioning Guide lists the finish template for running post-configuration scripts.

The Template Writing Reference in the Red Hat Satellite 6.2 Host Configuration Guide might also be of interest.

I'm aware of this documents and different types of the provisioning templates. However, my question is about the Satellite's remote execution jobs. Is it possible to call them from outside of the Satellite, using APIs?

OK, in that case best wait for someone more knowledgeable to answer.

I do not see anything in the API Guide about finishing or post provisioning. BTW, I see the Hammer CLI Guide has Running Remote Jobs on Hosts which enables you to run templates.

Yep, I saw that, but this is not the one I'm looking for. This one is just the CLI reference to run the commands from hammer. I'll not install hammer on all my servers anyway :) Thanks

By definition, anything that you can run via hammer can be done via the API (as hammer uses the public API to do its work).

As far as running a job via the API, you want to use

/api/job_invocations

More can be found in the API docs on your Satellite https://your.satellite/apidoc/v2/job_invocations/

Thanks , that what I was looking for :) Missed it somehow :)

In satellite 5 we wrote a cgi wrapper that would take care of some post-build items (assigning custom values, final deploy of configuration files, etc..) That wrapper would get called (wget http://satellite/cgi-bin/wrapper.cgi?update_hosts or some such) .

I'm hoping we don't have to carry this over to Satellite 6, but it seems feasible to wrap up api calls similarly.

Depending on your usage, you might not need that CGI script. For many things like custom values, hostgroup parameters might be useful, as they are set at the hostgroup level and can be inherited (or overridden) on a per-host level at provisioning time (or any point later).

Yep, I did that as well :) Small CGI that calling ansible code for post-provisioning :) But I was looking from something more robust :) Rich gave me the answer https://your.satellite/apidoc/v2/job_invocations/ Thanks :)

Thanks , that what I was looking for :) Missed it somehow :)

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.