Skip to content
Browse files

added readme and fixed the issues with the URI inclusion.

In standalone puppet, you need to start things off in a node resource, not by doing a strait "include <module>"
Putting things in a node/site.pp directory and using a node resource fixed my problem.
  • Loading branch information...
1 parent 8be6754 commit 9c3b9690431607d3e990ee79819e14a1c2064588 @uberj committed Dec 4, 2011
Showing with 51 additions and 7 deletions.
  1. +36 −0 README.mkd
  2. +3 −2 glaspot/bootstrap.sh
  3. +3 −0 nodes/site.pp
  4. +4 −0 php_apd/manifests/init.pp
  5. +5 −5 php_apd/manifests/install.pp
View
36 README.mkd
@@ -0,0 +1,36 @@
+Most of these puppet modules are for the specific task of installing glaspot. The repo should probably have a less generic name.
+
+_Important: As of now, I have only tested this build on debian6 amd64. It should work on x86 and other debian based distro's. It will most definitly *not* work on systems that rely on an rpm package manager like fedro. Puppet *can* handle those systems, but I just haven't written these modules to do so. If you want that sort of support, just ask._
+
+Installation
+------------
+Before we can use puppet to build glaspot, you should probably set up a VM. I used veewee and vagrant to build my environment and I highly recommend both tools. I'm going to assume in this guide that you are using vagrant.
+
+Here is the link the veewee project https://github.com/jedi4ever/veewee
+Come back when you have a box you want to install glaspot on.
+
+Ok, I now am assuming that that you have a working VM and you can ssh into it and install crap. Cool.
+
+First, checkout this repo into your VM.
+
+ git clone git@github.com:uberj/puppet-modules.git
+
+If you are using vagrant, there is a shared folder between guest and host systems. I have my vagrant setup in `/data/vagrant` on my host machine. This is where I call `vagrant up` and `vagrant ssh`. Once you are in the VM you'll notice the output of mount says that we have a handy partition:
+
+ root@basebox:~# mount
+ (...)
+ v-root on /vagrant type vboxsf (uid=1000,gid=1000,rw)
+
+This is where I checked put the repo.
+
+ cd /vagrant/ && git clone git@github.com:uberj/puppet-modules.git && cd puppet-modules
+
+I wrote a nifty (a.k.a a quick hack) bootstrap script to help install glaspot via puppet. You just need to run the script!
+
+ /vagrant/puppet-modules/glaspot/bootstrap.sh
+
+If you are using a different directory to do all this you will most likely need to edit bootstrap.sh. Just set `puppet_modules` to the directory where you put the puppet-modules repo.
+
+If all goes well you should have glaspot installed (by defualt into '/opt'). You can tweak where it is installed by passing different parameters to the glaspot module (read the comments).
+
+If you encounter an error. Please complain :).
View
5 glaspot/bootstrap.sh
@@ -2,6 +2,7 @@
# Bootstrap a VM to be a glaspot honeypot.
puppet_modules="/vagrant/puppet-modules"
+node_definitions="$puppet_modules/nodes/site.pp"
aptitude -y install puppet
-echo "modulepath = $puppet_modules" >> /etc/puppet/puppet.conf
-puppet apply -e "include glaspot"
+puppet apply --modulepath $puppet_modules -e "include glaspot"
+puppet apply --verbose --modulepath $puppet_modules $node_definitions
View
3 nodes/site.pp
@@ -0,0 +1,3 @@
+node default {
+ include glaspot
+}
View
4 php_apd/manifests/init.pp
@@ -1 +1,5 @@
# Derp
+
+class php_apd {
+ class { "php_apd::install": }
+}
View
10 php_apd/manifests/install.pp
@@ -12,12 +12,12 @@
package {'apd':
ensure => present,
provider => dpkg,
-#source => "puppet://puppet/php_apd/files/apd_1.0.1_i386.deb",
- source => "puppet:///modules/php_apd/files/apd_1.0.1_i386.deb",
+ source => "/vagrant/puppet-modules/php_apd/files/apd_1.0.1_i386.deb",
+ #source => "puppet:///modules/php_apd/apd_1.0.1_i386.deb",
}
-#zend_extension=/usr/lib/php5/20090626+lfs/apd.so
-#apd.statement=1
-#apd.tracedir=/tmp/apd-traces
+ #zend_extension=/usr/lib/php5/20090626+lfs/apd.so
+ #apd.statement=1
+ #apd.tracedir=/tmp/apd-traces
exec { 'zend_extensions':
unless => "grep zend_extension=/usr/lib/php5/20090626+lfs/apd.so ${php_ini}",
command => "echo 'zend_extension=/usr/lib/php5/20090626+lfs/apd.so' >> ${php_ini}",

0 comments on commit 9c3b969

Please sign in to comment.
Something went wrong with that request. Please try again.