Project

General

Profile

Actions

Support #17146

open

cant use multiple user_data templates with one OS. So how i deploy it right?

Added by Alva Wang over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Good evening together,

sorry for my english language skills, i hope its understandable.

i set up puppet, foreman and foreman-vmware to deploy windows hosts from a VMWare template wich is defined in VMWare VSphere. I have use this guide for this:

https://www.inovex.de/blog/deploying-windows-server-with-foreman-in-vsphere/

This works fine so far, but i have a big handling problem. I dont know if its a bug or i just use foreman wrong because maybe i dont understand the deployment philosophy.

In my user_data template for a specific operation system, i define the most important things like domain join and also installation of the puppet agent through Powershell. I have to define in wich environment my puppet agent node goes through in by an argument passing to the agent installation , because if i dont do this, all agents goes in the production environment by default.

When i want provision a new host by foreman-vmware, i can choose, wich environment and hostgroup i want my new host goes in. I choose a operation system like Windows Server 2012 R2, and see there my user_data template. But of course, my user data template puts the puppet agent to the environment i define by the installation argument in the user_data template. So what could happen is:

My puppet agent is in the production environment, but in formen my host is in the development environment.

So my idea was to define mulitple user_data templates for Windows Server 2012 R2 with different installation arguments for different environments. I think that this was a good idea, because in the user_data template i can define the environment and if i want also the hostgroup for this user_data template.

What i think i could do then:

user_data template 1: Windows Server 2012 R2, installs the agent with development environment argument, user_data template is specified for the environment development in foreman.

user data template 2: Windows Server 2012 R2, installs the agent with production environment argument. user_data template is specified for the production development in foreman.

What i have think then in the "new-host" dialogue in foreman-vmware, i just specifiy the environment and hostgrop wich i want to deploy my new host, and if choose Windows Server 2012 R2 as an operation system, he shows my the user_data template 1 or 2 depends by the environment and hostgroup i have choose in the dialogue one step before.

That was my theory, but foreman cancel my plan by the fact, that its not possible to connect different user_data Template to one operation system. When i create a operation system in foreman, i have to define one user data template for it. So:

- one operation system only one user data template,
- but every user_data template could have multiple operation systems.

thats really a pity, it would be cool if i could use different user_data templates with one operation system.

So i guess, iam not the only one who deploy new hosts on this way with automatic puppet agent installation. Whats the best practice to deploy hosts in different environemnts? How foreman wants me to install the puppet agent automaticly on the host i deploy with the right environment argument to get a clean deployment without getting any error messages by puppet?

Thanks for any help

Best Regards

Alva

No data to display

Actions

Also available in: Atom PDF