cluster 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/instance_setup.sh CHANGED
@@ -137,13 +137,13 @@ export AWS_ELB_HOME=/usr/local/lib/elb
137
137
  export PATH=\${PATH}:\${AWS_ELB_HOME}/bin
138
138
  EOF
139
139
 
140
- # sed -i 's#^ruby #ruby3.8 #' /usr/bin/ec2-bundle-vol
141
- # sed -i 's#^ruby #ruby1.8 #' /usr/bin/ec2-bundle-image
142
- # sed -i 's#^ruby #ruby1.8 #' /usr/bin/ec2-unbundle
143
-
144
140
  # CouchDB was starting in 2, 3, 4, 5 and killed in 0, 6, 1
145
141
  for s in apache2 memcached couchdb nginx; do sudo update-rc.d -f $s remove; done
146
142
 
143
+ ### MYSQL
144
+ sed -i '/^datadir.*=/ s@=.*@= /mnt/databases/mysql@' /etc/mysql/my.cnf
145
+ sed -i 's/^bind-address/#bind-address' /etc/mysql/my.cnf
146
+ # !! NEED to deal with apparmor and my.cnf being different
147
147
  mv /etc/init/mysql.conf /root/mysql.conf.orig
148
148
 
149
149
  ## COUCHDB
data/lib/cluster/cli.rb CHANGED
@@ -127,6 +127,16 @@ class Cluster
127
127
  end
128
128
  end
129
129
 
130
+ def remove(name)
131
+ ins = @sub.instances.detect {|i| i.identified_by? name }
132
+ if ins
133
+ ins.remove
134
+ puts "Instance removed #{ins.id}"
135
+ else
136
+ puts "No instance removed for #{name}"
137
+ end
138
+ end
139
+
130
140
  def add_self(name, services)
131
141
  @sub.update_instances
132
142
  ins = @sub.current_instance
@@ -32,6 +32,10 @@ class AmazonInstance < Instance
32
32
  end
33
33
  end
34
34
 
35
+ def remove
36
+ amazon.sdb.delete_attributes amazon.domain, aws_id
37
+ end
38
+
35
39
  def dns
36
40
  if Infrastructure.in_cluster?
37
41
  private_dns_name
@@ -73,13 +73,19 @@ class Instance
73
73
  case format
74
74
  when :long
75
75
  svs = if services.empty?
76
- 'N/S'
76
+ '(N/S)'
77
77
  else
78
78
  services.map {|s|
79
79
  disabled_services.include?(s) ? "!#{s}" : s
80
80
  }.join(',')
81
81
  end
82
- "#{friendly_name}\t#{svs}\t#{state}\t#{id}\t#{dns}"
82
+ conn = dns
83
+ conn = ip if !conn or conn.empty?
84
+ conn = "(#{private_ip_address})" if !conn or conn.empty?
85
+
86
+ nm = friendly_name
87
+ nm = '(N/N)' if !nm or nm.empty?
88
+ "#{nm}\t#{svs}\t#{state}\t#{id}\t#{conn}"
83
89
  else
84
90
  label or id
85
91
  end
@@ -1,11 +1,11 @@
1
1
  class Cluster
2
2
  AUTHOR = 'Simon de Boer'
3
- EMAIL = 'sdeboer@InGamerSports.com'
3
+ EMAIL = 'sdeboer@InGamer.com'
4
4
  NAME = 'cluster'
5
5
 
6
6
  class << self
7
7
  def version
8
- '0.7.2'
8
+ '0.7.4'
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-12 00:00:00.000000000 Z
12
+ date: 2013-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uuidtools
@@ -46,7 +46,7 @@ dependencies:
46
46
  description: You need to scale, you need control, you need feedback, you need monitoring. You
47
47
  get clustered!
48
48
  email:
49
- - sdeboer@InGamerSports.com
49
+ - sdeboer@InGamer.com
50
50
  executables:
51
51
  - cluster
52
52
  extensions: []