On Mon, Dec 22, 2008 at 04:47:53PM -0700, Tim Harper wrote:
> 
> I want to run puppet in the cloud.  The trouble is, the fqdn fact is
> quite random and looks something like "domU-12-32-19-01-B8-D1".
> 
> I'm OK with deploying the cert pair and configuring puppetd to use the
> same cert on every box.  However, I need to be able to select which
> node configuration in the puppet master to use on the client side,
> without changing the hostname (or adding a new node every time we
> bring up a new server).
> 
> Is this possible?  Do I have to over-ride the fqdn fact some how on the 
> client?

The simplest way I've found to tackle this problem is by utilising the
user-data portion of the API. When you start the EC2 instance you can
attach a file which will be available via http after boot.

I use the ubuntu images created by Eric Hammond http://alestic.com/.
If you look at the script used to create them you can see how it saves
the user data in a particular location on the disk and then if it
begins with #! it executes it.

So you can put info in there which another script uses to configure
the box.

My preference however is to send a script which configures the server.
My particular script does the following.

- Puts VPN keys embedded in the script to the disk
- Installs and starts openvpn to connect to my puppet server
- Places puppet certificates on the disk
- Installs puppet
- Sets the hostname of the server
- restarts puppet

That way the puppetmaster knows which server it's supposed to be.

Hope that helps.

Cheers,

-- 
John
Blog                        http://www.inodes.org/blog
OLPC Friends                     http://olpcfriends.org


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to