kitchen-zcloudjp 0.1.6 → 0.2.0
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 +8 -8
- data/README.md +23 -4
- data/lib/kitchen/driver/zcloudjp.rb +12 -1
- data/lib/kitchen/driver/zcloudjp_version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MjkwMDVmMDk0MzMyMTdiN2JkOTgwY2NjNDRhNDkwZWEyNzM5Y2I2Yw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZDA0NmUyMzFiN2I5N2VhNDI5Y2MxZmQyYmY4NmUzNjQ0YTc1NTQxMg==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZGE4NTVlZTExZjgxNTFkNWM5ZTQxMTc4ZTYwZGNmZjU0YWIzMzZiNDM5OGM5
|
|
10
|
+
YzkyY2U2ZmNjM2MyZGE5MmViNjg0NWQxOWRiNTc4YmQyOTIzNTdlMDY5NzYy
|
|
11
|
+
MmFkMzUxMjVlMzMzNTgwYjExMjhhMDUzNGIxNTZlNTFiNDEwNjg=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YWE3ZmI4MTNiMzZjNjBiOTVmYTVhNzBiNGJmODAwYjdjMDgxZTQ4NWU2NDNm
|
|
14
|
+
NDNkYjhiY2I3YTgwYTI5ZjdkNDY0Yzc0Y2NhNWFkZDhkYmRhMWYzN2RhYTAz
|
|
15
|
+
OTZmYjFhNjQ3YWI4NDRhZjdhMzFiYmNkZGY0MmQ0MzhhZjUwNWY=
|
data/README.md
CHANGED
|
@@ -31,26 +31,33 @@ Or install it yourself as:
|
|
|
31
31
|
## Configuration
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
### api_key
|
|
34
|
+
### driver_config/api_key
|
|
35
35
|
|
|
36
36
|
**Required** The Z Cloud(joyent) apikey to use.
|
|
37
37
|
|
|
38
38
|
You can see an account section at [Z Cloud control panel](https://my.z-cloud.jp).
|
|
39
39
|
|
|
40
|
-
### dataset
|
|
40
|
+
### platforms/name/driver_config/dataset
|
|
41
41
|
|
|
42
42
|
The Z Cloud(joyent) dataset image to use.
|
|
43
43
|
|
|
44
44
|
The default is SmartOS base64 image `sdc:sdc:base64:13.1.0`.
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
### package
|
|
47
|
+
### platforms/name/driver_config/package
|
|
48
48
|
|
|
49
49
|
The Z Cloud(joyent) smartmachine size to use.
|
|
50
50
|
|
|
51
51
|
The default is `Small_1GB`.
|
|
52
52
|
|
|
53
|
-
###
|
|
53
|
+
### platforms/name/driver_config/metadata_file
|
|
54
|
+
|
|
55
|
+
The Z Cloud(joyent) smartmachine metadata to use.
|
|
56
|
+
|
|
57
|
+
The default is empty hash.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### platforms/name/driver_config/require_chef_omnibus
|
|
54
61
|
|
|
55
62
|
For `VirtualMachine` only option. Install chef from omnibus installer on boot.
|
|
56
63
|
|
|
@@ -73,6 +80,8 @@ driver_config:
|
|
|
73
80
|
|
|
74
81
|
platforms:
|
|
75
82
|
- name: smartos-base64
|
|
83
|
+
driver_config:
|
|
84
|
+
metadata_file: foo.json
|
|
76
85
|
- name: ubuntu12
|
|
77
86
|
driver_config:
|
|
78
87
|
require_chef_omnibus: true
|
|
@@ -84,6 +93,16 @@ suites:
|
|
|
84
93
|
attributes: {}
|
|
85
94
|
```
|
|
86
95
|
|
|
96
|
+
**Example:foo.json(metadata)**
|
|
97
|
+
|
|
98
|
+
Notice: values must be string.
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
{
|
|
102
|
+
"user-script": "#!/bin/bash\nenv > /tmp/env_out",
|
|
103
|
+
"your_defined_key" : "some_data"
|
|
104
|
+
}
|
|
105
|
+
```
|
|
87
106
|
|
|
88
107
|
|
|
89
108
|
## Product List (2013-07-09)
|
|
@@ -114,13 +114,24 @@ module Kitchen
|
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
def create_server(state)
|
|
117
|
+
debug(JSON.pretty_generate(config))
|
|
118
|
+
debug("Send as Metadata => #{build_metadata}")
|
|
117
119
|
client.machine.create(
|
|
118
120
|
:dataset => config[:dataset],
|
|
119
121
|
:package => config[:package],
|
|
120
|
-
:name => ['tk', @instance.suite.name.to_s, @instance.platform.name.to_s].join('-').slice(0,20)
|
|
122
|
+
:name => ['tk', @instance.suite.name.to_s, @instance.platform.name.to_s].join('-').slice(0,20),
|
|
123
|
+
:metadata => build_metadata
|
|
121
124
|
)
|
|
122
125
|
end
|
|
123
126
|
|
|
127
|
+
def build_metadata
|
|
128
|
+
if config[:metadata_file]
|
|
129
|
+
JSON.parse(::File.read(config[:metadata_file]))
|
|
130
|
+
else
|
|
131
|
+
{}
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
124
135
|
def install_chef_for_smartos(ssh_args)
|
|
125
136
|
ssh(ssh_args, <<-INSTALL.gsub(/^ {10}/, ''))
|
|
126
137
|
if [ ! -f /opt/local/bin/chef-client ]; then
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-zcloudjp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sawanoboly
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-07-
|
|
11
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|
|
@@ -148,3 +148,4 @@ signing_key:
|
|
|
148
148
|
specification_version: 4
|
|
149
149
|
summary: A Test Kitchen Driver for Zcloudjp
|
|
150
150
|
test_files: []
|
|
151
|
+
has_rdoc:
|