3

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.

3
  • What's the OS? And do you have options for customizing the provisioning process at all? Apr 12, 2012 at 22:17
  • I'm using Ubuntu 11.10. Not sure how to answer your second question.
    – AaronShaf
    Apr 12, 2012 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, 2012 at 17:59

5 Answers 5

3

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.)
1

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/

1

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.

0
0

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/

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .