Provisioning puppet to otherwise fully provisioned compute resources server

Hi! I’m new to puppet and wondering if what I want can be done.

I’d like to import our digital ocean servers as hosts from the digitalocean compute resources, and then have these existing, already-provisioned ubuntu servers get puppet deployed to them so they can talk with our puppet master and get automatically configured.

But when I try to import the DO VM’s as Foreman Hosts, it seems it requires me to add provisioning templates related to OS setup, when the only provisioning I would need is the puppet setup. I know that if I manually setup puppet on the VM then Foreman will add it as a Host, but I was hoping Foreman would be the tool to let me automate this.

It seems like a simple use-case to me, so I’d guess I’m doing something wrong, or not quite understanding how all this works.

Thanks for any help!
Sebastian

Hello,
It looks like we don’t currently have this functionality. Imported VMs are created as managed hosts by default which requires OS etc. to be configured, but not I’m not sure if that’s actually a good default.
I agree this feature is definitely useful, I would expect the workflow after importing the VMs would be something like using remote execution to install puppet on the hosts? Sine right now puppet is set up as part of the provisioning process, if we don’t provision the hosts from inside Foreman there is no way to get it set up.
Please open a feature request on our redmine tracker: https://projects.theforeman.org

Thanks tbrisker!

Yes that would be the workflow, and it would be fantastic for our needs.

I’ve added the feature request over here: Feature #23692: Allow puppet provisioning on otherwise fully provisioned hosts - Foreman

There is another way…

If you configure Puppet to either upload facts or reports to Foreman, then when a new host runs puppet agent, host will be created in Foreman to store that data. This will create an “unmanaged” host which does not need the same level of configuration.

Once you have unmanaged hosts, you can still connect them to the hypervisor using the Associate VMs button on the Compute Resource page.

This won’t help with your provisioning issues, but at least you can manage the hosts thereafter. As @tbrisker says, do raise a bug for the rest :slight_smile:

Thanks! I want to use an automation tool so that no one needs to manually login to the server and setup puppet or anything else.

Foreman has a great puppet_setup snippet and seems to be designed to enable many layers of automated configuration, so I find it strange that my use-case is excluded from leveraging it. But yes I might need to run puppet manually in the mean time.

In the ticket it was suggested that I can use the remote-execution plugin to run the puppet_setup snippet, which I am totally open to, but it seems the only way to run remote-execution is via the Hosts feature, and I cannot add my servers as Hosts until puppet is installed.

(But my remote-execution install seems to have broken my Foreman frontend, so I’m relying on the remote-execution docs… maybe there are other ways to use remote-execution on non-hosts, I dunno yet.)