solid 0.1.4.rc1 → 0.1.6.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -0
- data/README.md +80 -0
- data/VERSION +1 -1
- data/bin/solid +1 -7
- data/lib/solid/chef.rb +41 -35
- data/lib/solid/commands.rb +35 -38
- data/lib/solid/constants.rb +30 -0
- data/lib/solid/ssh.rb +9 -0
- data/lib/solid.rb +2 -1
- data/solid.gemspec +15 -10
- data/spec/fixtures/dna.json +7 -0
- data/spec/lib/solid/chef_spec.rb +51 -0
- data/spec/lib/solid/commands_spec.rb +10 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +2 -0
- metadata +17 -12
- data/README.rdoc +0 -67
- data/lib/solid/base.rb +0 -25
- data/lib/solid/chef_solo.rb +0 -13
- data/test/helper.rb +0 -10
- data/test/test_solid.rb +0 -7
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# solid
|
2
|
+
|
3
|
+
Version: 0.1.6.beta1
|
4
|
+
|
5
|
+
Solid is a CLI that uses ssh to remote into your servers and run chef-solo.
|
6
|
+
|
7
|
+
Solid uses Chef 9.8 and Chef-Solo to build servers remotely. Its goal is to be very easy to use. Chef-Solo is a command-line application that can execute the chef recipes once installed on the server. Chef-Solo has to be executed on the server node, but we want to execute it remotely. So "Solid" uses the Net::SSH library to connect securely and run chef-solo. It also checks to see if chef-solo is installed, and if it is not, it installs chef. Solid takes one parameter, a path to a configuration json file. This file contains all the attributes you would like to pass to chef-solo, plus some additional attributes that instruct Solid on how to connect to your server nodes, and the location of your cookbooks.
|
8
|
+
|
9
|
+
solid configuration.json
|
10
|
+
|
11
|
+
# configuration.json
|
12
|
+
|
13
|
+
{
|
14
|
+
"servers": ["server1","server2"],
|
15
|
+
"ssh-auth": "key",
|
16
|
+
"run_list": ["role[name]"],
|
17
|
+
"owner": "[USER]",
|
18
|
+
"group": "[GROUP]"
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
## Requirements
|
24
|
+
|
25
|
+
* Ruby
|
26
|
+
* RubyGems
|
27
|
+
* net/ssh
|
28
|
+
|
29
|
+
## Install
|
30
|
+
|
31
|
+
gem install solid
|
32
|
+
|
33
|
+
## Download Source
|
34
|
+
|
35
|
+
http://github.com/jackhq/solid
|
36
|
+
|
37
|
+
|
38
|
+
## What is a dna.json file?
|
39
|
+
|
40
|
+
It is a file that contains instructions for chef on how to setup and configure your servers, and applications. To learn more go to http://opscode.com
|
41
|
+
|
42
|
+
{
|
43
|
+
"servers": ["server1","server2"],
|
44
|
+
"ssh-auth": "key",
|
45
|
+
"run_list": ["role[name]"],
|
46
|
+
"owner": "[USER]",
|
47
|
+
"group": "[GROUP]"
|
48
|
+
}
|
49
|
+
|
50
|
+
## How to use
|
51
|
+
|
52
|
+
* Create your dna.json file
|
53
|
+
|
54
|
+
* Make sure it has the following root attributes:
|
55
|
+
|
56
|
+
* servers - array of servers
|
57
|
+
* ssh-auth - (key|pwd) - type ssh authentication
|
58
|
+
* key - if ssh authentication is key based
|
59
|
+
* password - if ssh authentication is pwd based
|
60
|
+
* port
|
61
|
+
|
62
|
+
* Execute
|
63
|
+
|
64
|
+
solid dna.json
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
## Note on Patches/Pull Requests
|
69
|
+
|
70
|
+
* Fork the project.
|
71
|
+
* Make your feature addition or bug fix.
|
72
|
+
* Add tests for it. This is important so I don't break it in a
|
73
|
+
future version unintentionally.
|
74
|
+
* Commit, do not mess with rakefile, version, or history.
|
75
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
76
|
+
* Send me a pull request. Bonus points for topic branches.
|
77
|
+
|
78
|
+
== Copyright
|
79
|
+
|
80
|
+
Copyright (c) 2010 Thing-3. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6.beta1
|
data/bin/solid
CHANGED
data/lib/solid/chef.rb
CHANGED
@@ -1,81 +1,87 @@
|
|
1
1
|
module Solid
|
2
2
|
|
3
|
-
class Chef
|
4
|
-
|
5
|
-
|
6
|
-
RUBYGEMS_FILE = "#{RUBYGEMS_DIR}.tgz"
|
7
|
-
RUBYGEMS_URL = "http://rubyforge.org/frs/download.php/70696/#{RUBYGEMS_FILE}"
|
3
|
+
class Chef
|
4
|
+
include Solid::Constants
|
5
|
+
include Solid::SSH
|
8
6
|
|
9
|
-
def initialize(server,
|
7
|
+
def initialize(server, dna, logger=Logger.new(STDOUT), &block)
|
10
8
|
@server = server
|
11
|
-
@
|
12
|
-
@
|
9
|
+
@dna = dna
|
10
|
+
@logger = logger
|
11
|
+
@user = @dna["user"]
|
12
|
+
@cookbooks = @dna["cookbooks"]
|
13
|
+
self.instance_eval(&block) if block_given?
|
13
14
|
end
|
14
15
|
|
15
16
|
def install
|
16
17
|
unless installed?
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
build_solo_rb ssh
|
22
|
-
end
|
18
|
+
@logger.info "installing..."
|
19
|
+
install_chef_prereqs
|
20
|
+
install_chef_gems
|
21
|
+
build_solo_rb
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
26
25
|
def installed?
|
27
26
|
result = false
|
28
|
-
|
29
|
-
|
27
|
+
@logger.info "checking if installed"
|
28
|
+
Net::SSH.start(@server, @user, self.options) do |ssh|
|
30
29
|
result = ssh.exec!("which chef-solo")
|
31
30
|
end
|
32
31
|
result =~ /chef-solo/
|
33
32
|
end
|
34
33
|
|
35
|
-
def solo
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
build_json dna, ssh
|
40
|
-
run_solo cookbooks, ssh
|
41
|
-
end
|
34
|
+
def solo
|
35
|
+
@logger.info "deploying..."
|
36
|
+
build_json
|
37
|
+
run_solo
|
42
38
|
end
|
43
39
|
|
44
|
-
|
40
|
+
protected
|
41
|
+
|
42
|
+
def options
|
43
|
+
o = @dna['ssh-auth'] == 'key' ? { :keys => @dna["key"] } : { :password => @dna["password"] }
|
44
|
+
o.merge!(:port => @dna['port']) if @dna['port']
|
45
|
+
o
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
45
50
|
|
46
51
|
def sudo_cmd
|
47
52
|
'sudo '
|
48
53
|
end
|
54
|
+
|
49
55
|
|
50
|
-
def install_chef_prereqs
|
56
|
+
def install_chef_prereqs
|
51
57
|
[ sudo_cmd + "apt-get update -y",
|
52
58
|
sudo_cmd + "apt-get install #{APT_GET.join(' ')} -y",
|
53
59
|
"wget #{RUBYGEMS_URL} && tar zxf #{RUBYGEMS_FILE} && cd #{RUBYGEMS_DIR} && sudo ruby setup.rb && sudo ln -sfv /usr/bin/gem1.8 /usr/bin/gem",
|
54
60
|
sudo_cmd + "gem update --system"].each do |line|
|
55
|
-
|
61
|
+
ssh_exec line
|
56
62
|
end
|
57
63
|
end
|
58
64
|
|
59
|
-
def install_chef_gems
|
65
|
+
def install_chef_gems
|
60
66
|
CHEF_GEMS.each do |gem|
|
61
|
-
|
67
|
+
ssh_exec "#{sudo_cmd} gem install #{gem[:name]} -v #{gem[:version]}"
|
62
68
|
end
|
63
69
|
end
|
64
70
|
|
65
|
-
def build_solo_rb
|
71
|
+
def build_solo_rb
|
66
72
|
['file_cache_path "/tmp/chef-solo"',
|
67
73
|
'cookbook_path ["/tmp/chef-solo/cookbooks", "/tmp/chef-solo/site-cookbooks"]'].each do |line|
|
68
|
-
|
74
|
+
ssh_exec "echo '#{line}' >> solo.rb"
|
69
75
|
end
|
70
76
|
end
|
71
77
|
|
72
|
-
def build_json
|
73
|
-
|
78
|
+
def build_json
|
79
|
+
ssh_exec "echo \"#{@dna.to_json.gsub('"','\"')}\" > dna.json"
|
74
80
|
end
|
75
81
|
|
76
|
-
def run_solo
|
77
|
-
|
82
|
+
def run_solo
|
83
|
+
ssh_exec sudo_cmd + " chef-solo -c ~/solo.rb -l debug -j dna.json -r #{@cookbooks}"
|
78
84
|
end
|
79
|
-
|
85
|
+
|
80
86
|
end
|
81
87
|
end
|
data/lib/solid/commands.rb
CHANGED
@@ -4,52 +4,49 @@ module Solid
|
|
4
4
|
|
5
5
|
class << self
|
6
6
|
|
7
|
-
def
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
def deploy(dna_file)
|
14
|
-
dna = Crack::JSON.parse(get_dna(dna_file))
|
15
|
-
dna["servers"].each do |s|
|
16
|
-
run(s, dna)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def rollback(dna_file)
|
21
|
-
dna = Crack::JSON.parse(get_dna(dna_file))
|
22
|
-
dna.merge!(:action => 'rollback')
|
23
|
-
dna["servers"].each do |s|
|
24
|
-
run(s, dna)
|
7
|
+
def run_chef(file)
|
8
|
+
dna = Crack::JSON.parse(dna(file))
|
9
|
+
dna["servers"].each do |server|
|
10
|
+
run server, dna
|
25
11
|
end
|
26
|
-
|
12
|
+
|
13
|
+
# if validate_dna
|
14
|
+
# dna["servers"].each do |s|
|
15
|
+
# run(s, dna)
|
16
|
+
# end
|
17
|
+
# else
|
18
|
+
# puts <<-PRINT
|
19
|
+
# The following nodes in your json are required:
|
20
|
+
#
|
21
|
+
# * servers
|
22
|
+
# * ssh-auth
|
23
|
+
#
|
24
|
+
# if ssh-auth = key
|
25
|
+
# * key
|
26
|
+
#
|
27
|
+
# if ssh-auth = pwd
|
28
|
+
#
|
29
|
+
# * password
|
30
|
+
#
|
31
|
+
# * cookbooks
|
32
|
+
#
|
33
|
+
# PRINT
|
34
|
+
# end
|
27
35
|
end
|
28
|
-
|
29
|
-
def logs
|
30
|
-
puts "Comming Soon!"
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
|
36
|
+
|
35
37
|
|
36
38
|
private
|
37
39
|
|
38
|
-
def run
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
chef.solo dna, dna["cookbooks"]
|
40
|
+
def run server, with_dna
|
41
|
+
Chef.new(server, with_dna) do
|
42
|
+
install
|
43
|
+
solo
|
44
|
+
end
|
44
45
|
end
|
45
46
|
|
46
47
|
|
47
|
-
def
|
48
|
-
|
49
|
-
File.open(dna_file, 'r') do |f|
|
50
|
-
dna = f.read
|
51
|
-
end
|
52
|
-
dna
|
48
|
+
def dna file
|
49
|
+
File.open(file, 'r') { |f| f.read }
|
53
50
|
end
|
54
51
|
|
55
52
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Solid
|
2
|
+
module Constants
|
3
|
+
APT_GET = %w{ ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential git-core xfsprogs }
|
4
|
+
RUBYGEMS_DIR = 'rubygems-1.3.7'
|
5
|
+
RUBYGEMS_FILE = "#{RUBYGEMS_DIR}.tgz"
|
6
|
+
RUBYGEMS_URL = "http://rubyforge.org/frs/download.php/70696/#{RUBYGEMS_FILE}"
|
7
|
+
|
8
|
+
CHEF_GEMS = [
|
9
|
+
{:name => 'uuidtools', :version => '2.1.1'},
|
10
|
+
{:name => 'highline', :version => '1.6.1'},
|
11
|
+
{:name => 'moneta', :version => '0.6.0'},
|
12
|
+
{:name => 'extlib', :version => '0.9.15'},
|
13
|
+
{:name => 'abstract', :version => '1.0.0'},
|
14
|
+
{:name => 'erubis', :version => '2.6.6'},
|
15
|
+
{:name => 'json', :version => '1.4.2'},
|
16
|
+
{:name => 'bunny', :version => '0.6.0'},
|
17
|
+
{:name => 'mime-types', :version => '1.16'},
|
18
|
+
{:name => 'rest-client', :version => '1.5.1'},
|
19
|
+
{:name => 'systemu', :version => '1.2.0'},
|
20
|
+
{:name => 'mixlib-cli', :version => '1.2.0'},
|
21
|
+
{:name => 'mixlib-config', :version => '1.1.2'},
|
22
|
+
{:name => 'mixlib-log', :version => '1.1.0'},
|
23
|
+
{:name => 'mixlib-authentication', :version => '1.1.4'},
|
24
|
+
{:name => 'ohai', :version => '0.5.6'},
|
25
|
+
{:name => 'chef', :version => '0.9.8'}
|
26
|
+
]
|
27
|
+
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
data/lib/solid/ssh.rb
ADDED
data/lib/solid.rb
CHANGED
data/solid.gemspec
CHANGED
@@ -5,35 +5,39 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{solid}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6.beta1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Thing-3"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-13}
|
13
13
|
s.default_executable = %q{solid}
|
14
14
|
s.description = %q{ssh deployment application}
|
15
15
|
s.email = %q{thing3@jackhq.com}
|
16
16
|
s.executables = ["solid"]
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE",
|
19
|
-
"README.
|
19
|
+
"README.md"
|
20
20
|
]
|
21
21
|
s.files = [
|
22
22
|
".document",
|
23
23
|
".gitignore",
|
24
|
+
"Gemfile",
|
24
25
|
"LICENSE",
|
25
|
-
"README.
|
26
|
+
"README.md",
|
26
27
|
"Rakefile",
|
27
28
|
"VERSION",
|
28
29
|
"bin/solid",
|
29
30
|
"lib/solid.rb",
|
30
|
-
"lib/solid/base.rb",
|
31
31
|
"lib/solid/chef.rb",
|
32
|
-
"lib/solid/chef_solo.rb",
|
33
32
|
"lib/solid/commands.rb",
|
33
|
+
"lib/solid/constants.rb",
|
34
|
+
"lib/solid/ssh.rb",
|
34
35
|
"solid.gemspec",
|
35
|
-
"
|
36
|
-
"
|
36
|
+
"spec/fixtures/dna.json",
|
37
|
+
"spec/lib/solid/chef_spec.rb",
|
38
|
+
"spec/lib/solid/commands_spec.rb",
|
39
|
+
"spec/spec.opts",
|
40
|
+
"spec/spec_helper.rb"
|
37
41
|
]
|
38
42
|
s.homepage = %q{http://github.com/jackhq/solid}
|
39
43
|
s.rdoc_options = ["--charset=UTF-8"]
|
@@ -41,8 +45,9 @@ Gem::Specification.new do |s|
|
|
41
45
|
s.rubygems_version = %q{1.3.6}
|
42
46
|
s.summary = %q{ssh deployment application}
|
43
47
|
s.test_files = [
|
44
|
-
"
|
45
|
-
"
|
48
|
+
"spec/lib/solid/chef_spec.rb",
|
49
|
+
"spec/lib/solid/commands_spec.rb",
|
50
|
+
"spec/spec_helper.rb"
|
46
51
|
]
|
47
52
|
|
48
53
|
if s.respond_to? :specification_version then
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Solid::Chef" do
|
4
|
+
before(:each) do
|
5
|
+
@server = 'ec2-184-73-32-12.compute-1.amazonaws.com'
|
6
|
+
@with_dna = Crack::JSON.parse(<<-JSON
|
7
|
+
{
|
8
|
+
'servers': [ 'ec2-184-73-32-12.compute-1.amazonaws.com'],
|
9
|
+
'ssh-auth': 'key',
|
10
|
+
'user': 'ubuntu',
|
11
|
+
'group': 'ubuntu',
|
12
|
+
'key': "~/.ec2/ec2-dev"
|
13
|
+
}
|
14
|
+
JSON
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should check if chef is installed" do
|
19
|
+
ssh = mock("Net::SSH")
|
20
|
+
ssh.stub!(:exec!).and_return("chef-solo")
|
21
|
+
Net::SSH.stub!(:start).and_return(ssh)
|
22
|
+
|
23
|
+
Solid::Chef.new(@server, @with_dna) do
|
24
|
+
print installed?
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should install chef on node" do
|
29
|
+
ssh = mock("Net::SSH")
|
30
|
+
ssh.stub!(:exec!).and_return("chef-solo")
|
31
|
+
Net::SSH.stub!(:start).and_return(ssh)
|
32
|
+
|
33
|
+
Solid::Chef.new(@server, @with_dna) do
|
34
|
+
print install
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should chef solo on node" do
|
40
|
+
ssh = mock("Net::SSH")
|
41
|
+
ssh.stub!(:exec!).and_return("chef-solo")
|
42
|
+
Net::SSH.stub!(:start).and_return(ssh)
|
43
|
+
|
44
|
+
Solid::Chef.new(@server, @with_dna) do
|
45
|
+
print solo
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe "Solid::Command" do
|
4
|
+
it "should run chef" do
|
5
|
+
Solid::Chef.stub!(:new).and_return(true)
|
6
|
+
file = File.dirname(__FILE__) + '/../../fixtures/dna.json'
|
7
|
+
Solid::Commands.run_chef file
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.1.
|
8
|
+
- 6
|
9
|
+
- beta1
|
10
|
+
version: 0.1.6.beta1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thing-3
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-13 00:00:00 -04:00
|
19
19
|
default_executable: solid
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -62,23 +62,27 @@ extensions: []
|
|
62
62
|
|
63
63
|
extra_rdoc_files:
|
64
64
|
- LICENSE
|
65
|
-
- README.
|
65
|
+
- README.md
|
66
66
|
files:
|
67
67
|
- .document
|
68
68
|
- .gitignore
|
69
|
+
- Gemfile
|
69
70
|
- LICENSE
|
70
|
-
- README.
|
71
|
+
- README.md
|
71
72
|
- Rakefile
|
72
73
|
- VERSION
|
73
74
|
- bin/solid
|
74
75
|
- lib/solid.rb
|
75
|
-
- lib/solid/base.rb
|
76
76
|
- lib/solid/chef.rb
|
77
|
-
- lib/solid/chef_solo.rb
|
78
77
|
- lib/solid/commands.rb
|
78
|
+
- lib/solid/constants.rb
|
79
|
+
- lib/solid/ssh.rb
|
79
80
|
- solid.gemspec
|
80
|
-
-
|
81
|
-
-
|
81
|
+
- spec/fixtures/dna.json
|
82
|
+
- spec/lib/solid/chef_spec.rb
|
83
|
+
- spec/lib/solid/commands_spec.rb
|
84
|
+
- spec/spec.opts
|
85
|
+
- spec/spec_helper.rb
|
82
86
|
has_rdoc: true
|
83
87
|
homepage: http://github.com/jackhq/solid
|
84
88
|
licenses: []
|
@@ -112,5 +116,6 @@ signing_key:
|
|
112
116
|
specification_version: 3
|
113
117
|
summary: ssh deployment application
|
114
118
|
test_files:
|
115
|
-
-
|
116
|
-
-
|
119
|
+
- spec/lib/solid/chef_spec.rb
|
120
|
+
- spec/lib/solid/commands_spec.rb
|
121
|
+
- spec/spec_helper.rb
|
data/README.rdoc
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
= solid
|
2
|
-
|
3
|
-
An awesome way to deploy with chef!
|
4
|
-
|
5
|
-
== Requirements
|
6
|
-
|
7
|
-
* Ruby
|
8
|
-
* RubyGems
|
9
|
-
* net/ssh
|
10
|
-
|
11
|
-
== Install
|
12
|
-
|
13
|
-
gem install solid
|
14
|
-
|
15
|
-
== Download Source
|
16
|
-
|
17
|
-
http://github.com/jackhq/solid
|
18
|
-
|
19
|
-
|
20
|
-
== What is it?
|
21
|
-
|
22
|
-
Solid is a command line interface that takes a dna.json file as an argument. It uses this file to establish a ssh connection for each of the application servers specified in the document either by user/key or user/password connections. Then it simply looks for chef-solo, if not available, it installs chef, if available it runs chef-solo, with the dna.json file.
|
23
|
-
|
24
|
-
== What is a dna.json file?
|
25
|
-
|
26
|
-
It is a file that contains instructions for chef on how to setup and configure your servers, and applications. To learn more go to http://opscode.com
|
27
|
-
|
28
|
-
== How to use
|
29
|
-
|
30
|
-
* Create your dna.json file
|
31
|
-
|
32
|
-
* Make sure it has the following root attributes:
|
33
|
-
|
34
|
-
* servers - array of servers
|
35
|
-
* ssh-auth - (key|pwd) - type ssh authentication
|
36
|
-
* key - if ssh authentication is key based
|
37
|
-
* password - if ssh authentication is pwd based
|
38
|
-
* port
|
39
|
-
|
40
|
-
* Execute
|
41
|
-
|
42
|
-
solid deploy dna.json
|
43
|
-
|
44
|
-
* Rollback
|
45
|
-
|
46
|
-
solid rollback dna.json
|
47
|
-
|
48
|
-
* Logs
|
49
|
-
|
50
|
-
solid logs
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
== Note on Patches/Pull Requests
|
56
|
-
|
57
|
-
* Fork the project.
|
58
|
-
* Make your feature addition or bug fix.
|
59
|
-
* Add tests for it. This is important so I don't break it in a
|
60
|
-
future version unintentionally.
|
61
|
-
* Commit, do not mess with rakefile, version, or history.
|
62
|
-
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
63
|
-
* Send me a pull request. Bonus points for topic branches.
|
64
|
-
|
65
|
-
== Copyright
|
66
|
-
|
67
|
-
Copyright (c) 2010 Thing-3. See LICENSE for details.
|
data/lib/solid/base.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
module Solid
|
2
|
-
|
3
|
-
class Base
|
4
|
-
CHEF_GEMS = [
|
5
|
-
{:name => 'uuidtools', :version => '2.1.1'},
|
6
|
-
{:name => 'highline', :version => '1.6.1'},
|
7
|
-
{:name => 'moneta', :version => '0.6.0'},
|
8
|
-
{:name => 'extlib', :version => '0.9.15'},
|
9
|
-
{:name => 'erubis', :version => '2.6.6'},
|
10
|
-
{:name => 'json', :version => '1.4.2'},
|
11
|
-
{:name => 'bunny', :version => '0.6.0'},
|
12
|
-
{:name => 'rest-client', :version => '1.5.1'},
|
13
|
-
{:name => 'systemu', :version => '1.2.0'},
|
14
|
-
{:name => 'mixlib-authentication', :version => '1.1.4'},
|
15
|
-
{:name => 'mixlib-log', :version => '1.1.0'},
|
16
|
-
{:name => 'mixlib-cli', :version => '1.2.0'},
|
17
|
-
{:name => 'mixlib-config', :version => '1.1.2'},
|
18
|
-
{:name => 'ohai', :version => '0.5.6'},
|
19
|
-
{:name => 'chef', :version => '0.9.8'}
|
20
|
-
]
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
data/lib/solid/chef_solo.rb
DELETED
data/test/helper.rb
DELETED