cloudster 2.19.4 → 2.19.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.19.4
1
+ 2.19.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cloudster"
8
- s.version = "2.19.4"
8
+ s.version = "2.19.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Emil Soman"]
12
- s.date = "2013-02-12"
12
+ s.date = "2013-02-14"
13
13
  s.description = "Cloudster is a Ruby gem that was born to cut the learning curve involved \n in writing your own CloudFormation templates. If you don't know what a CloudFormation template is, \n but know about the AWS Cloud offerings, you can still use cloudster to provision your stack. \n Still in infancy , cloudster can create a very basic stack like a breeze. All kinds of contribution welcome !"
14
14
  s.email = "emil.soman@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -12,6 +12,7 @@ module Cloudster
12
12
  # :validation_key => 'asd3e33880889098asdnmnnasd8900890a8sdmasdjna9s880808asdnmnasd90-a',
13
13
  # :server_url => 'http://10.50.60.70:4000',
14
14
  # :node_name => 'project.environment.appserver_1',
15
+ # :validation_client_name => 'chef-validator',
15
16
  # :interval => 1800
16
17
  # )
17
18
  #
@@ -20,13 +21,15 @@ module Cloudster
20
21
  # * :validation_key: String containing the key used for validating this client with the server. This can be taken from the chef-server validation.pem file. Mandatory field
21
22
  # * :server_url: String containing the fully qualified domain name of the chef-server. Mandatory field
22
23
  # * :node_name: String containing the name for the chef node. It has to be unique across all nodes in the particular chef client-server ecosystem. Mandatory field
23
- # * :interval: Integer containing the interval(in seconds) between chef-client runs. Degault value : 1800 seconds
24
+ # * :interval: Integer containing the interval(in seconds) between chef-client runs. Default value : 1800 seconds
25
+ # * :validation_client_name: String containing the name of the validation client. "ORGNAME-validator" if using hosted chef server. Default: 'chef-validator'
24
26
  def initialize(options = {})
25
27
  require_options(options, [:validation_key, :server_url, :node_name])
26
28
  @validation_key = options[:validation_key]
27
29
  @server_url = options[:server_url]
28
30
  @node_name = options[:node_name]
29
31
  @interval = options[:interval] || 1800
32
+ @validation_client_name = options[:validation_client_name] || 'chef-validator'
30
33
  end
31
34
 
32
35
  # Merges the required CloudFormation template for installing the Chef Client to the template of the EC2 instance
@@ -92,6 +95,17 @@ module Cloudster
92
95
  " exit 1\n",
93
96
  "}\n",
94
97
 
98
+ #Install aws sfn scripts to run cfn-init
99
+ "apt-get -y install python-setuptools\n",
100
+ "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
101
+ "cfn-init -v --region ", { "Ref" => "AWS::Region" },
102
+ " -s ", { "Ref" => "AWS::StackId" }, " -r #{@instance_name}",
103
+ " || error_exit 'Failed to run cfn-init'\n",
104
+
105
+ # Fixup path and links for the bootstrap script
106
+ "export PATH=$PATH:/var/lib/gems/1.8/bin\n",
107
+
108
+ #Bootstrap chef client
95
109
  "mkdir /etc/chef\n",
96
110
  "cat << EOF > /etc/chef/solo.rb\n",
97
111
  "file_cache_path \"/tmp/chef-solo\"\n",
@@ -102,6 +116,7 @@ module Cloudster
102
116
  "{\n",
103
117
  "\"chef_client\": {\n",
104
118
  " \"server_url\": \"#{@server_url}\",\n",
119
+ " \"validation_client_name\": \"#{@validation_client_name}\",\n",
105
120
  " \"interval\": \"#{@interval}\"\n",
106
121
  "},\n",
107
122
  "\"run_list\": [\"recipe[chef-client::config]\", \"recipe[chef-client]\"]\n",
@@ -31,7 +31,11 @@ describe Cloudster::ChefClient do
31
31
  "{\n",
32
32
  " exit 1\n",
33
33
  "}\n",
34
-
34
+ "apt-get -y install python-setuptools\n",
35
+ "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
36
+ "cfn-init -v --region ", {"Ref"=>"AWS::Region"}, " -s ", {"Ref"=>"AWS::StackId"},
37
+ " -r AppServer", " || error_exit 'Failed to run cfn-init'\n",
38
+ "export PATH=$PATH:/var/lib/gems/1.8/bin\n",
35
39
  "mkdir /etc/chef\n",
36
40
  "cat << EOF > /etc/chef/solo.rb\n",
37
41
  "file_cache_path \"/tmp/chef-solo\"\n",
@@ -42,6 +46,7 @@ describe Cloudster::ChefClient do
42
46
  "{\n",
43
47
  "\"chef_client\": {\n",
44
48
  " \"server_url\": \"testurl\",\n",
49
+ " \"validation_client_name\": \"chef-validator\",\n",
45
50
  " \"interval\": \"30\"\n",
46
51
  "},\n",
47
52
  "\"run_list\": [\"recipe[chef-client::config]\", \"recipe[chef-client]\"]\n",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudster
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.4
4
+ version: 2.19.5
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-02-12 00:00:00.000000000 Z
12
+ date: 2013-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  segments:
171
171
  - 0
172
- hash: 463981773
172
+ hash: -471412333
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  none: false
175
175
  requirements: