toft-puppet 0.0.9
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/Gemfile +3 -0
- data/Gemfile.lock +62 -0
- data/Rakefile +121 -0
- data/features/checker.feature +14 -0
- data/features/chef.feature +70 -0
- data/features/command.feature +20 -0
- data/features/node.feature +41 -0
- data/features/puppet.feature +40 -0
- data/features/step_definitions/centos/checks.rb +9 -0
- data/features/step_definitions/checker.rb +15 -0
- data/features/step_definitions/chef.rb +43 -0
- data/features/step_definitions/command.rb +28 -0
- data/features/step_definitions/node.rb +65 -0
- data/features/step_definitions/puppet.rb +7 -0
- data/features/support/env.rb +25 -0
- data/fixtures/chef/attributes.json +9 -0
- data/fixtures/chef/cookbooks/test/attributes/default.rb +4 -0
- data/fixtures/chef/cookbooks/test/recipes/attribute.rb +19 -0
- data/fixtures/chef/cookbooks/test/recipes/default.rb +4 -0
- data/fixtures/chef/cookbooks/test/recipes/role.rb +4 -0
- data/fixtures/chef/roles/test.rb +3 -0
- data/fixtures/puppet/conf/fileserver.conf +3 -0
- data/fixtures/puppet/conf/puppet.conf +15 -0
- data/fixtures/puppet/conf/puppet_exec.conf +9 -0
- data/fixtures/puppet/conf/puppet_fileserver.conf +8 -0
- data/fixtures/puppet/conf/puppet_modules.conf +7 -0
- data/fixtures/puppet/conf/puppet_template.conf +8 -0
- data/fixtures/puppet/manifests/fileserver/conf/test_fileserver +1 -0
- data/fixtures/puppet/manifests/nodes/test_node.pp +26 -0
- data/fixtures/puppet/manifests/site.pp +1 -0
- data/fixtures/puppet/manifests/templates/template_test +2 -0
- data/fixtures/puppet/manifests/test.pp +8 -0
- data/fixtures/puppet/manifests/test_fileserver.pp +14 -0
- data/fixtures/puppet/manifests/test_install.pp +5 -0
- data/fixtures/puppet/manifests/test_module.pp +5 -0
- data/fixtures/puppet/manifests/test_service.pp +11 -0
- data/fixtures/puppet/manifests/test_template.pp +12 -0
- data/fixtures/puppet/modules/test_module/manifests/init.pp +8 -0
- data/lib/toft.rb +39 -0
- data/lib/toft/chef/chef_attributes.rb +29 -0
- data/lib/toft/chef/chef_runner.rb +77 -0
- data/lib/toft/command_executor.rb +16 -0
- data/lib/toft/file_checker.rb +47 -0
- data/lib/toft/node.rb +243 -0
- data/lib/toft/node_controller.rb +32 -0
- data/lib/toft/puppet/puppet_runner.rb +38 -0
- data/lib/toft/version.rb +3 -0
- data/scripts/bin/centos/lxc-prepare-host +172 -0
- data/scripts/bin/centos/provision_vagrant +11 -0
- data/scripts/bin/share/install-chef-ubuntu.sh +19 -0
- data/scripts/bin/share/lxc-create-centos-image +60 -0
- data/scripts/bin/ubuntu/lxc-create-ubuntu-image +77 -0
- data/scripts/bin/ubuntu/lxc-prepare-host +199 -0
- data/scripts/bin/ubuntu/provision_vagrant +9 -0
- data/scripts/lxc-templates/files/rc.local +38 -0
- data/scripts/lxc-templates/lxc-centos-6 +279 -0
- data/scripts/lxc-templates/lxc-lenny +255 -0
- data/scripts/lxc-templates/lxc-lucid +313 -0
- data/scripts/lxc-templates/lxc-natty +237 -0
- data/spec/fixtures/illegal_syntax.json +1 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/toft/chef/chef_attributes_spec.rb +39 -0
- data/spec/toft/chef/chef_runner_spec.rb +34 -0
- data/spec/toft/node_spec.rb +18 -0
- data/spec/toft/puppet/puppet_runner_spec.rb +26 -0
- metadata +234 -0
@@ -0,0 +1,237 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
echo "Creating natty node..."
|
4
|
+
|
5
|
+
configure_ubuntu()
|
6
|
+
{
|
7
|
+
rootfs=$1
|
8
|
+
hostname=$2
|
9
|
+
|
10
|
+
# disable selinux in ubuntu
|
11
|
+
mkdir -p $rootfs/selinux
|
12
|
+
echo 0 > $rootfs/selinux/enforce
|
13
|
+
|
14
|
+
# add host root ssh access
|
15
|
+
mkdir $rootfs/root/.ssh
|
16
|
+
chmod 0600 $rootfs/root/.ssh
|
17
|
+
cat <<-EOF > $rootfs/root/.ssh/authorized_keys
|
18
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCguB7XL3ARzLZYLsIMZe4UUO371m+H5C6V8MhtmSlgXtgHDo7eZhNSm5zCeoyGd32OKeLxuxCCEkXfDDF1aa2a6twcASE3pmWNdnBS7auiOH4P7g+eQ4Aw9v7DdESbIVgHF/NDiAEFFdmApYNM3oCX2FhEVNVKxkkIokUr4axYFJzmJ6Xoi5Sd8JtPC85FZVXqDucZDnHQlOcCkbSo0UOmsWQGwtu8eUHoDeUG0dB8ntb9xlBeLctdrAPhuFYCX8IfFkdcakkzv61ETPbKE6g9wdTDC/TEep7/AHGYmarziRnwKiVOL1jnE1coOJLqy8wOC3dKGmRZy9D4sTc+FRV root insecure public key
|
19
|
+
EOF
|
20
|
+
|
21
|
+
cp /usr/lib/lxc/templates/files/rc.local $rootfs/etc/rc.local
|
22
|
+
|
23
|
+
# disable selinux in ubuntu
|
24
|
+
mkdir -p $rootfs/selinux
|
25
|
+
echo 0 > $rootfs/selinux/enforce
|
26
|
+
|
27
|
+
# set the hostname
|
28
|
+
cat <<EOF > $rootfs/etc/hostname
|
29
|
+
$hostname
|
30
|
+
EOF
|
31
|
+
# set minimal hosts
|
32
|
+
cat <<EOF > $rootfs/etc/hosts
|
33
|
+
127.0.0.1 $hostname localhost
|
34
|
+
EOF
|
35
|
+
|
36
|
+
# suppress log level output for udev
|
37
|
+
sed -i "s/=\"err\"/=0/" $rootfs/etc/udev/udev.conf
|
38
|
+
|
39
|
+
# remove jobs for consoles 5 and 6 since we only create 4 consoles in
|
40
|
+
# this template
|
41
|
+
rm -f $rootfs/etc/init/tty{5,6}.conf
|
42
|
+
|
43
|
+
echo "Set root password to 'root'"
|
44
|
+
echo "root:root" | chroot $rootfs chpasswd
|
45
|
+
|
46
|
+
return 0
|
47
|
+
}
|
48
|
+
|
49
|
+
copy_ubuntu()
|
50
|
+
{
|
51
|
+
cache=$1
|
52
|
+
arch=$2
|
53
|
+
rootfs=$3
|
54
|
+
|
55
|
+
# make a local copy of the miniubuntu
|
56
|
+
echo "Extracting rootfs image to $rootfs ..."
|
57
|
+
mkdir $rootfs
|
58
|
+
tar zxf $cache/natty-$arch.tar.gz -C $rootfs || return 1
|
59
|
+
return 0
|
60
|
+
}
|
61
|
+
|
62
|
+
install_ubuntu()
|
63
|
+
{
|
64
|
+
cache="/var/cache/lxc"
|
65
|
+
rootfs=$1
|
66
|
+
mkdir -p /var/lock/subsys/
|
67
|
+
(
|
68
|
+
flock -n -x 200
|
69
|
+
if [ $? -ne 0 ]; then
|
70
|
+
echo "Cache repository is busy."
|
71
|
+
return 1
|
72
|
+
fi
|
73
|
+
|
74
|
+
arch=$(arch)
|
75
|
+
if [ "$arch" == "x86_64" ]; then
|
76
|
+
arch=amd64
|
77
|
+
fi
|
78
|
+
|
79
|
+
if [ "$arch" == "i686" ]; then
|
80
|
+
arch=i386
|
81
|
+
fi
|
82
|
+
|
83
|
+
echo "Checking image cache in $cache/rootfs-$arch ... "
|
84
|
+
if [ ! -e "$cache/rootfs-$arch" ]; then
|
85
|
+
if [ $? -ne 0 ]; then
|
86
|
+
echo "Failed to download 'ubuntu base'"
|
87
|
+
return 1
|
88
|
+
fi
|
89
|
+
fi
|
90
|
+
|
91
|
+
copy_ubuntu $cache $arch $rootfs
|
92
|
+
if [ $? -ne 0 ]; then
|
93
|
+
echo "Failed to copy rootfs"
|
94
|
+
return 1
|
95
|
+
fi
|
96
|
+
|
97
|
+
return 0
|
98
|
+
|
99
|
+
) 200>/var/lock/subsys/lxc
|
100
|
+
|
101
|
+
return $?
|
102
|
+
}
|
103
|
+
|
104
|
+
copy_configuration()
|
105
|
+
{
|
106
|
+
path=$1
|
107
|
+
rootfs=$2
|
108
|
+
name=$3
|
109
|
+
|
110
|
+
cat <<EOF >> $path/config
|
111
|
+
lxc.utsname = $name
|
112
|
+
|
113
|
+
lxc.tty = 4
|
114
|
+
lxc.pts = 1024
|
115
|
+
lxc.rootfs = $rootfs
|
116
|
+
lxc.mount = $path/fstab
|
117
|
+
|
118
|
+
lxc.cgroup.devices.deny = a
|
119
|
+
# /dev/null and zero
|
120
|
+
lxc.cgroup.devices.allow = c 1:3 rwm
|
121
|
+
lxc.cgroup.devices.allow = c 1:5 rwm
|
122
|
+
# consoles
|
123
|
+
lxc.cgroup.devices.allow = c 5:1 rwm
|
124
|
+
lxc.cgroup.devices.allow = c 5:0 rwm
|
125
|
+
# lxc.cgroup.devices.allow = c 4:0 rwm
|
126
|
+
# lxc.cgroup.devices.allow = c 4:1 rwm
|
127
|
+
# /dev/{,u}random
|
128
|
+
lxc.cgroup.devices.allow = c 1:9 rwm
|
129
|
+
lxc.cgroup.devices.allow = c 1:8 rwm
|
130
|
+
lxc.cgroup.devices.allow = c 136:* rwm
|
131
|
+
lxc.cgroup.devices.allow = c 5:2 rwm
|
132
|
+
# rtc
|
133
|
+
lxc.cgroup.devices.allow = c 254:0 rwm
|
134
|
+
EOF
|
135
|
+
|
136
|
+
cat <<EOF > $path/fstab
|
137
|
+
proc $rootfs/proc proc nodev,noexec,nosuid 0 0
|
138
|
+
devpts $rootfs/dev/pts devpts defaults 0 0
|
139
|
+
sysfs $rootfs/sys sysfs defaults 0 0
|
140
|
+
EOF
|
141
|
+
|
142
|
+
if [ $? -ne 0 ]; then
|
143
|
+
echo "Failed to add configuration"
|
144
|
+
return 1
|
145
|
+
fi
|
146
|
+
|
147
|
+
return 0
|
148
|
+
}
|
149
|
+
|
150
|
+
clean()
|
151
|
+
{
|
152
|
+
cache="/var/cache/lxc"
|
153
|
+
|
154
|
+
if [ ! -e $cache ]; then
|
155
|
+
exit 0
|
156
|
+
fi
|
157
|
+
|
158
|
+
# lock, so we won't purge while someone is creating a repository
|
159
|
+
(
|
160
|
+
flock -n -x 200
|
161
|
+
if [ $? != 0 ]; then
|
162
|
+
echo "Cache repository is busy."
|
163
|
+
exit 1
|
164
|
+
fi
|
165
|
+
|
166
|
+
echo -n "Purging the download cache..."
|
167
|
+
rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
|
168
|
+
exit 0
|
169
|
+
) 200>/var/lock/subsys/lxc
|
170
|
+
}
|
171
|
+
|
172
|
+
usage()
|
173
|
+
{
|
174
|
+
cat <<EOF
|
175
|
+
$1 -h|--help -p|--path=<path> --clean
|
176
|
+
EOF
|
177
|
+
return 0
|
178
|
+
}
|
179
|
+
|
180
|
+
options=$(getopt -o hp:n:c -l help,path:,name:,clean -- "$@")
|
181
|
+
if [ $? -ne 0 ]; then
|
182
|
+
usage $(basename $0)
|
183
|
+
exit 1
|
184
|
+
fi
|
185
|
+
eval set -- "$options"
|
186
|
+
|
187
|
+
while true
|
188
|
+
do
|
189
|
+
case "$1" in
|
190
|
+
-h|--help) usage $0 && exit 0;;
|
191
|
+
-p|--path) path=$2; shift 2;;
|
192
|
+
-n|--name) name=$2; shift 2;;
|
193
|
+
-c|--clean) clean=$2; shift 2;;
|
194
|
+
--) shift 1; break ;;
|
195
|
+
*) break ;;
|
196
|
+
esac
|
197
|
+
done
|
198
|
+
|
199
|
+
if [ ! -z "$clean" -a -z "$path" ]; then
|
200
|
+
clean || exit 1
|
201
|
+
exit 0
|
202
|
+
fi
|
203
|
+
|
204
|
+
if [ -z "$path" ]; then
|
205
|
+
echo "'path' parameter is required"
|
206
|
+
exit 1
|
207
|
+
fi
|
208
|
+
|
209
|
+
if [ "$(id -u)" != "0" ]; then
|
210
|
+
echo "This script should be run as 'root'"
|
211
|
+
exit 1
|
212
|
+
fi
|
213
|
+
|
214
|
+
rootfs=$path/rootfs
|
215
|
+
|
216
|
+
install_ubuntu $rootfs
|
217
|
+
if [ $? -ne 0 ]; then
|
218
|
+
echo "failed to install ubuntu"
|
219
|
+
exit 1
|
220
|
+
fi
|
221
|
+
|
222
|
+
configure_ubuntu $rootfs $name
|
223
|
+
if [ $? -ne 0 ]; then
|
224
|
+
echo "failed to configure ubuntu for a container"
|
225
|
+
exit 1
|
226
|
+
fi
|
227
|
+
|
228
|
+
copy_configuration $path $rootfs $name
|
229
|
+
if [ $? -ne 0 ]; then
|
230
|
+
echo "failed write configuration file"
|
231
|
+
exit 1
|
232
|
+
fi
|
233
|
+
|
234
|
+
if [ ! -z $clean ]; then
|
235
|
+
clean || exit 1
|
236
|
+
exit 0
|
237
|
+
fi
|
@@ -0,0 +1 @@
|
|
1
|
+
illegal json file
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'cucumber/ast/table'
|
3
|
+
|
4
|
+
describe "ChefAttributes" do
|
5
|
+
it "should parse chef dot connected attributes" do
|
6
|
+
ca = Toft::ChefAttributes.new(Cucumber::Ast::Table.new([[]]))
|
7
|
+
ca.add_attribute "one.two.three", "some"
|
8
|
+
ca.add_attribute "one.four", "another"
|
9
|
+
ca.attributes["one"]["two"]["three"].should == "some"
|
10
|
+
ca.attributes["one"]["four"].should == "another"
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should parse cucumber chef attributes ast table" do
|
14
|
+
table = Cucumber::Ast::Table.new([
|
15
|
+
["key", "value"],
|
16
|
+
["one.four", "one"],
|
17
|
+
["one.two.three", "some"]
|
18
|
+
])
|
19
|
+
ca = Toft::ChefAttributes.new(table)
|
20
|
+
ca.attributes["one"]["four"].should == "one"
|
21
|
+
ca.attributes["one"]["two"]["three"].should == "some"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should return json" do
|
25
|
+
table = Cucumber::Ast::Table.new([
|
26
|
+
["key", "value"],
|
27
|
+
["one.four", "one"],
|
28
|
+
["one.two.three", "some"]
|
29
|
+
])
|
30
|
+
ca = Toft::ChefAttributes.new(table)
|
31
|
+
ca.to_json.should == "{\"one\":{\"two\":{\"three\":\"some\"},\"four\":\"one\"}}"
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should initialize with 0 parameter" do
|
35
|
+
ca = Toft::ChefAttributes.new
|
36
|
+
ca.add_attribute "one.four", "one"
|
37
|
+
ca.attributes["one"]["four"].should == "one"
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "ChefRunner" do
|
4
|
+
it "should throw exception if json file not exist" do
|
5
|
+
cf = Toft::Chef::ChefRunner.new "whatever"
|
6
|
+
lambda { cf.run "run list", :json => "non-exist-file" }.
|
7
|
+
should raise_error Errno::ENOENT, "No such file or directory - non-exist-file"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should throw exception if json file syntax is illegal" do
|
11
|
+
cf = Toft::Chef::ChefRunner.new "whatever"
|
12
|
+
lambda { cf.run "run list", :json => "#{PROJECT_ROOT}/spec/fixtures/illegal_syntax.json" }.
|
13
|
+
should raise_error JSON::ParserError
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should throw exception if cookbook path not set" do
|
17
|
+
cf = Toft::Chef::ChefRunner.new "whatever"
|
18
|
+
lambda { cf.run "run list" }.should raise_error ArgumentError, "Toft.cookbook_path can not be empty!"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should throw exception if cookbook not exist" do
|
22
|
+
Toft.cookbook_path = "non-exist-cookbook"
|
23
|
+
cf = Toft::Chef::ChefRunner.new "whatever"
|
24
|
+
lambda { cf.run "run list" }.should raise_error RuntimeError
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should throw exception if roles not exist" do
|
28
|
+
Toft.cookbook_path = "#{PROJECT_ROOT}/fixtures/chef/cookbookse"
|
29
|
+
Toft.role_path = "non-exist-roles"
|
30
|
+
cf = Toft::Chef::ChefRunner.new "#{PROJECT_ROOT}/tmp"
|
31
|
+
lambda { cf.run "run list" }.should raise_error RuntimeError
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Node" do
|
4
|
+
|
5
|
+
describe 'run_puppet' do
|
6
|
+
|
7
|
+
it 'should run block with puppet runner' do
|
8
|
+
puppet_runner = mock Toft::Puppet::PuppetRunner.class
|
9
|
+
puppet_runner.should_receive(:run).with('manifest', {})
|
10
|
+
|
11
|
+
node = Toft::Node.new("my_host", {:runner => puppet_runner})
|
12
|
+
node.run_puppet('manifest')
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "PuppetRunner" do
|
4
|
+
|
5
|
+
it "should run puppet apply to manifest" do
|
6
|
+
Toft.manifest_path = "#{PROJECT_ROOT}/fixtures/puppet/manifests"
|
7
|
+
runner = Toft::Puppet::PuppetRunner.new("whatever") do |command|
|
8
|
+
command.include?("puppet apply").should be_true
|
9
|
+
end
|
10
|
+
lambda { runner.run "test" }.should_not raise_error
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should throw exception if manifest path not set" do
|
14
|
+
Toft.manifest_path = ""
|
15
|
+
runner = Toft::Puppet::PuppetRunner.new "whatever"
|
16
|
+
lambda { runner.run "test" }.should raise_error ArgumentError, "Toft.manifest_path can not be empty!"
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
it "should throw exception if cookbook not exist" do
|
21
|
+
Toft.manifest_path = "non-exist-manifest"
|
22
|
+
cf = Toft::Puppet::PuppetRunner.new "whatever"
|
23
|
+
lambda { cf.run "test" }.should raise_error RuntimeError
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,234 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: toft-puppet
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 13
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Francisco Trindade
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-02-07 00:00:00 +11:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: fpm
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rake
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: cucumber
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 3
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
75
|
+
type: :development
|
76
|
+
version_requirements: *id004
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: vagrant
|
79
|
+
prerelease: false
|
80
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 49
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
- 8
|
89
|
+
- 7
|
90
|
+
version: 0.8.7
|
91
|
+
type: :development
|
92
|
+
version_requirements: *id005
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: net-ssh
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
105
|
+
type: :runtime
|
106
|
+
version_requirements: *id006
|
107
|
+
description: toft currently support testing chef, puppet, shell scripts using cucumber on lxc on ubuntu
|
108
|
+
email:
|
109
|
+
- frank.trindade@gmail.com
|
110
|
+
executables: []
|
111
|
+
|
112
|
+
extensions: []
|
113
|
+
|
114
|
+
extra_rdoc_files: []
|
115
|
+
|
116
|
+
files:
|
117
|
+
- Gemfile
|
118
|
+
- Gemfile.lock
|
119
|
+
- Rakefile
|
120
|
+
- features/checker.feature
|
121
|
+
- features/chef.feature
|
122
|
+
- features/command.feature
|
123
|
+
- features/node.feature
|
124
|
+
- features/puppet.feature
|
125
|
+
- features/step_definitions/centos/checks.rb
|
126
|
+
- features/step_definitions/checker.rb
|
127
|
+
- features/step_definitions/chef.rb
|
128
|
+
- features/step_definitions/command.rb
|
129
|
+
- features/step_definitions/node.rb
|
130
|
+
- features/step_definitions/puppet.rb
|
131
|
+
- features/support/env.rb
|
132
|
+
- fixtures/chef/attributes.json
|
133
|
+
- fixtures/chef/cookbooks/test/attributes/default.rb
|
134
|
+
- fixtures/chef/cookbooks/test/recipes/attribute.rb
|
135
|
+
- fixtures/chef/cookbooks/test/recipes/default.rb
|
136
|
+
- fixtures/chef/cookbooks/test/recipes/role.rb
|
137
|
+
- fixtures/chef/roles/test.rb
|
138
|
+
- fixtures/puppet/conf/fileserver.conf
|
139
|
+
- fixtures/puppet/conf/puppet.conf
|
140
|
+
- fixtures/puppet/conf/puppet_exec.conf
|
141
|
+
- fixtures/puppet/conf/puppet_fileserver.conf
|
142
|
+
- fixtures/puppet/conf/puppet_modules.conf
|
143
|
+
- fixtures/puppet/conf/puppet_template.conf
|
144
|
+
- fixtures/puppet/manifests/fileserver/conf/test_fileserver
|
145
|
+
- fixtures/puppet/manifests/nodes/test_node.pp
|
146
|
+
- fixtures/puppet/manifests/site.pp
|
147
|
+
- fixtures/puppet/manifests/templates/template_test
|
148
|
+
- fixtures/puppet/manifests/test.pp
|
149
|
+
- fixtures/puppet/manifests/test_fileserver.pp
|
150
|
+
- fixtures/puppet/manifests/test_install.pp
|
151
|
+
- fixtures/puppet/manifests/test_module.pp
|
152
|
+
- fixtures/puppet/manifests/test_service.pp
|
153
|
+
- fixtures/puppet/manifests/test_template.pp
|
154
|
+
- fixtures/puppet/modules/test_module/manifests/init.pp
|
155
|
+
- lib/toft.rb
|
156
|
+
- lib/toft/chef/chef_attributes.rb
|
157
|
+
- lib/toft/chef/chef_runner.rb
|
158
|
+
- lib/toft/command_executor.rb
|
159
|
+
- lib/toft/file_checker.rb
|
160
|
+
- lib/toft/node.rb
|
161
|
+
- lib/toft/node_controller.rb
|
162
|
+
- lib/toft/puppet/puppet_runner.rb
|
163
|
+
- lib/toft/version.rb
|
164
|
+
- scripts/bin/centos/lxc-prepare-host
|
165
|
+
- scripts/bin/centos/provision_vagrant
|
166
|
+
- scripts/bin/share/install-chef-ubuntu.sh
|
167
|
+
- scripts/bin/share/lxc-create-centos-image
|
168
|
+
- scripts/bin/ubuntu/lxc-create-ubuntu-image
|
169
|
+
- scripts/bin/ubuntu/lxc-prepare-host
|
170
|
+
- scripts/bin/ubuntu/provision_vagrant
|
171
|
+
- scripts/lxc-templates/files/rc.local
|
172
|
+
- scripts/lxc-templates/lxc-centos-6
|
173
|
+
- scripts/lxc-templates/lxc-lenny
|
174
|
+
- scripts/lxc-templates/lxc-lucid
|
175
|
+
- scripts/lxc-templates/lxc-natty
|
176
|
+
- spec/fixtures/illegal_syntax.json
|
177
|
+
- spec/spec_helper.rb
|
178
|
+
- spec/toft/chef/chef_attributes_spec.rb
|
179
|
+
- spec/toft/chef/chef_runner_spec.rb
|
180
|
+
- spec/toft/node_spec.rb
|
181
|
+
- spec/toft/puppet/puppet_runner_spec.rb
|
182
|
+
has_rdoc: true
|
183
|
+
homepage: https://github.com/frankmt/toft
|
184
|
+
licenses: []
|
185
|
+
|
186
|
+
post_install_message:
|
187
|
+
rdoc_options: []
|
188
|
+
|
189
|
+
require_paths:
|
190
|
+
- lib
|
191
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
192
|
+
none: false
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
hash: 3
|
197
|
+
segments:
|
198
|
+
- 0
|
199
|
+
version: "0"
|
200
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
hash: 3
|
206
|
+
segments:
|
207
|
+
- 0
|
208
|
+
version: "0"
|
209
|
+
requirements: []
|
210
|
+
|
211
|
+
rubyforge_project: toft
|
212
|
+
rubygems_version: 1.3.7
|
213
|
+
signing_key:
|
214
|
+
specification_version: 3
|
215
|
+
summary: Fork from https://github.com/exceedhl/toft to add puppet support
|
216
|
+
test_files:
|
217
|
+
- features/checker.feature
|
218
|
+
- features/chef.feature
|
219
|
+
- features/command.feature
|
220
|
+
- features/node.feature
|
221
|
+
- features/puppet.feature
|
222
|
+
- features/step_definitions/centos/checks.rb
|
223
|
+
- features/step_definitions/checker.rb
|
224
|
+
- features/step_definitions/chef.rb
|
225
|
+
- features/step_definitions/command.rb
|
226
|
+
- features/step_definitions/node.rb
|
227
|
+
- features/step_definitions/puppet.rb
|
228
|
+
- features/support/env.rb
|
229
|
+
- spec/fixtures/illegal_syntax.json
|
230
|
+
- spec/spec_helper.rb
|
231
|
+
- spec/toft/chef/chef_attributes_spec.rb
|
232
|
+
- spec/toft/chef/chef_runner_spec.rb
|
233
|
+
- spec/toft/node_spec.rb
|
234
|
+
- spec/toft/puppet/puppet_runner_spec.rb
|