Skip to content

Instantly share code, notes, and snippets.

View pingali's full-sized avatar

Venkata Pingali pingali

View GitHub Profile
.....
# create a transaction which records the details of the notification
object.txns.create(:transaction_id => ipn.transaction_id,
:amount => ipn.gross,
:fee => ipn.fee,
:currency_type => ipn.currency,
:status => ipn.status,
:received_at => ipn.received_at)
# if ipn.acknowledge
ack = nil
{
"mysql": {
"databases": [ "hello", "dillo" ],
"harden": true,
"db_users": [
{
"db_user" : "hello",
"db_user_type" : "default",
"db_name" : "hello",
"db_password" : "trialsss",
@pingali
pingali / chef.rb
Created May 6, 2009 21:51
chef.rb
node[:mysql][:new_data_path] = "/var/local/mysql-data"
node[:mysql][:new_log_path] = "/var/local/log/mysql"
node[:mysql][:harden] = true
node[:mysql][:databases] = ["mytest", "myhello"]
node[:mysql][:db_users] = [
{
:db_user => "zrm",
:db_user_type => "backup",
:db_name => "mytest",
:db_password => "hello"
pool :application do
instances 1
keypair "~/.ec2/keypairs/app"
ami 'ami-7cfd1a15'
cloud :pp1 do
roles_config = {
:default => {
:role => 'db'
$ cloud-configure -h
/usr/lib/ruby/gems/1.8/gems/poolparty-1.2.2/bin/../lib/poolparty/poolparty/default.rb:50:in `method_missing': stack level too deep (SystemStackError)
from /usr/lib/ruby/gems/1.8/gems/poolparty-1.2.2/bin/../lib/poolparty/poolparty/default.rb:50:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/poolparty-1.2.2/bin/../lib/poolparty/provision/boot_strapper.rb:38
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/poolparty-1.2.2/bin/../lib/poolparty.rb:51:in `requ
diff --git a/lib/poolparty/provision/configurations/chef.rb b/lib/poolparty/provision/configurations/chef.rb
index c1f07e9..407aeda 100644
--- a/lib/poolparty/provision/configurations/chef.rb
+++ b/lib/poolparty/provision/configurations/chef.rb
@@ -3,12 +3,14 @@ module PoolParty
class Chef
def self.commands
+ debug_flag = ""
+ debug_flag = "-l debug" if debugging?
diff --git a/lib/poolparty/plugins/chef.rb b/lib/poolparty/plugins/chef.rb
index c044320..d0b0b5e 100644
--- a/lib/poolparty/plugins/chef.rb
+++ b/lib/poolparty/plugins/chef.rb
@@ -26,7 +26,7 @@ module PoolParty
def recipe file=nil, o={}, &block
if file
file = ::File.expand_path(file)
- ::FileUtils.mkdir_p "#{basedir}/recipes" unless ::File.directory? basedir
+ ::FileUtils.mkdir_p "#{basedir}/recipes" unless ::File.directory? "#{basedir}/recipes"
{
"mysql-zrm": {
"backupsets": [
{
"name": "full",
"destination": "/mnt/backup/myfull",
"backup_level": 0
},
{
include_recipe "apache2"
include_recipe "passenger"
include_recipe "sqlite"
node[:rails][:version] = "2.3.2"
include_recipe "rails"
gem_package "sqlite3-ruby"
gem_package "rake" do
version "0.8.4"
end
@pingali
pingali / Poolparty To Be Documented
Created April 19, 2009 21:23
Poolparty documentation
High level
* Overall architecture of the system
Newbie steps:
* Installation steps
* Dependencies on other gems/EC2
* Example recipes and usage patterns
Advanced: