This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2012-2013 The Scale Factory Limited. All rights reserved. | |
begin | |
require 'json' | |
require 'net/http' | |
rescue LoadError | |
retry if require 'rubygems' | |
raise | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/puppet/scalefactory.com/modules/sf_defaults/manifests/puppet.pp b/puppet/scalefactory.com/modules/sf_defaults/manifests/puppet.pp | |
index 9af67cc..3fd023c 100644 | |
--- a/puppet/scalefactory.com/modules/sf_defaults/manifests/puppet.pp | |
+++ b/puppet/scalefactory.com/modules/sf_defaults/manifests/puppet.pp | |
@@ -3,9 +3,53 @@ | |
class sf_defaults::puppet { | |
include sf_defaults::puppet::monitoring | |
+ include sf_defaults::puppet::packages | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 81s] [182/182] installing gettext-devel-0.17-16.el6 | |
[ 82s] removing nis flags from /var/tmp/build-root/etc/nsswitch.conf... | |
[ 82s] now finalizing build dir... | |
[ 82s] ----------------------------------------------------------------- | |
[ 82s] ----- building nxlog-ce.spec (user abuild) | |
[ 82s] ----------------------------------------------------------------- | |
[ 82s] ----------------------------------------------------------------- | |
[ 83s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature /home/abuild/rpmbuild/SOURCES/nxlog-ce.spec | |
[ 83s] warning: line 13: prereq is deprecated: Prereq(post,preun): /sbin/install-info | |
[ 83s] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ibX15J |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO global: Vagrant version: 1.2.2 | |
INFO manager: Registered plugin: VirtualBox provider | |
INFO manager: Registered plugin: kernel | |
INFO manager: Registered plugin: kernel | |
INFO manager: Registered plugin: Arch guest | |
INFO manager: Registered plugin: RedHat guest | |
INFO manager: Registered plugin: SUSE guest | |
INFO manager: Registered plugin: Gentoo guest | |
INFO manager: Registered plugin: Ubuntu guest | |
INFO manager: Registered plugin: Fedora guest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -135,24 +135,30 @@ define sf_squid::firewall_allow::service ( $source = undef ) { | |
} | |
} | |
define sf_squid::firewall_allow::output ( $destination = undef ) { | |
+ | |
+ $uid = sf_get_uid($sf_squid::params::user) | |
+ | |
sf_firewall::basic { "00080 ${title}": | |
proto => 'tcp', | |
dport => '80', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if File.file?('Vagrantfile') and File.symlink?('../Vagrantfile') | |
puts | |
puts "I found a Vagrantfile here, and a symlink in the parent " + | |
"folder - you probably want to do 'cd ..' and run the " + | |
"command again.\n" | |
puts | |
exit -1 | |
end | |
def sf_vagrant_config( config, version ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scalefactory.com/modules/sf_nodeless/lib/facter/sf_nodeless.rb b/scalefactory.com/modules/sf_nodeless/lib/facter/sf_nodeless.rb | |
index dbbbe3b..45842de 100644 | |
--- a/scalefactory.com/modules/sf_nodeless/lib/facter/sf_nodeless.rb | |
+++ b/scalefactory.com/modules/sf_nodeless/lib/facter/sf_nodeless.rb | |
@@ -40,7 +40,8 @@ if ec2_userdata | |
end | |
################################################################################# | |
-# Cloudstack fact finding | |
+# JSON http response fact finding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated by blueprint(7). Edit at your own risk. | |
# | |
class laptop { | |
Exec { | |
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', | |
} | |
Class['sources'] -> Class['files'] -> Class['packages'] | |
class files { | |
file { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I got tired of uploading to /tmp then moving to the correct location, so these two convenience methods will save you a lot of time in the long run. | |
# Helper method to upload to /tmp then use sudo to move to correct location. | |
def put_sudo(data, to) | |
filename = File.basename(to) | |
to_directory = File.dirname(to) | |
put data, "/tmp/#{filename}" | |
run "#{sudo} mv /tmp/#{filename} #{to_directory}" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :user, 'vagrant' | |
set :run_method, :sudo | |
role :app, '33.33.33.10' | |
ssh_options[:keys] = `vagrant ssh_config | grep IdentityFile`.split.last |