Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add puppet modules

  • Loading branch information...
commit 1c712c30527ee10eda86c9ccc3609f13ad28639f 1 parent 8ee29c7
@edavis authored
View
9 Vagrantfile
@@ -4,8 +4,9 @@
Vagrant::Config.run do |config|
config.vm.box = "lucid32"
- # config.vm.provision :puppet do |puppet|
- # puppet.manifests_path = "manifests"
- # puppet.manifest_file = "lucid32.pp"
- # end
+ config.vm.provision :puppet do |puppet|
+ puppet.manifests_path = "puppet"
+ puppet.manifest_file = "lucid32.pp"
+ puppet.module_path = "puppet/modules"
+ end
end
View
3  puppet/lucid32.pp
@@ -0,0 +1,3 @@
+include common
+include python
+include memcached
View
30 puppet/modules/common/files/tmux.conf
@@ -0,0 +1,30 @@
+# unbind-key C-b
+# unbind-key M-Left
+# unbind-key M-Right
+# unbind-key x
+# unbind-key |
+# unbind-key -
+
+# bind-key -n M-Left previous-window
+# bind-key -n M-Right next-window
+# bind-key x kill-pane
+# bind-key | split-window -h
+# bind-key - split-window -v
+
+set -g prefix C-o
+# set -g display-time 2500
+# set -g status-interval 1
+# set -g mouse-select-pane on
+set -g status-bg blue
+set -g status-fg white
+set -g status-left ""
+set -g status-right "%D %r"
+# set -g default-terminal screen-256color
+# set -g default-command "bash -i"
+
+# setw -g clock-mode-style 12
+# setw -g automatic-rename off
+# setw -g window-status-format "#I:#W"
+# setw -g window-status-current-format "#I:#W"
+# setw -g window-status-current-fg blue
+# setw -g window-status-current-bg white
View
20 puppet/modules/common/manifests/init.pp
@@ -0,0 +1,20 @@
+# Small, useful packages that don't belong anywhere else.
+
+class common {
+ $packages = ['tmux', 'mg', 'htop', 'git-core']
+
+ Package {
+ ensure => installed
+ }
+
+ package {$packages: }
+
+ file {"tmux.conf":
+ ensure => file,
+ path => "/etc/tmux.conf",
+ source => "puppet:///modules/common/tmux.conf",
+ group => "root",
+ owner => "root",
+ mode => 0644,
+ }
+}
View
1  puppet/modules/memcached/files/etc/default/memcached
@@ -0,0 +1 @@
+ENABLE_MEMCACHED=yes
View
47 puppet/modules/memcached/files/etc/memcached.conf
@@ -0,0 +1,47 @@
+# memcached default config file
+# 2003 - Jay Bonci <jaybonci@debian.org>
+# This configuration file is read by the start-memcached script provided as
+# part of the Debian GNU/Linux distribution.
+
+# Run memcached as a daemon. This command is implied, and is not needed for the
+# daemon to run. See the README.Debian that comes with this package for more
+# information.
+-d
+
+# Log memcached's output to /var/log/memcached
+logfile /var/log/memcached.log
+
+# Be verbose
+# -v
+
+# Be even more verbose (print client commands as well)
+-vv
+
+# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
+# Note that the daemon will grow to this size, but does not start out holding this much
+# memory
+-m 64
+
+# Default connection port is 11211
+-p 11211
+
+# Run the daemon as root. The start-memcached will default to running as root if no
+# -u command is present in this config file
+-u nobody
+
+# Specify which IP address to listen on. The default is to listen on all IP addresses
+# This parameter is one of the only security measures that memcached has, so make sure
+# it's listening on a firewalled interface.
+-l 127.0.0.1
+
+# Limit the number of simultaneous incoming connections. The daemon default is 1024
+# -c 1024
+
+# Lock down all paged memory. Consult with the README and homepage before you do this
+# -k
+
+# Return error when memory is exhausted (rather than removing items)
+# -M
+
+# Maximize core file limit
+# -r
View
26 puppet/modules/memcached/manifests/init.pp
@@ -0,0 +1,26 @@
+class memcached {
+ File {
+ owner => "root",
+ group => "root",
+ }
+
+ package {"memcached":
+ ensure => installed,
+ }
+
+ file {"/etc/memcached.conf":
+ ensure => file,
+ source => "puppet:///modules/memcached/etc/memcached.conf",
+ }
+
+ file {"/etc/default/memcached":
+ ensure => file,
+ source => "puppet:///modules/memcached/etc/default/memcached",
+ }
+
+ service {"memcached":
+ ensure => running,
+ require => [Package["memcached"], File["/etc/default/memcached"]],
+ enable => true,
+ }
+}
View
3  puppet/modules/python/manifests/init.pp
@@ -0,0 +1,3 @@
+class python {
+ package {['python-virtualenv', 'python-dev']: ensure => present }
+}
View
8 puppet/modules/python/manifests/virtualenv.pp
@@ -0,0 +1,8 @@
+define python::virtualenv ($path = $title, $user) {
+ exec {"python-virtualenv-$title":
+ command => "/usr/bin/virtualenv --distribute $path",
+ require => Package['python-virtualenv'],
+ creates => $path,
+ user => $user,
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.