Project

General

Profile

Actions

Feature #23692

open

Allow puppet provisioning on otherwise fully provisioned hosts

Added by Sebastian Raterman almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

My use case is to import VM's from Compute Resources, and have Foreman provision puppet to these otherwise fully installed Ubuntu servers.

This allows automation of the puppet install, meaning I can use other tools to fully provision a new server, Foreman knows about it from the Compute Resources an I can then Import as a new Host, provision puppet and then roll out a set of puppet confs.

Currently it seems Foreman requires me to do other OS provisioning if I import the host, when the OS doesn't need anything. I realize I can manually configure the puppet to get it added as a Foreman Host, but ideally Foreman is what I'd like to use to automate this process.

I've been asked to make this Feature Request from this support ticket: https://community.theforeman.org/t/provisioning-puppet-to-otherwise-fully-provisioned-compute-resources-server/9761

Many thanks!

Actions #1

Updated by Marek Hulán almost 6 years ago

  • Project changed from Foreman to Foreman Remote Execution

I think this is doable today using remote execution plugin. We should only add a default job template that includes the "setup puppet" snippet from provisioning template.

Do you have remote execution plugin installed? If not, check it's manual and let us know if you need some help. If you distill the temolate, we'd be happy to get it into default set of templates we ship.

Actions #2

Updated by Sebastian Raterman almost 6 years ago

Yes, that seems like it can work, and I can automatically make sure the SSH key is installed on the servers when they provision with Digital Ocean.

I believe I got the plugin installed successfully as well. I guess I'd just be uncertain of how I proceed after this from the list of DO Compute Resources VMs to getting it added as a host with the puppet_setup snip, but prob need to read the docs first. (=

Thanks for the quit response!

Actions #3

Updated by Sebastian Raterman almost 6 years ago

OK, so I installed remote execution plugin. It seemed to install successfully but now the Foreman front-end crashes. I just used the apt-get instructions for ubuntu, so not sure what went wrong - I can probably figure it out.

However - reading through the instructions, it appears that remote-execution templates are used through existing Hosts, which I am not able to create yet.

I would like the ability to use the available access data from our compute-resources VMs to run puppet-setup and import those servers as new Hosts, without needing to SSH into those servers by hand. (To my sense needing to log into the servers defeats the purpose of using an automation tool.)

Is there some way of running the remote-execution puppet-setup snip on a compute-resources VM, rather than running it via Hosts?

Thank you for your help with this!

Actions #4

Updated by Sebastian Raterman almost 6 years ago

OK I resolved the plugin install issue from this info: https://community.theforeman.org/t/error-column-version-of-relation-dynflow-schema-info-already-exists/8791/4

Going to see if I can figure out how I might be able to get this working.

Sorry but I'm still new to puppet and not entirely sure what are actual limitations and what is just my perception.

Actions #5

Updated by Sebastian Raterman almost 6 years ago

So I've been exploring everything I can.

But I don't see a way to use remote-execution on a non-host.

This does seem like a great tool for my use-case, but I'd need to be able to run it on a non-host. The whole point is to get puppet setup, which then imports it as a host.

I looked into creating a host without provisioning, but it seems like a mess - this isn't designed for non-provisioning. If I could simply uncheck "enable host for provisioning" and then the required fields didn't matter that would let me run the remote job, get puppet installed, and voila the info is populated. But why do I need to dig up the MAC when getting puppet setup solves everything.

So... it seems like it should be easy to use Foreman to work with pre-provisioned servers, and get puppet setup with a couple clicks, then voila.

I know I can do the puppet setup manually, and it isn't hard. But I'm trying to make this as seamless and simple as possible, so I can train people who aren't comfortable on the command line. If it is possible to get this added as feature, that would be amazing! And I do see other requests for this too when I search, so I think others would like it as well. Thanks!

Actions #6

Updated by Marek Hulán almost 6 years ago

Sorry I guess I misunderstood your original request then. I though you're fine with associating the VM from compute resource manually, which creates unmanaged host object. On this host, you could then run REX job. You're right, there's no good way of creating unmanaged host through UI, but it's very easy to do so from hammer (CLI), something like

hammer host create --name something.example.com --managed false --build false

should work. Perhpahs I forgot one or two params. The same could be achieved using REST API.

Actions #7

Updated by Sebastian Raterman almost 6 years ago

Thanks for your help. Adding a host via cli is much easier to work with.

I'll see if I can get it going from here.

Actions

Also available in: Atom PDF