Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Right now I

  • log into the new server
  • put the puppet master in /etc/hosts
  • install puppet
  • change "START" to "yes" in /etc/default/puppet
  • change "server" to puppet master name under [main]
  • run agent with --waitforcert
  • sign it over on the puppet master.

I'd like for this to be automated. The long-term goal is to easily scale up and down as resources are needed.

share|improve this question
    
What's the OS? And do you have options for customizing the provisioning process at all? –  Shane Madden Apr 12 '12 at 22:17
    
I'm using Ubuntu 11.10. Not sure how to answer your second question. –  AaronShaf Apr 12 '12 at 22:49
    
Does rackspace support user data/cloud init? If so, it's easy to write a script to edit the hosts file and boostrap puppet. I do this now on amazon. The script is pasted into the aws (or ylastic, etc.) console when launching new servers. –  czervik Apr 13 '12 at 17:59
add comment

5 Answers

up vote 3 down vote accepted

There are a lot of techniques you can apply to make this less work. I don't know Rackspace specifically, so some of this may not be possible, but you can take some ideas and leave others.

  1. Use machine images: Have a machine image ready that includes Puppet, your configuration and a key in /root/.ssh/authorized_keys from an automation master.
  2. Add callback: Set up something in /etc/init.d, /etc/rc.local or similiar to kick off an initial puppet run, then hit the automation and trigger a script that signs the certificate. The host should already be in a node declaration that matches, and a second configuration should trigger with 'waitforcert' set to 'true'.
  3. Use Puppet to clean up: Have a module that cleans up the entries from the above (root access ssh key, rc.local, etc.)
share|improve this answer
add comment

The official Rackspace Cloud app for iOS has an option to connect new instances to your puppet master automatically on boot. I'm not sure how they do the bootstrapping process though, but it may help you get started.

http://www.rackspace.com/blog/rackspace-cloud-2-0-1-for-iphone-ipad-and-ipod-touch-coming-soon/

share|improve this answer
add comment

Puppet cloud provisioner have a branch that supports rackspace:

https://github.com/puppetlabs/puppetlabs-cloud-provisioner/pull/55

We need some additional testing and would love to get some community feedback on this branch. Here's the documentation on how to use it.

share|improve this answer
    
Awesome. Thank you! –  AaronShaf Apr 18 '12 at 18:22
add comment

You'll also want to checkout Using Puppet With Cloud Servers and Using Libcloud and Puppet to Bootstrap Cloud Servers. Note that Rackspace now supports cloud-init to inject any additional config you might need.

share|improve this answer
add comment

This exact process has been automated with a shell script called puppet-bootstrap that I have created. Portable accross architectures and operating systems: http://workshop.avatarnewyork.com/project/puppet-bootstrap/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.