kitchen-itamae 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +3 -2
- data/lib/kitchen/provisioner/itamae.rb +26 -7
- data/lib/kitchen-itamae/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c070b39d328e44d4c108ca00bc996616fc5c238c
|
|
4
|
+
data.tar.gz: f4e708ecdd2f708af9045e7a2b8160ae42264462
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8868091d0b8f06b3665041ac5e311974f78401ef4e305e2d1a7a28605ecd9122a5226c80c732337458a93eed52102acfb904139419099bf63195a71c82dd81b9
|
|
7
|
+
data.tar.gz: 35b92412fade8396a8dde69a4a4f47c5008c0ee9abe2e850600ca15b0e0037458bb652cd84cbcf381d5d599741a9be23b1029a8bbdde8b124282dd7a261a04ee
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
CHANGELOG of Itamae::Kitchen
|
|
2
|
+
|
|
3
|
+
## 0.0.2
|
|
4
|
+
|
|
5
|
+
- cleanup code
|
|
6
|
+
- cleanup sandbox
|
|
7
|
+
- cleanup remote root_path before converge
|
|
8
|
+
- option with_ohai
|
|
9
|
+
- option sudo_command
|
|
10
|
+
- option itamae_option
|
|
11
|
+
- plugin install by embedded gem (every run)
|
|
12
|
+
|
|
13
|
+
## 0.0.1
|
|
14
|
+
|
|
15
|
+
- Initial release
|
|
16
|
+
- simple comverge
|
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Kitchen::Itamae
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
itamae provisioner for test-kitchen
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
## Installation
|
|
6
7
|
|
|
@@ -20,7 +21,7 @@ Or install it yourself as:
|
|
|
20
21
|
|
|
21
22
|
## Usage
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
https://github.com/OpsRockin/kitchen-itamae_playground
|
|
24
25
|
|
|
25
26
|
## Contributing
|
|
26
27
|
|
|
@@ -10,33 +10,52 @@ module Kitchen
|
|
|
10
10
|
default_config :parasite_chef_omnibus, true
|
|
11
11
|
default_config :chef_omnibus_url, "https://www.chef.io/chef/install.sh"
|
|
12
12
|
default_config :chef_omnibus_root, "/opt/chef"
|
|
13
|
+
default_config :chef_omnibus_bin_dir, "/opt/chef/embedded/bin"
|
|
13
14
|
default_config :chef_omnibus_install_options, nil
|
|
14
15
|
|
|
15
16
|
default_config :itamae_root, "kitchen"
|
|
16
17
|
default_config :recipe_list, []
|
|
17
18
|
default_config :node_json, nil
|
|
19
|
+
default_config :with_ohai, false
|
|
20
|
+
default_config :itamae_option, nil
|
|
21
|
+
default_config :itamae_plugins, []
|
|
22
|
+
|
|
23
|
+
def initialize(config = {})
|
|
24
|
+
debug(JSON.pretty_generate(config))
|
|
25
|
+
init_config(config)
|
|
26
|
+
end
|
|
18
27
|
|
|
19
28
|
# (see Base#create_sandbox)
|
|
20
29
|
def create_sandbox
|
|
21
30
|
super
|
|
22
|
-
# prepare_data
|
|
23
|
-
# prepare_script
|
|
24
31
|
FileUtils.cp_r(Dir.glob("kitchen/*"), sandbox_path)
|
|
25
32
|
end
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
# (see Base#init_command)
|
|
35
|
+
def init_command
|
|
36
|
+
cmd = []
|
|
37
|
+
cmd << "#{sudo("rm")} -rf #{config[:root_path]} ; mkdir -p #{config[:root_path]}"
|
|
38
|
+
debug("Cleanup Kitchen Root")
|
|
39
|
+
config[:itamae_plugins].map do |plugin|
|
|
40
|
+
cmd << "#{sudo(File.join(config[:chef_omnibus_bin_dir], "gem"))} install itamae-plugin-recipe-#{plugin} --no-ri --no-rdoc"
|
|
41
|
+
end
|
|
42
|
+
Util.wrap_command(cmd.join("\n"))
|
|
29
43
|
end
|
|
30
44
|
|
|
31
45
|
# (see Base#run_command)
|
|
32
46
|
def run_command
|
|
33
|
-
|
|
34
|
-
|
|
47
|
+
debug(instance.inspect)
|
|
48
|
+
debug(JSON.pretty_generate(config))
|
|
49
|
+
runlist = config[:recipe_list].map do |recipe|
|
|
50
|
+
cmd = ["cd #{config[:root_path]};", sudo('itamae')]
|
|
35
51
|
cmd << 'local'
|
|
36
|
-
cmd <<
|
|
52
|
+
cmd << '--ohai' if config[:with_ohai]
|
|
53
|
+
cmd << config[:itamae_option]
|
|
54
|
+
cmd << "-j #{config[:node_json]}" if config[:node_json]
|
|
37
55
|
cmd << recipe
|
|
38
56
|
cmd.join(" ")
|
|
39
57
|
end
|
|
58
|
+
debug(runlist.join("\n"))
|
|
40
59
|
Util.wrap_command(runlist.join("\n"))
|
|
41
60
|
end
|
|
42
61
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-itamae
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sawanoboly
|
|
@@ -60,6 +60,7 @@ extensions: []
|
|
|
60
60
|
extra_rdoc_files: []
|
|
61
61
|
files:
|
|
62
62
|
- ".gitignore"
|
|
63
|
+
- CHANGELOG.md
|
|
63
64
|
- Gemfile
|
|
64
65
|
- LICENSE.txt
|
|
65
66
|
- README.md
|