svengali 0.2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README +0 -0
- data/README.rdoc +17 -0
- data/Rakefile +47 -0
- data/VERSION +1 -0
- data/api_document020_en.pdf +0 -0
- data/api_document020_ja.pdf +0 -0
- data/api_document_en.pptx +0 -0
- data/api_document_ja.pptx +0 -0
- data/lib/svengali.rb +2 -0
- data/lib/svengali/config.rb +78 -0
- data/lib/svengali/ext_string.rb +55 -0
- data/lib/svengali/ext_string/command.yml +6 -0
- data/lib/svengali/ext_string/path.yml +6 -0
- data/lib/svengali/file_io.rb +106 -0
- data/lib/svengali/machine.rb +123 -0
- data/lib/svengali/platforms/debian.rb +5 -0
- data/lib/svengali/platforms/default.rb +4 -0
- data/lib/svengali/plugins/eucalyptus.rb +339 -0
- data/lib/svengali/plugins/machine_config.rb +126 -0
- data/lib/svengali/plugins/package.rb +7 -0
- data/lib/svengali/ssh.rb +106 -0
- data/lib/svengali/svengali.rb +19 -0
- data/lib/svengali/util.rb +117 -0
- data/rdoc/classes/CLibIPAddr.html +230 -0
- data/rdoc/classes/Cloud.html +506 -0
- data/rdoc/classes/Config.html +151 -0
- data/rdoc/classes/Config/ConfigFile.html +319 -0
- data/rdoc/classes/ExtStr.html +209 -0
- data/rdoc/classes/ExtStrAccessor.html +183 -0
- data/rdoc/classes/FileIO.html +415 -0
- data/rdoc/classes/Machine.html +771 -0
- data/rdoc/classes/MachineMaster.html +117 -0
- data/rdoc/classes/Platform.html +121 -0
- data/rdoc/classes/SSH.html +315 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README.html +101 -0
- data/rdoc/files/README_rdoc.html +133 -0
- data/rdoc/files/lib/svengali/config_rb.html +114 -0
- data/rdoc/files/lib/svengali/ext_string_rb.html +108 -0
- data/rdoc/files/lib/svengali/file_io_rb.html +115 -0
- data/rdoc/files/lib/svengali/machine_rb.html +108 -0
- data/rdoc/files/lib/svengali/platforms/debian_rb.html +107 -0
- data/rdoc/files/lib/svengali/platforms/default_rb.html +107 -0
- data/rdoc/files/lib/svengali/plugins/eucalyptus_rb.html +389 -0
- data/rdoc/files/lib/svengali/plugins/machine_config_rb.html +101 -0
- data/rdoc/files/lib/svengali/plugins/package_rb.html +101 -0
- data/rdoc/files/lib/svengali/ssh_rb.html +110 -0
- data/rdoc/files/lib/svengali/svengali_rb.html +125 -0
- data/rdoc/files/lib/svengali/util_rb.html +439 -0
- data/rdoc/files/lib/svengali_rb.html +108 -0
- data/rdoc/fr_class_index.html +37 -0
- data/rdoc/fr_file_index.html +41 -0
- data/rdoc/fr_method_index.html +100 -0
- data/rdoc/index.html +26 -0
- data/rdoc/rdoc-style.css +208 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/svengali_spec.rb +7 -0
- data/svengali.gemspec +113 -0
- data/svengali_sample.rb +43 -0
- data/test/scenario.sh +3 -0
- metadata +179 -0
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
data/svengali.gemspec
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{svengali}
|
8
|
+
s.version = "0.2.7.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Ryo Kanbayashi"]
|
12
|
+
s.date = %q{2010-09-11}
|
13
|
+
s.description = %q{Svengali offers means to manage and operate distributed machines easier than by other tools like shell script}
|
14
|
+
s.email = %q{ryo.contact [at] gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"LICENSE",
|
22
|
+
"README",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"api_document020_en.pdf",
|
27
|
+
"api_document020_ja.pdf",
|
28
|
+
"api_document_en.pptx",
|
29
|
+
"api_document_ja.pptx",
|
30
|
+
"lib/svengali.rb",
|
31
|
+
"lib/svengali/config.rb",
|
32
|
+
"lib/svengali/ext_string.rb",
|
33
|
+
"lib/svengali/ext_string/command.yml",
|
34
|
+
"lib/svengali/ext_string/path.yml",
|
35
|
+
"lib/svengali/file_io.rb",
|
36
|
+
"lib/svengali/machine.rb",
|
37
|
+
"lib/svengali/platforms/debian.rb",
|
38
|
+
"lib/svengali/platforms/default.rb",
|
39
|
+
"lib/svengali/plugins/eucalyptus.rb",
|
40
|
+
"lib/svengali/plugins/machine_config.rb",
|
41
|
+
"lib/svengali/plugins/package.rb",
|
42
|
+
"lib/svengali/ssh.rb",
|
43
|
+
"lib/svengali/svengali.rb",
|
44
|
+
"lib/svengali/util.rb",
|
45
|
+
"rdoc/classes/CLibIPAddr.html",
|
46
|
+
"rdoc/classes/Cloud.html",
|
47
|
+
"rdoc/classes/Config.html",
|
48
|
+
"rdoc/classes/Config/ConfigFile.html",
|
49
|
+
"rdoc/classes/ExtStr.html",
|
50
|
+
"rdoc/classes/ExtStrAccessor.html",
|
51
|
+
"rdoc/classes/FileIO.html",
|
52
|
+
"rdoc/classes/Machine.html",
|
53
|
+
"rdoc/classes/MachineMaster.html",
|
54
|
+
"rdoc/classes/Platform.html",
|
55
|
+
"rdoc/classes/SSH.html",
|
56
|
+
"rdoc/created.rid",
|
57
|
+
"rdoc/files/README.html",
|
58
|
+
"rdoc/files/README_rdoc.html",
|
59
|
+
"rdoc/files/lib/svengali/config_rb.html",
|
60
|
+
"rdoc/files/lib/svengali/ext_string_rb.html",
|
61
|
+
"rdoc/files/lib/svengali/file_io_rb.html",
|
62
|
+
"rdoc/files/lib/svengali/machine_rb.html",
|
63
|
+
"rdoc/files/lib/svengali/platforms/debian_rb.html",
|
64
|
+
"rdoc/files/lib/svengali/platforms/default_rb.html",
|
65
|
+
"rdoc/files/lib/svengali/plugins/eucalyptus_rb.html",
|
66
|
+
"rdoc/files/lib/svengali/plugins/machine_config_rb.html",
|
67
|
+
"rdoc/files/lib/svengali/plugins/package_rb.html",
|
68
|
+
"rdoc/files/lib/svengali/ssh_rb.html",
|
69
|
+
"rdoc/files/lib/svengali/svengali_rb.html",
|
70
|
+
"rdoc/files/lib/svengali/util_rb.html",
|
71
|
+
"rdoc/files/lib/svengali_rb.html",
|
72
|
+
"rdoc/fr_class_index.html",
|
73
|
+
"rdoc/fr_file_index.html",
|
74
|
+
"rdoc/fr_method_index.html",
|
75
|
+
"rdoc/index.html",
|
76
|
+
"rdoc/rdoc-style.css",
|
77
|
+
"spec/spec.opts",
|
78
|
+
"spec/spec_helper.rb",
|
79
|
+
"spec/svengali_spec.rb",
|
80
|
+
"svengali.gemspec",
|
81
|
+
"svengali_sample.rb",
|
82
|
+
"test/scenario.sh"
|
83
|
+
]
|
84
|
+
s.homepage = %q{http://sourceforge.jp/projects/svengali/}
|
85
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
86
|
+
s.require_paths = ["lib"]
|
87
|
+
s.rubygems_version = %q{1.3.7}
|
88
|
+
s.summary = %q{distributed machine operating library of cloud age. please see http://sourceforge.jp/projects/svengali/wiki/FrontPage}
|
89
|
+
s.test_files = [
|
90
|
+
"spec/svengali_spec.rb",
|
91
|
+
"spec/spec_helper.rb"
|
92
|
+
]
|
93
|
+
|
94
|
+
if s.respond_to? :specification_version then
|
95
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
96
|
+
s.specification_version = 3
|
97
|
+
|
98
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
99
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
100
|
+
s.add_runtime_dependency(%q<net-ssh>, [">= 2.0.17"])
|
101
|
+
s.add_runtime_dependency(%q<net-sftp>, [">= 2.0.4"])
|
102
|
+
else
|
103
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
104
|
+
s.add_dependency(%q<net-ssh>, [">= 2.0.17"])
|
105
|
+
s.add_dependency(%q<net-sftp>, [">= 2.0.4"])
|
106
|
+
end
|
107
|
+
else
|
108
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
109
|
+
s.add_dependency(%q<net-ssh>, [">= 2.0.17"])
|
110
|
+
s.add_dependency(%q<net-sftp>, [">= 2.0.4"])
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
data/svengali_sample.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
#! /bin/ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
require "rubygems"
|
4
|
+
require "svengali"
|
5
|
+
|
6
|
+
user_name = "xxxxxxxx"
|
7
|
+
password = "xxxxxxxx"
|
8
|
+
|
9
|
+
# Use IP addres due to access by sequence number
|
10
|
+
IPADDR_BASE = CLibIPAddr.new("xxx.xxx.xxx.xxx")
|
11
|
+
|
12
|
+
MACHINE_NUM = 1
|
13
|
+
nodes = Array.new(MACHINE_NUM)
|
14
|
+
|
15
|
+
tmp_ipaddr = IPADDR_BASE.dup()
|
16
|
+
MACHINE_NUM.times{ |n|
|
17
|
+
# FQDN machine name can be also passed
|
18
|
+
nodes[n] = Machine.new(tmp_ipaddr)
|
19
|
+
nodes[n].set_auth_info(user_name,password)
|
20
|
+
# establishes a transport for command execution via sshd_conf
|
21
|
+
nodes[n].establish_session()
|
22
|
+
puts nodes[n].exec!("uname -v")
|
23
|
+
# install package
|
24
|
+
# package system used is default one ( yum )
|
25
|
+
puts nodes[n].install_package("xxxx")
|
26
|
+
tmp_ipaddr.inc!()
|
27
|
+
}
|
28
|
+
|
29
|
+
nodes.each{ |a_node|
|
30
|
+
# edit configuration file
|
31
|
+
sshd_conf = a_node.get_config_file("xxxxxxx.conf")
|
32
|
+
sshd_conf.replace_col("xxxxxx","xxxxxx")
|
33
|
+
sshd_conf.save()
|
34
|
+
}
|
35
|
+
|
36
|
+
# start experiment
|
37
|
+
nodes.each{ |a_node|
|
38
|
+
# bonus
|
39
|
+
puts a_node.exec!("uname -a")
|
40
|
+
|
41
|
+
# executes experiment script_on
|
42
|
+
puts a_node.exec_script_on("/home/xxx/xxxx.sh,"","/home/xxx")
|
43
|
+
}
|
data/test/scenario.sh
ADDED
metadata
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: svengali
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 71
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 7
|
10
|
+
- 2
|
11
|
+
version: 0.2.7.2
|
12
|
+
platform: ruby
|
13
|
+
authors:
|
14
|
+
- Ryo Kanbayashi
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2010-09-11 00:00:00 +09:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: rspec
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 13
|
31
|
+
segments:
|
32
|
+
- 1
|
33
|
+
- 2
|
34
|
+
- 9
|
35
|
+
version: 1.2.9
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: net-ssh
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 45
|
47
|
+
segments:
|
48
|
+
- 2
|
49
|
+
- 0
|
50
|
+
- 17
|
51
|
+
version: 2.0.17
|
52
|
+
type: :runtime
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: net-sftp
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 7
|
63
|
+
segments:
|
64
|
+
- 2
|
65
|
+
- 0
|
66
|
+
- 4
|
67
|
+
version: 2.0.4
|
68
|
+
type: :runtime
|
69
|
+
version_requirements: *id003
|
70
|
+
description: Svengali offers means to manage and operate distributed machines easier than by other tools like shell script
|
71
|
+
email: ryo.contact [at] gmail.com
|
72
|
+
executables: []
|
73
|
+
|
74
|
+
extensions: []
|
75
|
+
|
76
|
+
extra_rdoc_files:
|
77
|
+
- LICENSE
|
78
|
+
- README
|
79
|
+
- README.rdoc
|
80
|
+
files:
|
81
|
+
- LICENSE
|
82
|
+
- README
|
83
|
+
- README.rdoc
|
84
|
+
- Rakefile
|
85
|
+
- VERSION
|
86
|
+
- api_document020_en.pdf
|
87
|
+
- api_document020_ja.pdf
|
88
|
+
- api_document_en.pptx
|
89
|
+
- api_document_ja.pptx
|
90
|
+
- lib/svengali.rb
|
91
|
+
- lib/svengali/config.rb
|
92
|
+
- lib/svengali/ext_string.rb
|
93
|
+
- lib/svengali/ext_string/command.yml
|
94
|
+
- lib/svengali/ext_string/path.yml
|
95
|
+
- lib/svengali/file_io.rb
|
96
|
+
- lib/svengali/machine.rb
|
97
|
+
- lib/svengali/platforms/debian.rb
|
98
|
+
- lib/svengali/platforms/default.rb
|
99
|
+
- lib/svengali/plugins/eucalyptus.rb
|
100
|
+
- lib/svengali/plugins/machine_config.rb
|
101
|
+
- lib/svengali/plugins/package.rb
|
102
|
+
- lib/svengali/ssh.rb
|
103
|
+
- lib/svengali/svengali.rb
|
104
|
+
- lib/svengali/util.rb
|
105
|
+
- rdoc/classes/CLibIPAddr.html
|
106
|
+
- rdoc/classes/Cloud.html
|
107
|
+
- rdoc/classes/Config.html
|
108
|
+
- rdoc/classes/Config/ConfigFile.html
|
109
|
+
- rdoc/classes/ExtStr.html
|
110
|
+
- rdoc/classes/ExtStrAccessor.html
|
111
|
+
- rdoc/classes/FileIO.html
|
112
|
+
- rdoc/classes/Machine.html
|
113
|
+
- rdoc/classes/MachineMaster.html
|
114
|
+
- rdoc/classes/Platform.html
|
115
|
+
- rdoc/classes/SSH.html
|
116
|
+
- rdoc/created.rid
|
117
|
+
- rdoc/files/README.html
|
118
|
+
- rdoc/files/README_rdoc.html
|
119
|
+
- rdoc/files/lib/svengali/config_rb.html
|
120
|
+
- rdoc/files/lib/svengali/ext_string_rb.html
|
121
|
+
- rdoc/files/lib/svengali/file_io_rb.html
|
122
|
+
- rdoc/files/lib/svengali/machine_rb.html
|
123
|
+
- rdoc/files/lib/svengali/platforms/debian_rb.html
|
124
|
+
- rdoc/files/lib/svengali/platforms/default_rb.html
|
125
|
+
- rdoc/files/lib/svengali/plugins/eucalyptus_rb.html
|
126
|
+
- rdoc/files/lib/svengali/plugins/machine_config_rb.html
|
127
|
+
- rdoc/files/lib/svengali/plugins/package_rb.html
|
128
|
+
- rdoc/files/lib/svengali/ssh_rb.html
|
129
|
+
- rdoc/files/lib/svengali/svengali_rb.html
|
130
|
+
- rdoc/files/lib/svengali/util_rb.html
|
131
|
+
- rdoc/files/lib/svengali_rb.html
|
132
|
+
- rdoc/fr_class_index.html
|
133
|
+
- rdoc/fr_file_index.html
|
134
|
+
- rdoc/fr_method_index.html
|
135
|
+
- rdoc/index.html
|
136
|
+
- rdoc/rdoc-style.css
|
137
|
+
- spec/spec.opts
|
138
|
+
- spec/spec_helper.rb
|
139
|
+
- spec/svengali_spec.rb
|
140
|
+
- svengali.gemspec
|
141
|
+
- svengali_sample.rb
|
142
|
+
- test/scenario.sh
|
143
|
+
has_rdoc: true
|
144
|
+
homepage: http://sourceforge.jp/projects/svengali/
|
145
|
+
licenses: []
|
146
|
+
|
147
|
+
post_install_message:
|
148
|
+
rdoc_options:
|
149
|
+
- --charset=UTF-8
|
150
|
+
require_paths:
|
151
|
+
- lib
|
152
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
hash: 3
|
158
|
+
segments:
|
159
|
+
- 0
|
160
|
+
version: "0"
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
hash: 3
|
167
|
+
segments:
|
168
|
+
- 0
|
169
|
+
version: "0"
|
170
|
+
requirements: []
|
171
|
+
|
172
|
+
rubyforge_project:
|
173
|
+
rubygems_version: 1.3.7
|
174
|
+
signing_key:
|
175
|
+
specification_version: 3
|
176
|
+
summary: distributed machine operating library of cloud age. please see http://sourceforge.jp/projects/svengali/wiki/FrontPage
|
177
|
+
test_files:
|
178
|
+
- spec/svengali_spec.rb
|
179
|
+
- spec/spec_helper.rb
|