A few weeks ago I had a post about Blueprint which is a tool that will map out a running linux system and turn out a puppet configuration.
At the time of the initial post I hadn't really tried actually deploying the config, I was given that task last week. When I tried to do so I realized that not only that there was pretty much zero documentation on how to actually do this, but that the puppet module is not 100% working. No disrespect to devstructure here though, they wrote an amazing app that gets about 90% there but with a few problems. This is going to be a guide to how I got from the result of the blueprint command to a deployed ubuntu box using the generated module.
I will be using ubuntu 10.04, puppet packages from apt, and a blueprint of my personal VPS. I will also be using /etc/hosts as a stand in for a proper DNS server.
Throughout this guide both the server and the client should have the following in /etc/hosts(names can be changed). Also the hostname should match what is in /etc/hosts for both
Clik here to view.
IP.Of.Master puppetmaster.test.com
IP.Of.Client puppetclient.test.com
Part 1: Getting Blueprint to make you a puppet recipe
1. Install the pip and use it to install blueprint
apt-get install python-pip
pip install blueprint (you can use --upgrade to get the newest version)
2. Run the blueprint-create command with the -P switch to generate a puppet module of your system.
root@vps:~# blueprint-create -P vps_blueprint
# [blueprint] searching for software built from source
# [blueprint] searching for configuration files
# [blueprint] searching for Ruby gems
# [blueprint] searching for Python packages
# [blueprint] searching for apt packages
# [blueprint] searching for yum packages
# [blueprint] searching for PEAR/PECL packages
Reinitialized existing Git repository in /home/pratik/.blueprints.git
vps_blueprint/manifests/init.pp
Now you have a blueprint of your system in a folder called vps_blueprint. The question now is, what do you do with this? The blueprint site doesn't have any steps to take this config and put it into Puppet (to be fair however, I do not think that the puppet part of blueprint is their main concern).
Part 2: Setup puppet master
1. On the box that will be the puppet-master install the proper packages
apt-get install puppet-common puppetmaster
Image may be NSFW.Clik here to view.
