Skip to content

Instantly share code, notes, and snippets.

View pingali's full-sized avatar

Venkata Pingali pingali

View GitHub Profile
# Following Paul Dowman's instructions on setting up the
# mailserver
# http://pauldowman.com/2008/02/17/smtp-mail-from-ec2-web-server-setup/
myhostname = <hostname-name>
mydomain = <domain-name>
myorigin = $mydomain
smtpd_banner = $myhostname ESMTP $mail_name
#########
# Cloud configuration
.
./test
./test/clouds.rb
./test/plugins
pool :test do
cloud :app do
instances 2..5
(2:58:43 PM) mikewadhera_: this master instance -- is this an HAProxy LB into other instances?
(2:58:51 PM) auser: has_package :name => "memcached" == has_package "memcached"
(2:59:15 PM) mikewadhera_: ok good to know
(2:59:31 PM) auser: not any more... that's where the DNS round-robin comes into play
(2:59:54 PM) auser: we're on that this week too
(2:59:56 PM) auser: although
(3:00:00 PM) auser: you can add haproxy in
(3:00:02 PM) auser: and
(3:00:55 PM) auser: if you have has_variable :name => "node_ips", :value => %x[cloud-list].split("\n").map {|a| a[1] }, then you can access that in a chef template with
(3:01:01 PM) auser: @node[:poolparty][:node_ips]
http://ec2dream.blogspot.com/search/label/Networking%20Multi-Tier%20Applications
#!/usr/bin/ruby
require 'rubygems'
require 'right_aws'
AMAZON_PUBLIC_KEY=<public key>
AMAZON_PRIVATE_KEY=<private key>
#
http://www.cloudiquity.com/2009/02/securing-distributed-applications-on-ec2/
* The default mode is to deny access, you have to explicitly open ports to allow for inbound network traffic
* If no security group is specified a special default group is assigned to the instance. This group allows all network traffic from other members of this group and discards traffic from other IP addresses and groups. You can change settings for this group
* You can assign multiple security groups to an AMI instance.
* The security groups for an instance are set at launch time and can not be changed. You can dynamically modify the rules in a security group and the new rules are automatically enforced for all running and future instance, there may be a small delay depending on the number of instances
* You can control access either from named security groups or source IP address range. You can specify the protocol(TCP, UDP, or ICMP) , individual ports or port range to open
@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:
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
{
"mysql-zrm": {
"backupsets": [
{
"name": "full",
"destination": "/mnt/backup/myfull",
"backup_level": 0
},
{
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"
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?